/* CSS Variables - Light & Soft Theme for Live2D */
:root {
  --bg-primary: #faf8ff;
  --bg-secondary: #f3f0fa;
  --bg-tertiary: #ebe6f5;
  --bg-card: #ffffff;
  --text-primary: #2d2640;
  --text-secondary: #6b5f7d;
  --text-muted: #9a8fb3;
  --accent-primary: #a855f7;
  --accent-secondary: #ec4899;
  --accent-gradient: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  --accent-soft: linear-gradient(135deg, #e9d5ff 0%, #fbcfe8 100%);
  --border-color: #e5dff0;
  --shadow-sm: 0 2px 8px rgba(168, 85, 247, 0.08);
  --shadow-md: 0 8px 24px rgba(168, 85, 247, 0.12);
  --shadow-lg: 0 20px 40px rgba(168, 85, 247, 0.15);
  --shadow-glow: 0 0 60px rgba(168, 85, 247, 0.2);
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 24px;
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}

.navbar-scrolled {
  background-color: rgba(250, 248, 255, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(168, 85, 247, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.nav-logo-img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent-primary);
}

.nav-github {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-card);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.nav-github:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 120px 24px 80px;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 100% 80% at 50% 0%, rgba(168, 85, 247, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 80% 50%, rgba(236, 72, 153, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 20% 70%, rgba(168, 85, 247, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(251, 207, 232, 0.3) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--accent-soft);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--accent-primary);
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.hero-version {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.hero-image {
  position: relative;
  z-index: 1;
  margin-top: 60px;
  perspective: 1000px;
}

.preview-img {
  max-width: 900px;
  border-radius: 20px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border: 1px solid rgba(168, 85, 247, 0.1);
  transform: rotateX(5deg);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.preview-img:hover {
  transform: rotateX(0deg) scale(1.02);
  box-shadow: 0 30px 60px rgba(168, 85, 247, 0.2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 12px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(168, 85, 247, 0.5);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.1rem;
}

/* Section Styles */
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 60px;
}

/* Features Section */
.features {
  padding: 120px 24px;
  background: var(--bg-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.feature-card {
  padding: 32px;
  background: var(--bg-card);
  border-radius: 20px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.feature-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gradient);
  border-radius: 14px;
  margin-bottom: 20px;
  color: white;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Characters Section */
.characters {
  padding: 120px 24px;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.characters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
  max-width: 1100px;
  margin: 0 auto;
}

.character-card {
  text-align: center;
  padding: 28px 20px;
  background: var(--bg-card);
  border-radius: 24px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.character-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.character-avatar {
  width: 140px;
  height: 140px;
  margin: 0 auto 20px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border: 3px solid white;
}

.character-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.character-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.character-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Character Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg-card);
  border-radius: 24px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-image {
  width: 100%;
  max-width: 320px;
  border-radius: 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
}

.modal-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.modal-content p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.modal-close {
  background: var(--accent-gradient);
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
}

/* Sound Preview Section */
.sounds {
  padding: 100px 24px;
  background: var(--bg-primary);
}

.sounds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.sound-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  cursor: pointer;
}

.sound-card:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.sound-card.playing {
  border-color: var(--accent-primary);
  background: var(--accent-soft);
}

.sound-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gradient);
  border-radius: 12px;
  color: white;
  flex-shrink: 0;
}

.sound-info {
  flex: 1;
}

.sound-info h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.sound-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Tech Stack Section */
.tech-stack {
  padding: 80px 24px;
  background: var(--bg-secondary);
}

.tech-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.tech-item {
  padding: 12px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.tech-item:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

/* CTA Section */
.cta {
  padding: 120px 24px;
  text-align: center;
  background:
    radial-gradient(ellipse 100% 80% at 50% 100%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
    var(--bg-primary);
}

.cta h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.cta p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* Footer */
.footer {
  padding: 60px 24px 40px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.footer-logo img {
  height: 56px;
  width: auto;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.footer-bottom p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.footer-bottom a {
  color: var(--accent-primary);
}

.footer-bottom a:hover {
  text-decoration: underline;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animation delays for cards */
.feature-card:nth-child(1), .character-card:nth-child(1), .tech-item:nth-child(1), .sound-card:nth-child(1) { transition-delay: 0s; }
.feature-card:nth-child(2), .character-card:nth-child(2), .tech-item:nth-child(2), .sound-card:nth-child(2) { transition-delay: 0.1s; }
.feature-card:nth-child(3), .character-card:nth-child(3), .tech-item:nth-child(3), .sound-card:nth-child(3) { transition-delay: 0.2s; }
.feature-card:nth-child(4), .character-card:nth-child(4), .tech-item:nth-child(4), .sound-card:nth-child(4) { transition-delay: 0.3s; }
.feature-card:nth-child(5), .character-card:nth-child(5), .tech-item:nth-child(5) { transition-delay: 0.4s; }
.feature-card:nth-child(6), .character-card:nth-child(6), .tech-item:nth-child(6) { transition-delay: 0.5s; }
.character-card:nth-child(7) { transition-delay: 0.6s; }

/* Responsive Design */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero {
    padding: 100px 20px 60px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .preview-img {
    transform: none;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .features, .characters, .sounds, .cta {
    padding: 80px 20px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .characters-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sounds-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    gap: 24px;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Floating animation for hero */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotateX(5deg); }
  50% { transform: translateY(-10px) rotateX(5deg); }
}

.preview-img {
  animation: float 6s ease-in-out infinite;
}

.preview-img:hover {
  animation: none;
}

/* Soft glow pulse */
@keyframes glow-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

.hero-bg::after {
  content: '';
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.08) 0%, transparent 60%);
  animation: glow-pulse 5s ease-in-out infinite;
  pointer-events: none;
}

/* Gradient text for accents */
.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
