:root {
  --bg: #0b0f19;
  --panel: #181b22;
  --text-light: #f1f5f9;
  --text-dark: #a8b3c7;
  --accent: #f7e27a;
  --accent-hover: #ffe999;
  --accent-muted: rgba(247, 226, 122, 0.15);
  --accent-glow: rgba(247, 226, 122, 0.4);
  --btn-text: #0b0f19;
  --border: #2a3040;
  --radius: 16px;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.theme-emerald {
  --accent: #10b981;
  --accent-hover: #34d399;
  --accent-muted: rgba(16, 185, 129, 0.15);
  --accent-glow: rgba(16, 185, 129, 0.45);
  --btn-text: #ffffff;
}

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

html,
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-light);
  line-height: 1.6;
  min-height: 100%;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-text-size-adjust: 100%;
}

.redirect-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  text-align: center;
  padding: 24px 16px 32px;
  transition: opacity 0.8s ease-in-out;
  opacity: 1;
}

.redirect-page.fade-out {
  opacity: 0;
}

.redirect-logo {
  width: min(180px, 72vw);
  max-height: 72px;
  height: auto;
  margin-bottom: 24px;
  animation: fadeIn 0.8s ease-in-out;
  filter: drop-shadow(0 0 10px var(--accent-glow));
  object-fit: contain;
}

.redirect-logo--wide {
  width: min(240px, 88vw);
  max-height: 64px;
}

.redirect-dialog {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  max-width: 420px;
  width: 100%;
  animation: pop 0.45s ease-in-out;
}

.redirect-dialog h1 {
  font-size: clamp(1.15rem, 4.5vw, 1.55rem);
  color: var(--accent);
  margin-bottom: 10px;
  line-height: 1.35;
}

.redirect-dialog p {
  font-size: clamp(0.88rem, 3.5vw, 0.95rem);
  color: var(--text-dark);
  margin-bottom: 10px;
}

.redirect-dialog strong {
  color: var(--accent);
}

.loader {
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  margin: 16px auto 12px;
  animation: spin 0.9s linear infinite;
}

.countdown {
  font-size: 0.88rem;
  color: var(--accent);
  margin: 4px 0 16px;
  font-weight: 600;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 12px 22px;
  width: 100%;
  max-width: 100%;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 78%, #000));
  color: var(--btn-text);
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 16px var(--accent-muted);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.cta-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 6px 20px var(--accent-muted);
}

.help-links {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.help-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: #1b2333;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 10px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  transition: background 0.25s ease, border-color 0.25s ease;
  min-height: 42px;
  text-decoration: none;
  text-align: center;
  line-height: 1.2;
}

.help-links a:hover {
  background: #2a344a;
  border-color: rgba(255, 255, 255, 0.14);
}

.help-links img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

@media (max-width: 380px) {
  .redirect-page {
    padding: 18px 12px 28px;
  }

  .redirect-dialog {
    padding: 22px 16px;
  }

  .help-links {
    grid-template-columns: 1fr;
  }
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.94);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}
