/* StormTwin Website Styles */
:root {
  --bg-dark: #050510;
  --bg-card: #0D0D1A;
  --blue-primary: #4DA6FF;
  --blue-glow: #00B4D8;
  --blue-soft: #90E0EF;
  --text-primary: #FFFFFF;
  --text-secondary: #A0A0B0;
  --text-muted: #666680;
  --border: #1a1a2e;
  --success: #22c55e;
  --error: #ef4444;
  --radius: 16px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
}

/* Docs-style radial gradient background */
body, .page-bg {
  background: var(--bg-dark);
  background-image:
    radial-gradient(ellipse at 30% 20%, rgba(77,166,255,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(0,180,216,0.06) 0%, transparent 50%);
  color: var(--text-primary);
  font-family: 'Noto Sans HK', system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Grid overlay */
.grid-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(77,166,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77,166,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(5,5,16,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo img {
  height: 36px;
  object-fit: contain;
}

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

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: var(--blue-primary);
  color: #fff;
}

.btn-primary:hover {
  background: #3a96ef;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--blue-primary);
  color: var(--blue-primary);
}

.btn-download {
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-glow));
  color: #fff;
  font-size: 16px;
  padding: 16px 36px;
  border-radius: var(--radius);
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(77,166,255,0.3);
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 24px 80px;
  max-width: 1100px;
  margin: 0 auto;
  gap: 60px;
}

.hero-content {
  flex: 1;
}

.hero-badge {
  display: inline-block;
  background: rgba(77,166,255,0.1);
  color: var(--blue-primary);
  border: 1px solid rgba(77,166,255,0.3);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 16px;
  line-height: 1.1;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.hero-meta .dot {
  opacity: 0.4;
}

.hero-visual {
  flex: 0 0 300px;
}

.phone-mockup {
  perspective: 1000px;
}

.app-screenshot {
  display: block;
  max-width: 300px;
  height: auto;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}

.phone-frame {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 32px;
  padding: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}

.phone-screen {
  background: var(--bg-dark);
  border-radius: 24px;
  overflow: hidden;
  height: 340px;
}

.chat-demo {
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  overflow: hidden;
}

.chat-msg {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 85%;
}

.ai-msg { flex-direction: row; align-self: flex-start; }
.user-msg { flex-direction: row-reverse; align-self: flex-end; }

.msg-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.msg-bubble {
  background: var(--bg-card);
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  border-bottom-left-radius: 4px;
}

.user-msg .msg-bubble {
  background: rgba(77,166,255,0.2);
  color: #fff;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 4px;
}

/* Features */
.features {
  position: relative;
  z-index: 1;
  padding: 80px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 16px;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: rgba(77,166,255,0.4);
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

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

/* Register Section */
.register-section {
  position: relative;
  z-index: 1;
  padding: 80px 24px;
  display: flex;
  justify-content: center;
}

.register-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px 40px;
  max-width: 520px;
  width: 100%;
  text-align: center;
}

.register-badge {
  display: inline-block;
  background: rgba(77,166,255,0.15);
  color: var(--blue-primary);
  border: 1px solid rgba(77,166,255,0.3);
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.register-card h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

.blue-gradient {
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.register-card > p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}

.register-steps {
  text-align: left;
  list-style: none;
  margin-bottom: 28px;
  padding: 20px;
  background: rgba(77,166,255,0.05);
  border-radius: var(--radius);
}

.register-steps li {
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.register-steps strong {
  color: var(--blue-primary);
  margin-right: 8px;
}

/* Auth buttons */
#g_id_onbutton {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.btn-apple {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 320px;
  margin: 0 auto 12px;
  padding: 12px 24px;
  background: #fff;
  color: #1d1d1f;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-apple:hover { background: #f5f5f7; }

.auth-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* Success box */
.success-box {
  padding: 24px;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: var(--radius);
}

.success-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 8px;
}

.success-box h3 {
  color: var(--success);
  font-size: 20px;
  margin-bottom: 8px;
}

.success-box p {
  color: var(--text-secondary);
  font-size: 14px;
}

.success-note {
  color: var(--blue-soft) !important;
  margin-top: 8px !important;
}

/* Error box */
.error-box {
  margin-top: 12px;
  padding: 12px 16px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm);
  color: var(--error);
  font-size: 13px;
}

/* VIP Section */
.vip-section {
  position: relative;
  z-index: 1;
  padding: 80px 24px;
  display: flex;
  justify-content: center;
}

.vip-card {
  background: var(--bg-card);
  border: 1px solid rgba(77,166,255,0.2);
  border-radius: 24px;
  padding: 48px 40px;
  max-width: 520px;
  width: 100%;
  text-align: center;
}

.vip-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-glow));
  color: #fff;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.vip-card h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

.vip-card > p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 28px;
}

.vip-form {
  display: flex;
  gap: 12px;
  max-width: 400px;
  margin: 0 auto 16px;
}

.input-code {
  flex: 1;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 15px;
  font-family: monospace;
  letter-spacing: 2px;
  text-transform: uppercase;
  outline: none;
  transition: border-color 0.2s;
}

.input-code:focus {
  border-color: var(--blue-primary);
}

.input-code::placeholder {
  color: var(--text-muted);
  font-family: 'Noto Sans HK', sans-serif;
  letter-spacing: 0;
  text-transform: none;
}

#vip-result {
  font-size: 14px;
  min-height: 20px;
  margin-bottom: 16px;
}

#vip-result.success { color: var(--success); }
#vip-result.error { color: var(--error); }

.download-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 48px 24px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

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

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

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

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
  width: 100%;
  text-align: center;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  z-index: 1000;
  transition: transform 0.3s ease;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* Loading spinner */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--blue-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 24px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 100px;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-visual {
    flex: none;
    width: 100%;
  }

  .phone-screen {
    height: 320px;
  }

  .register-card, .vip-card {
    padding: 32px 24px;
  }

  .nav-links {
    gap: 16px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
