@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap");

:root {
  --bs-body-font-family: "Montserrat", sans-serif;
  --neon-green: #00FF99;
  --neon-green-dark: #00CC7A;
  --dark-bg: #161616;
  --card-bg: #1e1e1e;
  --text-primary: #EEECE5;
  --border-color: rgba(255, 255, 255, 0.08);
  --shadow-main: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 255, 153, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --my-gray-color: #232323;
  --my-border-alpha: rgba(255, 255, 255, 0.08);
  --my-heading-color: #EEECE5;
  --my-alpha-gray-color: rgba(255, 255, 255, 0.5);
  --my-dropdown-link-hover-bg: rgba(255, 255, 255, 0.05);
}

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

.redirect-page body {
  background: linear-gradient(135deg, var(--dark-bg) 0%, var(--card-bg) 100%);
  color: var(--text-primary);
  font-family: var(--bs-body-font-family);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 1rem 1rem;
  min-height: 100vh;
}

.redirect-page .container {
  max-width: 420px;
  width: 100%;
  text-align: center;
  background: linear-gradient(145deg, #111111 0%, var(--card-bg) 100%);
  border-radius: 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-main);
  padding: 1.25rem 2rem 2.5rem;
}

.logo-block {
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-block .logo {
  width: 48px;
  height: auto;
  max-height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(0, 255, 153, 0.3));
}

.bi { fill: currentColor; }

/* Device / Language dropdowns */
.redirect-page .my-dropdown .dropdown-menu {
  background-color: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.5rem;
  border: 1px solid var(--my-border-alpha);
  border-radius: 12px;
}

.redirect-page .my-dropdown .dropdown-item {
  font-size: 0.875rem;
  padding: 0.75rem 1rem;
  margin: 0.125rem 0;
  display: flex;
  align-items: center;
  border-radius: 12px;
}

.redirect-page .my-nav-outline {
  font-size: 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
}

.redirect-page .my-nav-outline:hover,
.redirect-page .my-nav-outline.show {
  background-color: rgba(40, 40, 40, 0.6);
  border-color: rgba(0, 255, 153, 0.4);
  color: rgba(255, 255, 255, 0.9);
}

.redirect-page .my-dropdown .dropdown-item:hover {
  background: rgba(50, 50, 50, 0.6);
  color: rgba(255, 255, 255, 0.9);
}

.redirect-page .my-dropdown .dropdown-item.active {
  background: rgba(0, 255, 153, 0.15);
  color: rgba(255, 255, 255, 0.95);
}

.redirect-page .my-dropdown-item-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.6);
  margin-right: 0.75rem;
}

.redirect-page .my-dropdown .dropdown-item.active .my-dropdown-item-icon {
  color: rgba(0, 255, 153, 0.9);
}

.redirect-page .my-dropdown-item-check {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: rgba(0, 255, 153, 0.9);
  margin-left: auto;
}

.redirect-page .my-dropdown .dropdown-item .my-dropdown-item-check {
  display: none;
}

.redirect-page .my-dropdown .dropdown-item.active .my-dropdown-item-check {
  display: block;
}

.redirect-page .my-nav-link-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.7);
  margin-right: 0.5rem;
}

/* Download button (green link) */
.download-btn {
  display: block;
  color: #00FF99;
  text-decoration: none;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border: 2px solid rgba(0, 255, 153, 0.4);
  border-radius: 0.5rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(0, 255, 153, 0.05) 0%, rgba(0, 204, 122, 0.03) 100%);
  box-shadow: 0 2px 8px rgba(0, 255, 153, 0.15);
  transition: all 0.3s ease;
}

.download-btn:hover {
  background: linear-gradient(135deg, rgba(0, 255, 153, 0.15) 0%, rgba(0, 204, 122, 0.1) 100%);
  border-color: #00FF99;
  box-shadow: 0 4px 16px rgba(0, 255, 153, 0.3);
  color: #00FF99;
}

/* TV form */
.tv-form-wrapper strong {
  font-weight: 700;
  color: #00FF99;
}

.tv-code-container {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.tv-code-digit {
  font-family: var(--bs-body-font-family);
  width: 3.5rem;
  height: 3.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  border: 2px solid rgba(0, 255, 153, 0.3);
  border-radius: 0.75rem;
  background: linear-gradient(90deg, #111 80%, #161616 100%);
  color: #00FF99;
  outline: none;
  transition: all 0.2s ease;
}

.tv-code-digit:focus {
  border-color: #00FF99;
  box-shadow: 0 0 15px rgba(0, 255, 153, 0.3);
}

@media (max-width: 480px) {
  .tv-code-digit {
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
  }
  .tv-code-container { gap: 0.375rem; }
}

/* Кнопка «Отправить» в неактивной фазе — outline-стиль, аккуратно */
#btn-send-tv:disabled {
  opacity: 1;
  cursor: not-allowed;
  background: rgba(0, 255, 153, 0.06) !important;
  color: rgba(0, 255, 153, 0.55) !important;
  border: 2px solid rgba(0, 255, 153, 0.35);
  box-shadow: 0 2px 12px rgba(0, 255, 153, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#btn-send-tv:hover:not(:disabled),
#btn-send-tv:focus-visible:not(:disabled) {
  background: linear-gradient(90deg, #00CC7A 0%, #00FF99 100%);
  color: #0a0a0a;
  box-shadow: 0 6px 32px rgba(0, 255, 153, 0.44);
}

/* QR notice */
.qr-notice {
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(0, 255, 153, 0.08);
  border: 1px solid rgba(0, 255, 153, 0.2);
  border-radius: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  line-height: 1.5;
}

/* Buttons */
.redirect-page .btn {
  width: 100%;
  padding: 0.875rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 1.125rem;
  font-family: inherit;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.redirect-page .btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.redirect-page .btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.my-btn-primary {
  background: linear-gradient(90deg, #00FF99 0%, #00CC7A 100%);
  color: #121212;
  box-shadow: 0 4px 24px rgba(0, 255, 153, 0.31), 0 2px 8px #111;
}

.my-btn-primary:hover,
.my-btn-primary:focus {
  background: linear-gradient(90deg, #00CC7A 0%, #00FF99 100%);
  box-shadow: 0 6px 32px rgba(0, 255, 153, 0.44);
  color: #0a0a0a;
  filter: brightness(1.06);
}

/* Support */
.redirect-page .support {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: center;
}

.redirect-page .support-link {
  color: var(--neon-green);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  border-bottom: 1px dashed var(--neon-green-dark);
  padding-bottom: 3px;
  transition: all 0.3s ease;
}

.redirect-page .support-link:hover {
  border-bottom-style: solid;
  border-bottom-color: var(--neon-green);
  color: var(--neon-green);
}

/* Bootstrap overrides for dark theme */
.redirect-page .dropdown-toggle::after { margin-left: 0.5rem; }
.redirect-page .nav-link { color: var(--text-primary); }
