/* ═══════════════════════════════════════════════════
   HIDE — Deep Link Landing Pages
   Tactical Night-Ops Design
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;500;600;700&family=Outfit:wght@300;400;500;600&display=swap');

:root {
  --bg-primary: #121212;
  --bg-secondary: #1E1E1E;
  --bg-card: #252525;
  --bg-elevated: #2A2A2A;
  --bg-input: #1A1A1A;

  --green-dark: #1B5E20;
  --green: #4CAF50;
  --green-light: #66BB6A;
  --green-glow: rgba(76, 175, 80, 0.4);
  --green-glow-strong: rgba(76, 175, 80, 0.7);

  --orange: #FF6F00;
  --orange-light: #FFA726;

  --red: #E53935;
  --blue: #1E88E5;
  --grey: #757575;
  --purple: #9C27B0;

  --text-primary: #EEEEEE;
  --text-secondary: #AAAAAA;
  --text-muted: #666666;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --font-display: 'Chakra Petch', sans-serif;
  --font-body: 'Outfit', sans-serif;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

/* Scanlines */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px
  );
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
}

a { color: var(--green); text-decoration: none; }

/* ── Layout ── */
.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.container {
  width: 100%;
  max-width: 440px;
  padding: 0 24px;
  margin: 0 auto;
}

/* ── Radar Background ── */
.radar-bg {
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.1;
}

.radar-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--green);
  animation: radarPulse 3s ease-out infinite;
}

.radar-bg::after {
  content: '';
  position: absolute;
  inset: 20%;
  border-radius: 50%;
  border: 1px solid var(--green);
  animation: radarPulse 3s ease-out infinite 1s;
}

.radar-inner {
  position: absolute;
  inset: 40%;
  border-radius: 50%;
  border: 1px solid var(--green);
  animation: radarPulse 3s ease-out infinite 2s;
}

.radar-sweep {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50%;
  height: 2px;
  background: linear-gradient(90deg, var(--green-glow-strong), transparent);
  transform-origin: left center;
  animation: radarSweep 4s linear infinite;
}

@keyframes radarPulse {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

@keyframes radarSweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── Logo ── */
.logo-area {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-top: 60px;
  margin-bottom: 12px;
}

.logo-title {
  font-size: 3.5rem;
  letter-spacing: 0.5em;
  color: var(--green);
  text-shadow:
    0 0 20px var(--green-glow),
    0 0 40px var(--green-glow),
    0 0 80px rgba(76, 175, 80, 0.2);
  animation: titleGlow 3s ease-in-out infinite alternate;
  margin-right: -0.5em;
}

.logo-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  filter: drop-shadow(0 0 16px var(--green-glow)) drop-shadow(0 0 32px rgba(76, 175, 80, 0.2));
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-subtitle {
  font-family: var(--font-display);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

@keyframes titleGlow {
  from { text-shadow: 0 0 20px var(--green-glow), 0 0 40px var(--green-glow), 0 0 80px rgba(76,175,80,0.2); }
  to   { text-shadow: 0 0 30px var(--green-glow-strong), 0 0 60px var(--green-glow), 0 0 120px rgba(76,175,80,0.3); }
}

/* ── Deep Link Card ── */
.dl-card {
  position: relative;
  z-index: 2;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  text-align: center;
  margin-top: 32px;
  width: 100%;
  animation: cardIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dl-icon {
  margin-bottom: 16px;
}

.dl-card h2 {
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.dl-card .dl-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Code display */
.code-block {
  background: var(--bg-primary);
  border: 2px solid rgba(76, 175, 80, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 24px;
}

.code-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.code-value {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  margin-right: -0.4em;
}

.code-value.game-code {
  color: var(--green);
  text-shadow: 0 0 16px var(--green-glow);
}

.code-value.friend-code {
  color: var(--blue);
  text-shadow: 0 0 16px rgba(30, 136, 229, 0.4);
}

.code-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 4px 12px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.2s;
}

.code-copy:hover {
  border-color: var(--green);
  color: var(--green);
}

/* ── Buttons ── */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 24px;
  border: none;
  border-radius: var(--radius-lg);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity 0.15s;
}

.btn:hover::before { opacity: 1; }
.btn:active { transform: scale(0.97); }

.btn-green {
  background: linear-gradient(135deg, var(--green-dark), #2E7D32);
  color: white;
  box-shadow: 0 4px 20px var(--green-glow);
}

.btn-green:hover { box-shadow: 0 6px 30px var(--green-glow-strong); }

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid rgba(255,255,255,0.1);
}

.btn-outline:hover { border-color: var(--green); color: var(--green); }

.btn-black {
  background: #000;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
}

.btn-black:hover { border-color: rgba(255,255,255,0.3); }

.btn-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.btn-row {
  display: flex;
  gap: 10px;
}

.btn-row .btn { flex: 1; }

.store-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── Divider ── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.06);
}

/* ── Footer ── */
.page-footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 32px 24px;
  margin-top: auto;
}

.page-footer p {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.page-footer a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Global Alert Bar ── */
.global-alert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 24px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  position: relative;
  z-index: 200;
  animation: alertPulse 3s ease-in-out infinite;
}

.global-alert.outage {
  background: rgba(229, 57, 53, 0.15);
  border-bottom: 1px solid rgba(229, 57, 53, 0.3);
  color: #E53935;
}

.global-alert.degraded {
  background: rgba(255, 111, 0, 0.1);
  border-bottom: 1px solid rgba(255, 111, 0, 0.25);
  color: #FF6F00;
}

.global-alert-link {
  font-size: 0.7rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  opacity: 0.8;
}

.global-alert.maintenance {
  display: block;
  background: rgba(30, 136, 229, 0.1);
  border-bottom: 1px solid rgba(30, 136, 229, 0.25);
  color: #1E88E5;
  animation: none;
}

.global-alert.outage .global-alert-link { color: #E53935; }
.global-alert.degraded .global-alert-link { color: #FF6F00; }
.global-alert.maintenance .global-alert-link { color: #1E88E5; }

@keyframes alertPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

/* Push lang toggle down when alert is visible */
body.has-alert .lang-toggle {
  top: 52px;
}

@media (min-width: 768px) {
  .global-alert {
    font-size: 0.8rem;
    padding: 12px 32px;
  }
}

/* ── Language Toggle ── */
.lang-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  display: flex;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.lang-btn {
  padding: 6px 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.lang-btn.active {
  background: var(--green-dark);
  color: var(--green-light);
}

/* ═══════════════════════════════════════════════════
   HOME PAGE — Hero / Promotional
   ═══════════════════════════════════════════════════ */

.hero-section {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-top: 24px;
  margin-bottom: 40px;
}

.hero-section h2 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.hero-section p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 340px;
  margin: 0 auto;
}

.features-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 40px;
  margin-bottom: 20px;
  width: 100%;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-md);
  padding: 20px 14px;
  text-align: center;
  transition: all 0.3s;
}

.feature-card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.feature-icon { font-size: 1.8rem; margin-bottom: 8px; display: block; }

.feature-card h3 {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 4px;
}

.feature-card p {
  font-size: 0.7rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ═════════════════════════════��═════════════════════
   WHY HIDE Section
   ═══════════════════════════════════════════════════ */

.why-section {
  position: relative;
  z-index: 2;
  margin-top: 40px;
  margin-bottom: 20px;
}

.why-section h2 {
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 20px;
}

.why-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 10px;
  transition: border-color 0.3s;
}

.why-card:hover {
  border-color: rgba(76, 175, 80, 0.2);
}

.why-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(76, 175, 80, 0.08);
  border-radius: var(--radius-md);
}

.why-text h3 {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--green);
  margin-bottom: 4px;
}

.why-text p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ── Info chips on deep link pages ── */
.info-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-secondary);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 20px;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.chip-dot.red { background: var(--red); }
.chip-dot.blue { background: var(--blue); }
.chip-dot.green { background: var(--green); }

/* ═══════════════════════════════════════════════════
   RESPONSIVE — Desktop
   ═══════════════════════════════════════════════════ */

/* ── Tablet (768px+) ── */
@media (min-width: 768px) {
  .container {
    max-width: 700px;
  }

  .container.container--narrow {
    max-width: 520px;
  }

  .logo-area {
    padding-top: 80px;
    margin-bottom: 16px;
  }

  .logo-title {
    font-size: 5rem;
  }

  .logo-icon {
    width: 88px;
    height: 88px;
    margin-bottom: 16px;
  }

  .logo-subtitle {
    font-size: 0.8rem;
    letter-spacing: 0.35em;
  }

  .hero-section h2 {
    font-size: 2rem;
  }

  .hero-section p {
    font-size: 1rem;
    max-width: 480px;
  }

  /* Store buttons side by side */
  .btn-stack {
    flex-direction: row;
    max-width: 420px;
    margin: 0 auto;
  }

  .btn-stack .btn {
    flex: 1;
  }

  /* Features 4 columns */
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 48px;
  }

  .feature-card {
    padding: 24px 16px;
  }

  .feature-card h3 {
    font-size: 0.75rem;
  }

  .feature-card p {
    font-size: 0.72rem;
  }

  /* Why HIDE — horizontal layout */
  .why-section {
    margin-top: 56px;
  }

  .why-section h2 {
    font-size: 1.4rem;
    margin-bottom: 24px;
  }

  .why-cards-row {
    display: flex;
    gap: 14px;
    margin-bottom: 14px;
  }

  .why-cards-row:last-child {
    margin-bottom: 0;
  }

  .why-cards-row .why-card {
    flex: 1;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 20px;
    margin-bottom: 0;
  }

  .why-cards-row .why-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 12px;
  }

  .why-cards-row .why-text h3 {
    font-size: 0.9rem;
    margin-bottom: 6px;
  }

  .why-cards-row .why-text p {
    font-size: 0.8rem;
  }

  /* Deep link card — centered with breathing room */
  .dl-card {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    padding: 40px 36px;
  }

  .dl-card h2 {
    font-size: 1.3rem;
  }

  .code-value {
    font-size: 2.8rem;
  }

  /* Footer wider */
  .page-footer {
    padding: 40px 32px;
  }

  .page-footer p {
    font-size: 0.75rem;
  }

  /* Radar bigger on desktop */
  .radar-bg {
    width: 800px;
    height: 800px;
  }
}

/* ── Desktop (1024px+) ── */
@media (min-width: 1024px) {
  .container {
    max-width: 960px;
  }

  .container.container--narrow {
    max-width: 560px;
  }

  .logo-area {
    padding-top: 100px;
    margin-bottom: 20px;
  }

  .logo-title {
    font-size: 6rem;
  }

  .logo-icon {
    width: 100px;
    height: 100px;
  }

  .logo-subtitle {
    font-size: 0.85rem;
    margin-top: 4px;
  }

  .hero-section {
    margin-top: 28px;
    margin-bottom: 48px;
  }

  .hero-section h2 {
    font-size: 2.4rem;
  }

  .hero-section p {
    font-size: 1.05rem;
    max-width: 540px;
  }

  .features-grid {
    gap: 20px;
    margin-top: 56px;
  }

  .feature-card {
    padding: 28px 20px;
  }

  .feature-icon svg {
    width: 36px;
    height: 36px;
  }

  .feature-card h3 {
    font-size: 0.8rem;
    margin-bottom: 6px;
  }

  .feature-card p {
    font-size: 0.78rem;
    line-height: 1.6;
  }

  .why-section {
    margin-top: 64px;
  }

  .why-cards-row .why-card {
    padding: 32px 24px;
  }

  .why-cards-row .why-text h3 {
    font-size: 0.95rem;
  }

  .why-cards-row .why-text p {
    font-size: 0.85rem;
  }

  .dl-card {
    max-width: 520px;
    padding: 48px 44px;
  }
}

/* ── Wide desktop (1280px+) ── */
@media (min-width: 1280px) {
  .container {
    max-width: 1080px;
  }

  .logo-title {
    font-size: 7rem;
  }

  .logo-icon {
    width: 110px;
    height: 110px;
  }

  .hero-section h2 {
    font-size: 2.8rem;
  }

  .hero-section p {
    font-size: 1.1rem;
    max-width: 600px;
  }

  .radar-bg {
    width: 1000px;
    height: 1000px;
  }
}

/* ── Small mobile ── */
@media (max-width: 360px) {
  .logo-title { font-size: 2.8rem; }
  .code-value { font-size: 1.8rem; }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 4px; }

::selection { background: var(--green-dark); color: var(--green-light); }

/* ── Animations ── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in { animation: fadeIn 0.6s ease; }

/* Loading state while trying to open app */
.opening-app {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  margin-bottom: 16px;
  background: rgba(76, 175, 80, 0.08);
  border: 1px solid rgba(76, 175, 80, 0.15);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  color: var(--green);
}

.opening-app.active { display: flex; }

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(76, 175, 80, 0.2);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.spinner-lg {
  width: 32px;
  height: 32px;
  border-width: 3px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════
   PASSWORD RESET PAGE
   ═══════════════════════════════════════════════════ */

.reset-state {
  animation: cardIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-group {
  text-align: left;
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.input-wrapper {
  position: relative;
}

.input-wrapper input {
  width: 100%;
  padding: 14px 48px 14px 16px;
  background: var(--bg-input);
  border: 2px solid var(--bg-elevated);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.input-wrapper input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow);
}

.toggle-vis {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  transition: color 0.15s;
}

.toggle-vis:hover {
  color: var(--text-secondary);
}

.password-strength {
  height: 3px;
  background: var(--bg-elevated);
  border-radius: 3px;
  margin-top: 8px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0;
  border-radius: 3px;
  transition: width 0.3s, background 0.3s;
}

.input-hint {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.input-error {
  color: var(--red) !important;
}

#resetForm .btn {
  margin-top: 8px;
}

#resetForm .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
