:root {
  --red: #ec3750;
  --red-hover: #ff476f;
  --radius: 12px;
  --bg-color: #ffffff;
  --text-color: #000000;
  --gray: #4b5563;
  --accent: #338eda;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #0b0c10;
    --text-color: #ffffff;
    --gray: #9ca3af;
  }
}

body.light-theme {
  --bg-color: #ffffff;
  --text-color: #000000;
  --gray: #4b5563;
}

body.dark-theme {
  --bg-color: #0b0c10;
  --text-color: #ffffff;
  --gray: #9ca3af;
}

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

body {
  font-family: 'Fira Code', monospace;
  background-color: var(--bg-color);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2rem);
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 500px;
  text-align: center;
  animation: fadeIn 0.8s ease-in-out;
  transition: transform 0.2s ease-in-out;
  padding-inline: 1rem;
}

.container:hover {
  transform: scale(1.01);
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

h1 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  color: var(--red);
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, var(--red), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 3s linear infinite;
}

@keyframes shine {
  0% { background-position: -200%; }
  100% { background-position: 200%; }
}

p.tagline {
  font-size: clamp(1rem, 3.5vw, 1.2rem);
  color: var(--gray);
  margin-bottom: 2rem;
}

.link-button {
  display: block;
  background-color: var(--red);
  color: white;
  padding: 1rem;
  margin: 0.75rem 0;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease;
}

.link-button:hover {
  background-color: var(--red-hover);
  transform: scale(1.04);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.footer {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--gray);
  animation: fadeIn 1.2s ease-in-out;
}

#theme-toggle {
  position: fixed;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray);
  z-index: 1000;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#theme-toggle svg {
  width: 24px;
  height: 24px;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-position: under;
  transition: text-decoration-style 0.2s ease;
}

a:hover,
a:focus {
  text-decoration-style: wavy;
}

#base-modal {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

#base-modal .content {
  background: var(--bg-color);
  color: var(--text-color);
  max-width: 600px;
  width: 100%;
  padding: 1.5rem;
  border-radius: var(--radius);
  overflow-y: auto;
  max-height: 90vh;
  position: relative;
}

.modal-section {
  display: none;
}

.faq-close-btn {
  display: block;
  background-color: var(--red);
  color: white;
  padding: 1rem;
  margin: 1rem 0 0 0;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
}

.faq-close-btn:hover {
  background-color: var(--red-hover);
  transform: scale(1.04);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.faq-close-btn:active {
  transform: scale(0.98);
}

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

.team-card {
  background: rgba(0, 0, 0, 0.04);
  padding: 1rem;
  border-radius: var(--radius);
}

.dark-theme .team-card {
  background: rgba(255, 255, 255, 0.06);
}

.team-card h3 {
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.team-card .name {
  font-weight: 600;
  color: var(--gray);
}

@media (max-width: 480px) {
  .link-button {
    font-size: 0.95rem;
    padding: 0.85rem;
  }

  #theme-toggle {
    top: 8px;
    right: 8px;
  }

  .faq-close-btn {
    font-size: 0.95rem;
  }

  a[href*="flag-orpheus-top.svg"] img {
    width: 180px !important;
    top: 5px !important;
  }
}

#flag-link {
  position: absolute;
  top: 0;
  left: 10px;
  z-index: 999;
}

#flag-link img {
  width: 220px;
  max-width: 90vw;
  height: auto;
  border: 0;
}

@media (max-width: 900px) {
  #flag-link {
    position: relative;
    display: block;
    margin-bottom: 1.25rem;
    top: auto;
    left: auto;
    text-align: center;
  }

  #flag-link img {
    width: 160px;
    margin: 0 auto;
  }
}
