/* 全局設定 */
:root{
  --bg:#1a1a1a;
  --fg:#eaeaea;
  --accent:#3f7cac;   /* 靛藍 */
  --accent2:#8d3f3f;  /* 暗紅 */
  --radius:6px;
}

*{box-sizing:border-box;margin:0;padding:0;}
body{
  font-family:'Noto Sans JP',sans-serif;
  background:var(--bg);
  color:var(--fg);
  line-height:1.6;
  overflow-x:hidden;
  scroll-behavior:smooth;
}

header{
  padding:0.5rem 2rem;
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:rgba(0,0,0,0.6);
  position:fixed;
  width:100%;
  top:0;left:0;
  backdrop-filter:blur(6px);
  z-index:10;
}
.logo{height:40px;width:auto;object-fit:contain;}
nav ul{display:flex;gap:1.5rem;list-style:none;}
nav a, #lang-toggle{
  color:var(--fg);
  text-decoration:none;
  font-weight:500;
  transition:color .3s;
  background:none;
  border:none;
  font-size:1rem;
  cursor:pointer;
}
nav a:hover,#lang-toggle:hover{color:var(--accent);}

section{padding:4rem 2rem 4rem;max-width:960px;margin:auto;}

#hero{
  min-height:60vh;
  background:linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  align-items:center;
  text-align:center;
  position:relative;
  padding-top:60px;
}

/* Image Carousel Styles */
.image-carousel{
  max-width:800px;
  width:100%;
  margin:0 auto 2rem auto;
  position:relative;
}

.carousel-container{
  position:relative;
  width:100%;
  height:400px;
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 8px 32px rgba(0,0,0,0.3);
}

.carousel-image{
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:0;
  transition:opacity 1s ease-in-out;
}

.carousel-image.active{
  opacity:1;
}

@media (max-width:768px){
  .image-carousel{
    margin:0 auto 1.5rem auto;
  }
  
  .carousel-container{
    height:250px;
  }
}
#hero::before{
  content:'';
  position:absolute;
  top:0;left:0;right:0;bottom:0;
  background:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.02"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.01"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity:0.3;
}
#hero h2{font-size:2.5rem;margin-bottom:.5rem;z-index:1;position:relative;}
#hero p{font-size:1.2rem;color:var(--accent);z-index:1;position:relative;}

h3{font-size:2rem;margin-bottom:2rem;color:var(--accent2);}
.card{
  display:flex;
  align-items:flex-start;
  gap:1.5rem;
  background:rgba(255,255,255,0.05);
  padding:1.5rem;
  border-radius:var(--radius);
  margin-bottom:1.5rem;
  transition:all .3s ease;
  border:1px solid rgba(255,255,255,0.1);
}
.card:hover{
  transform:translateY(-4px);
  background:rgba(255,255,255,0.08);
  border-color:var(--accent);
}
.card img{width:48px;height:48px;filter:brightness(0.8);}
.card .text h4{margin-bottom:.5rem;color:var(--accent);}
.card .text p{margin-bottom:1rem;color:#ccc;}
.card a{
  color:var(--accent2);
  text-decoration:none;
  font-weight:500;
  transition:color .3s;
}
.card a:hover{color:var(--accent);}

#about p{font-size:1.1rem;line-height:1.8;color:#ddd;}
#contact p{margin-bottom:1rem;font-size:1.1rem;}
#contact a{color:var(--accent);text-decoration:none;}
#contact a:hover{color:var(--accent2);}

footer{padding:2rem;text-align:center;font-size:.8rem;color:#888;}

/* Buy Me a Coffee Button */
.coffee-container{
  margin-top: 2rem;
  text-align: center;
}

.coffee-btn{
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #FFDD00, #FBBF24);
  color: #1a1a1a;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 221, 0, 0.3);
}

.coffee-btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 221, 0, 0.4);
  background: linear-gradient(135deg, #FFEB3B, #FFD700);
}

.coffee-icon{
  width: 20px;
  height: 20px;
}

/* Floating coffee button for mobile */
@media (max-width: 768px) {
  .coffee-btn{
    padding: 0.6rem 1.2rem;
    font-size: 0.8rem;
  }
}

/* 進場遮罩動畫 */
#loader{
  position:fixed;
  inset:0;
  background:var(--bg);
  display:flex;
  justify-content:center;
  align-items:center;
  z-index:999;
}
#loader .kanji{
  font-size:4rem;
  color:var(--accent2);
  letter-spacing:8px;
  font-weight:700;
}

/* Support Section */
.support-section{
  padding: 4rem 2rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  margin: 2rem auto;
  max-width: 600px;
}

.support-section h3{
  color: var(--accent2);
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.support-section p{
  color: #ddd;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

/* Floating Buy Me a Coffee Button */
.coffee-float-btn{
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #FFDD00, #FBBF24);
  color: #1a1a1a;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(255, 221, 0, 0.3);
  transition: all 0.3s ease;
  z-index: 100;
  text-decoration: none;
}

.coffee-float-btn:hover{
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(255, 221, 0, 0.4);
  background: linear-gradient(135deg, #FFEB3B, #FFD700);
}

.coffee-float-icon{
  width: 24px;
  height: 24px;
}

/* 響應式設計 */
@media (max-width: 768px) {
  header{padding:1rem;}
  nav ul{gap:1rem;}
  #hero h2{font-size:2rem;}
  #hero p{font-size:1rem;}
  section{padding:4rem 1rem 2rem;}
  .card{flex-direction:column;text-align:center;}
  .card img{align-self:center;}
  h3{font-size:1.5rem;}

  .support-section{
    padding: 2rem 1rem;
    margin: 1rem;
  }
  
  .support-section h3{
    font-size: 1.5rem;
  }
  
  .support-section p{
    font-size: 1rem;
  }
  
  .coffee-btn{
    padding: 12px 24px;
    font-size: 14px;
  }
  
  .coffee-float-btn{
    bottom: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
  }
  
  .coffee-float-icon{
    width: 20px;
    height: 20px;
  }
}  

@media (max-width: 480px) {
  .support-section{
    padding: 1.5rem 1rem;
  }
  
  .coffee-float-btn{
    bottom: 10px;
    right: 10px;
    width: 45px;
    height: 45px;
  }
  
  .coffee-float-icon{
    width: 18px;
    height: 18px;
  }
}