:root {
  --primary: #f97316;
  --primary-hover: #ea580c;
  --primary-light: #fed7aa;
  --primary-glow: rgba(249, 115, 22, 0.22);
  --bg-deep: #080c14;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-inner: rgba(30, 41, 59, 0.55);
  --border-color: rgba(255, 255, 255, 0.09);
  --border-focus: rgba(249, 115, 22, 0.55);
  --text-title: #f8fafc;
  --text-body: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --emergency-bg: rgba(220, 38, 38, 0.08);
  --emergency-border: rgba(239, 68, 68, 0.38);
  --emergency-text: #fca5a5;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html, body {
  min-height: 100%;
  font-family: var(--font-stack);
  background-color: var(--bg-deep);
  color: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Background Gradients */
.page-background {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.radial-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.45;
}

.radial-glow.top-left {
  top: -120px;
  left: -80px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.28) 0%, rgba(249, 115, 22, 0) 70%);
}

.radial-glow.bottom-right {
  bottom: -150px;
  right: -100px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.18) 0%, rgba(14, 165, 233, 0) 70%);
}

/* Container */
.container {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Header */
.header {
  padding: 0.5rem 0;
}

.brand-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.logo-link:hover {
  opacity: 0.9;
}

.brand-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--primary-light);
  letter-spacing: 0.01em;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* Main Hero Card */
.hero-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
}

.hero-badge {
  align-self: flex-start;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--primary);
  background: rgba(249, 115, 22, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.main-heading {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.22;
  color: var(--text-title);
  letter-spacing: -0.02em;
}

.hero-subtext {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-top: -0.75rem;
}

/* Device Detection Banner */
.device-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.12) 0%, rgba(15, 23, 42, 0.6) 100%);
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

.device-banner-icon {
  flex-shrink: 0;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.device-banner-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.device-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary-light);
  letter-spacing: 0.05em;
}

.device-banner-text p {
  font-size: 0.9375rem;
  color: var(--text-title);
  margin: 0;
}

/* Status Box */
.status-box {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.status-box-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-title);
  font-size: 0.9375rem;
}

.info-icon {
  color: var(--primary);
  flex-shrink: 0;
}

.status-box p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

/* Platforms Section */
.platforms-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-title);
}

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

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

/* Platform Card */
.platform-card {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  transition: all 0.25s ease;
  position: relative;
}

.platform-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Highlighted detected device */
.platform-card.detected {
  border-color: var(--border-focus);
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.08) 0%, var(--bg-card-inner) 100%);
  box-shadow: 0 0 25px rgba(249, 115, 22, 0.12);
}

.platform-card.detected::after {
  content: "Detected Device";
  position: absolute;
  top: -10px;
  right: 14px;
  background: var(--primary);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  letter-spacing: 0.04em;
}

.platform-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.platform-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-title);
}

.android-icon { color: #34d399; }
.ios-icon { color: #38bdf8; }
.desktop-icon { color: #fb923c; }

.platform-meta {
  display: flex;
  flex-direction: column;
}

.platform-name {
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--text-title);
}

.platform-method {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.platform-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex-grow: 1;
}

.platform-desc strong {
  color: var(--text-title);
}

.action-wrap {
  margin-top: 0.5rem;
}

.platform-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-body);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.platform-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text-title);
}

.platform-btn.active-ready {
  background: var(--primary);
  border-color: var(--primary-hover);
  color: #fff;
}

.platform-btn.active-ready:hover {
  background: var(--primary-hover);
}

.btn-badge {
  font-size: 0.6875rem;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.platform-card.detected .btn-badge {
  background: rgba(249, 115, 22, 0.2);
  color: var(--primary-light);
}

/* Action Feedback Toast */
.action-feedback {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-title);
  animation: fade-in 0.2s ease;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Emergency Notice */
.emergency-notice {
  background: var(--emergency-bg);
  border: 1px solid var(--emergency-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.notice-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #ef4444;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.notice-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--emergency-text);
}

.notice-content strong {
  color: #fee2e2;
}

/* Official Links Card */
.official-links-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.links-copy h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-title);
  margin-bottom: 0.25rem;
}

.links-copy p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: linear-gradient(135deg, var(--primary) 0%, #ea580c 100%);
  color: #ffffff;
  padding: 0.85rem 1.4rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.35);
  background: linear-gradient(135deg, #fb923c 0%, var(--primary) 100%);
}

/* Footer */
.footer {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-contacts {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-contacts a {
  color: var(--primary-light);
  text-decoration: none;
}

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

.sep {
  color: var(--text-dim);
}

.footer-note {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: var(--text-dim);
}

.privacy-note {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .container {
    padding: 1.25rem 1rem 2rem;
    gap: 1.5rem;
  }

  .hero-card {
    padding: 1.75rem 1.25rem;
    gap: 1.5rem;
  }

  .main-heading {
    font-size: 1.75rem;
  }

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

  .official-links-card {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary {
    justify-content: center;
  }

  .brand-bar {
    justify-content: center;
  }
}
