/* CSS Reset & Variables */
:root {
  --bg-color: #000000;
  --card-bg: #0a0a0a;
  --modal-bg: #141414;
  --brand-orange: #ffa31a;
  --brand-orange-hover: #ffb74d;
  --text-white: #ffffff;
  --text-muted: #a6a6a6;
  --text-dim: #707070;
  --border-muted: #3a3a3a;
  --border-subtle: #242424;
  --btn-border: #444444;
  --btn-border-hover: #737373;
  --btn-bg: #000000;
  --btn-bg-hover: #121212;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --transition-fast: 0.18s ease;
  --transition-smooth: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-color);
  color: var(--text-white);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem 1rem;
  position: relative;
}

/* Ambient glow subtle background effect */
.ambient-glow {
  position: fixed;
  top: 15%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 650px;
  height: 450px;
  background: radial-gradient(circle, rgba(255, 163, 26, 0.035) 0%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* Main Gate Container */
.gate-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto;
}

/* Top bar with Language Selector */
.gate-header {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  margin-bottom: 2rem;
  padding-left: 0.5rem;
}

.lang-selector-wrapper {
  position: relative;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #d1d1d1;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-white);
  border-color: rgba(255, 255, 255, 0.3);
}

.globe-icon {
  width: 16px;
  height: 16px;
  color: #b0b0b0;
}

.chevron-icon {
  width: 14px;
  height: 14px;
  color: #888888;
  transition: transform var(--transition-fast);
}

.lang-selector-wrapper.open .chevron-icon {
  transform: rotate(180deg);
}

/* Language Dropdown Menu */
.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 160px;
  background: #141414;
  border: 1px solid #333333;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
  display: none;
  flex-direction: column;
  padding: 0.4rem;
  z-index: 50;
  animation: dropdownSlide 0.15s ease-out;
}

@keyframes dropdownSlide {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lang-selector-wrapper.open .lang-dropdown {
  display: flex;
}

.lang-option {
  background: none;
  border: none;
  color: #cfcfcf;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.lang-option:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.lang-option.active {
  color: var(--brand-orange);
  font-weight: 600;
}

/* Center Gate Card */
.gate-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem 0;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Logo */
.logo-container {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.75rem;
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  user-select: none;
}

.logo-text-left {
  color: #ffffff;
  margin-right: 3px;
}

.logo-badge {
  background-color: var(--brand-orange);
  color: #000000;
  padding: 0.1rem 0.55rem 0.15rem 0.55rem;
  border-radius: 5px;
  font-size: 2.6rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  line-height: 1.05;
}

/* Heading */
.gate-title {
  font-size: 2.15rem;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.025em;
  margin-bottom: 1.35rem;
}

/* Notice to Users Pill */
.notice-pill-container {
  margin-bottom: 1.5rem;
}

.pill-badge {
  background: transparent;
  color: #d1d1d1;
  border: 1px solid var(--border-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 1.4rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pill-badge:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #666666;
  color: #ffffff;
}

/* Disclaimer text */
.gate-description {
  color: var(--text-muted);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.65;
  max-width: 610px;
  margin: 0 auto 1.5rem auto;
  text-wrap: pretty;
}

/* Law Enforcement Notice */
.law-notice-container {
  margin-bottom: 2.25rem;
}

.law-link {
  color: var(--brand-orange);
  font-size: 1.025rem;
  font-weight: 700;
  text-decoration: none;
  position: relative;
  transition: color var(--transition-fast), filter var(--transition-fast);
}

.law-link:hover {
  color: var(--brand-orange-hover);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Action Buttons Group */
.action-buttons-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  max-width: 380px;
  margin-bottom: 2.25rem;
}

.action-btn {
  position: relative;
  width: 100%;
  background: var(--btn-bg);
  color: var(--text-white);
  border: 1px solid var(--btn-border);
  border-radius: 9999px;
  padding: 0.95rem 1.75rem;
  font-family: inherit;
  font-size: 1.025rem;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-smooth);
}

.action-btn:hover {
  border-color: var(--btn-border-hover);
  background: var(--btn-bg-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.action-btn:active {
  transform: translateY(1px);
}

/* Enter button specific subtle accents */
.btn-enter:hover {
  border-color: rgba(255, 163, 26, 0.6);
  box-shadow: 0 0 20px rgba(255, 163, 26, 0.15);
}

/* Exit button */
.btn-exit {
  color: #dfdfdf;
}

.btn-exit:hover {
  color: #ffffff;
  border-color: #666;
}

/* Parental Controls Detailed Section */
.parental-detailed-section {
  width: 100%;
  max-width: 620px;
  margin-top: 1rem;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  text-align: center;
}

.parental-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

/* Terms and Wellness Section */
.terms-wellness-section {
  width: 100%;
  max-width: 620px;
  margin-bottom: 3.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.terms-heading {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.terms-heading .orange-link {
  font-weight: 700;
  font-size: 1.15rem;
}

.section-desc {
  font-size: 0.975rem;
  line-height: 1.6;
  color: #e0e0e0;
  margin: 0;
  text-wrap: pretty;
}

/* Universal Orange Links */
.orange-link {
  color: var(--brand-orange);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-fast), text-decoration var(--transition-fast);
}

.orange-link:hover {
  color: var(--brand-orange-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Gate Bottom Footer & RTA Logo */
.gate-bottom-footer {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem 0 2rem 0;
}

.footer-brand-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
}

.copyright-label {
  color: #888888;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.rta-logo-box {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.rta-svg {
  width: 76px;
  height: 24px;
  display: block;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-window {
  background: var(--modal-bg);
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  width: 100%;
  max-width: 520px;
  padding: 1.75rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  transform: translateY(12px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-overlay.active .modal-window {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #242424;
  padding-bottom: 0.85rem;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.modal-close {
  background: transparent;
  border: none;
  color: #888888;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.modal-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.modal-body {
  color: #b5b5b5;
  font-size: 0.95rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.law-contact-box {
  background: #090909;
  border: 1px solid #242424;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  color: #e0e0e0;
  font-size: 0.9rem;
}

.filter-tools-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.tool-item {
  background: #090909;
  border: 1px solid #242424;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tool-item strong {
  color: var(--brand-orange);
  font-size: 0.95rem;
}

.tool-item span {
  font-size: 0.85rem;
  color: #a0a0a0;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #242424;
  padding-top: 1rem;
}

.close-pill-btn {
  background: #202020;
  border-color: #383838;
}

.close-pill-btn:hover {
  background: #2b2b2b;
}

/* Responsiveness */
@media (max-width: 640px) {
  .logo-container {
    font-size: 2.25rem;
  }

  .logo-badge {
    font-size: 2.15rem;
  }

  .gate-title {
    font-size: 1.7rem;
  }

  .gate-description {
    font-size: 0.975rem;
  }

  .action-buttons-group {
    max-width: 100%;
    padding: 0 0.5rem;
  }

  .gate-header {
    margin-bottom: 1.25rem;
  }
}
