/* ===== Variables ===== */
:root {
  --primary: #6c5ce7;
  --primary-light: #a29bfe;
  --primary-dark: #4834d4;
  --accent: #00cec9;
  --accent-warm: #fd79a8;
  --bg-dark: #0a0a12;
  --bg-card: #12121f;
  --bg-elevated: #1a1a2e;
  --text-primary: #f0f0f5;
  --text-secondary: #a0a0b8;
  --text-muted: #6b6b80;
  --border: rgba(255, 255, 255, 0.08);
  --gradient: linear-gradient(135deg, #6c5ce7 0%, #00cec9 50%, #fd79a8 100%);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --radius: 16px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

ul { list-style: none; }

img { max-width: 100%; display: block; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 18, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.header.scrolled {
  background: rgba(10, 10, 18, 0.95);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.15rem;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--gradient);
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
}

.nav-menu {
  display: flex;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: rgba(108, 92, 231, 0.15);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(108, 92, 231, 0.25) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 50%, rgba(0, 206, 201, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(253, 121, 168, 0.1) 0%, transparent 50%);
}

.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--primary-light);
  border-radius: 50%;
  opacity: 0.3;
  animation: float 8s infinite ease-in-out;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
  50% { transform: translateY(-30px) scale(1.2); opacity: 0.6; }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(108, 92, 231, 0.15);
  border: 1px solid rgba(108, 92, 231, 0.3);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--primary-light);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 32px;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108, 92, 231, 0.5);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  background: rgba(108, 92, 231, 0.1);
}

.hero-stats {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== Sections ===== */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(108, 92, 231, 0.12);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--primary-light);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.3;
}

.section-desc {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ===== Services Grid ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.service-card {
  position: relative;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
  opacity: 0;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(108, 92, 231, 0.3);
  box-shadow: var(--shadow);
}

.service-card:hover::before { opacity: 1; }

.service-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.service-arrow {
  display: inline-block;
  margin-top: 16px;
  color: var(--primary-light);
  font-size: 1.2rem;
  transition: var(--transition);
}

.service-card:hover .service-arrow {
  transform: translateX(4px);
}

/* ===== Module Sections ===== */
.module-alt {
  background: var(--bg-elevated);
}

.module-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.module-layout.reverse {
  direction: rtl;
}

.module-layout.reverse > * {
  direction: ltr;
}

.module-desc {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 1rem;
}

.feature-list {
  margin-bottom: 24px;
}

.feature-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.feature-list li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.7rem;
  top: 4px;
}

.module-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 4px 12px;
  background: rgba(108, 92, 231, 0.1);
  border: 1px solid rgba(108, 92, 231, 0.2);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--primary-light);
}

/* ===== Visual Cards ===== */
.visual-card {
  padding: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Comic visual */
.comic-visual .visual-frame {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

.comic-panel {
  border-radius: var(--radius-sm);
  min-height: 100px;
  animation: pulse-glow 3s infinite ease-in-out;
}

.comic-panel.p1 {
  grid-row: span 2;
  background: linear-gradient(135deg, #6c5ce7, #4834d4);
  min-height: 212px;
}

.comic-panel.p2 {
  background: linear-gradient(135deg, #00cec9, #0984e3);
  animation-delay: 0.5s;
}

.comic-panel.p3 {
  background: linear-gradient(135deg, #fd79a8, #e84393);
  animation-delay: 1s;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

/* Phone mockup */
.phone-mockup {
  width: 200px;
  height: 380px;
  background: #1a1a2e;
  border-radius: 28px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  padding: 12px;
  box-shadow: var(--shadow);
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  background: #000;
}

.drama-scene {
  width: 100%;
  height: 85%;
  background: linear-gradient(180deg, #2d1b69 0%, #1a1a2e 40%, #0a0a12 100%);
}

.drama-ui {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
}

.drama-bar {
  height: 3px;
  background: var(--gradient);
  border-radius: 2px;
  margin-bottom: 8px;
}

.drama-dots {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.drama-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}

.drama-dots span:first-child {
  background: var(--primary);
}

/* Book stack */
.book-stack {
  position: relative;
  width: 200px;
  height: 240px;
}

.book {
  position: absolute;
  width: 160px;
  height: 200px;
  border-radius: 4px 12px 12px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.book span {
  writing-mode: vertical-rl;
  letter-spacing: 4px;
}

.book.b1 {
  background: linear-gradient(135deg, #6c5ce7, #4834d4);
  left: 0;
  top: 0;
  z-index: 3;
}

.book.b2 {
  background: linear-gradient(135deg, #00cec9, #0984e3);
  left: 30px;
  top: 15px;
  z-index: 2;
}

.book.b3 {
  background: linear-gradient(135deg, #fd79a8, #e84393);
  left: 60px;
  top: 30px;
  z-index: 1;
}

/* Script page */
.script-page {
  width: 100%;
  max-width: 280px;
  padding: 32px 24px;
  background: #f5f0e8;
  border-radius: var(--radius-sm);
  color: #333;
  font-family: 'Courier New', monospace;
  box-shadow: var(--shadow);
}

.script-line {
  height: 8px;
  background: #ddd;
  border-radius: 4px;
  margin-bottom: 12px;
}

.script-line.short { width: 60%; }
.script-line.medium { width: 80%; }

.script-dialog {
  margin-top: 20px;
  padding: 12px;
  background: rgba(108, 92, 231, 0.1);
  border-left: 3px solid var(--primary);
  font-size: 0.85rem;
  color: #555;
  font-style: italic;
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.about-card {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.about-card:hover {
  border-color: rgba(108, 92, 231, 0.3);
}

.about-card h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
  color: var(--primary-light);
}

.about-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.contact-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.contact-item {
  padding: 24px 32px;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-value {
  font-size: 1rem;
  font-weight: 500;
}

/* ===== Footer ===== */
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

.footer-inner {
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover { color: var(--primary-light); }

.footer-copy {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-copy a {
  color: var(--text-muted);
  margin-left: 12px;
  transition: var(--transition);
}

.footer-copy a:hover { color: var(--primary-light); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 18, 0.98);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    display: block;
    padding: 12px 16px;
  }

  .module-layout,
  .module-layout.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: 40px;
  }

  .hero-stats { gap: 32px; }

  .section { padding: 72px 0; }
}
