/**
 * StadiumAura — Taraftarın Dijital Mabedi
 * Dynamic Stadium & Team Theme Engine CSS
 */

:root {
  /* Default fallbacks if no team is selected */
  --tp: #d4a73a;
  --tp-rgb: 212, 167, 58;
  --ts: #0b1020;
  --ts-rgb: 11, 16, 32;
  --ta: #f6d77c;
  --ta-rgb: 246, 215, 124;
  --hl: #d4a73a;
  --hl-rgb: 212, 167, 58;
  --on-hl: #000000;
  --on-tp: #000000;
  --overlay: 0.55;
  --stadium: url('../img/stadiums/stadium-1.jpg');

  /* Core layout & colors */
  --bg-deep: #05070d;
  --bg-card: rgba(14, 20, 36, 0.7);
  --bg-card-solid: #0e1424;
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-team: rgba(var(--tp-rgb), 0.35);
  --text-main: #f0f3fa;
  --text-muted: #8e9bb5;
  --text-dim: #5c6882;
  --danger: #ef4444;
  --success: #10b981;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --max-w: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Background Atmosphere & Glow */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 600px;
  background: radial-gradient(circle at 50% -10%, rgba(var(--tp-rgb), 0.22) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(5, 7, 13, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  transition: all var(--transition);
}

.header-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-name {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #fff;
  text-transform: uppercase;
}

.brand-name span {
  color: var(--tp);
}

/* Nav links */
.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--tp);
}

/* Sanctuary Switcher Button */
.sanctuary-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(var(--tp-rgb), 0.12);
  border: 1px solid var(--border-team);
  padding: 6px 14px;
  border-radius: 30px;
  cursor: pointer;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  transition: all var(--transition);
  text-decoration: none;
}

.sanctuary-badge:hover {
  background: rgba(var(--tp-rgb), 0.22);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(var(--tp-rgb), 0.25);
}

.crest {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  background: var(--c1, #333);
  color: var(--ct, #fff);
  border: 1.5px solid var(--c2, #fff);
  overflow: hidden;
}

.crest.has-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.crest-lg {
  width: 56px;
  height: 56px;
  font-size: 1.1rem;
}

.crest-sm {
  width: 20px;
  height: 20px;
  font-size: 0.55rem;
}

/* User & Lang controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-picker {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.lang-picker a {
  padding: 4px 8px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 4px;
  transition: all var(--transition);
}

.lang-picker a.active {
  background: var(--tp);
  color: var(--on-tp);
}

/* HERO SECTION: The Digital Sanctuary */
.sanctuary-hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  padding: 48px 0 64px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-glass);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-image: var(--stadium);
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: transform 8s ease-out;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(5, 7, 13, 0.4) 0%,
    rgba(5, 7, 13, var(--overlay)) 50%,
    var(--bg-deep) 100%
  );
  z-index: 2;
}

.hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 60%,
    rgba(var(--tp-rgb), 0.35) 0%,
    transparent 75%
  );
  mix-blend-mode: screen;
  z-index: 3;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(var(--tp-rgb), 0.2);
  border: 1px solid var(--border-team);
  color: var(--ta);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 900;
  line-height: 1.05;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.8);
}

.hero-motto {
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-style: italic;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 0 24px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.hero-meta-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--text-main);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(14, 20, 36, 0.6);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-glass);
}

/* Countdown to Next Match Card */
.countdown-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-team);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(var(--tp-rgb), 0.15);
  margin-top: -40px;
  position: relative;
  z-index: 20;
}

.countdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 14px;
}

.countdown-badge {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--tp);
  text-transform: uppercase;
}

.match-teams-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  text-align: center;
  margin-bottom: 24px;
}

.team-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.team-block .name {
  font-size: 1.15rem;
  font-weight: 800;
}

.match-vs-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.match-vs-divider .vs {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--tp);
  letter-spacing: 0.05em;
}

.timer-boxes {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.timer-box {
  background: rgba(5, 7, 13, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  min-width: 75px;
  text-align: center;
}

.timer-box .val {
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.timer-box .lbl {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-top: 4px;
}

/* Sections & Layout */
.page-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 24px;
  width: 100%;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title span {
  color: var(--tp);
}

/* Match & News Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.news-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-main);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-team);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.news-thumb {
  height: 180px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-surface);
  position: relative;
}

.news-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.35;
}

.news-excerpt {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 14px;
  flex: 1;
}

/* Fan Pulse (Poll) Card */
.poll-card {
  background: linear-gradient(135deg, rgba(var(--tp-rgb), 0.08), rgba(14, 20, 36, 0.7));
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-team);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 40px 0;
}

.poll-question {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 20px;
}

.poll-option-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 18px;
  background: rgba(5, 7, 13, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 10px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  text-align: left;
}

.poll-option-btn:hover {
  border-color: var(--tp);
  background: rgba(var(--tp-rgb), 0.15);
}

.poll-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  background: rgba(var(--tp-rgb), 0.25);
  border-right: 2px solid var(--tp);
  pointer-events: none;
  transition: width 1s ease-out;
}

/* Digital Fan Card (Carnet) */
.fancard-preview-wrap {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

.fancard-ui {
  width: 440px;
  height: 270px;
  border-radius: 20px;
  background: radial-gradient(circle at 80% 20%, rgba(var(--tp-rgb), 0.4), transparent 60%), linear-gradient(135deg, #0b0e17 0%, var(--ts) 100%);
  border: 2px solid var(--tp);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(var(--tp-rgb), 0.3);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  color: #fff;
}

.fancard-ui::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: 0.3;
  pointer-events: none;
}

.fancard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.fancard-chip {
  width: 40px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, #d4a73a, #f6d77c);
  border: 1px solid rgba(0, 0, 0, 0.3);
}

.fancard-user {
  position: relative;
  z-index: 2;
}

.fancard-name {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.fancard-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
}

/* Sanctuary Picker Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.9);
}

.modal-head {
  padding: 20px 28px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 24px 28px;
  overflow-y: auto;
}

.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.team-card-select {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  text-decoration: none;
  color: var(--text-main);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.team-card-select:hover {
  background: rgba(var(--tp-rgb), 0.1);
  border-color: var(--tp);
  transform: translateY(-3px);
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-glass);
  background: rgba(5, 7, 13, 0.95);
  padding: 48px 0 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* Responsive */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 6px;
}

@media (max-width: 860px) {
  .site-nav {
    display: none;
  }
  .mobile-nav-toggle {
    display: block;
  }
  .countdown-card {
    margin-top: 0;
  }
  .timer-boxes {
    gap: 6px;
  }
  .timer-box {
    min-width: 60px;
    padding: 8px 10px;
  }
  .timer-box .val {
    font-size: 1.4rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Social Login & Auth Enhancements */
.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: 1px solid var(--border-glass);
}
.btn-social-google {
  background: #ffffff;
  color: #1f1f1f;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.btn-social-google:hover {
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
  color: #000000;
}
.btn-social-instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(220, 39, 67, 0.35);
  border: none;
}
.btn-social-instagram:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 39, 67, 0.5);
  color: #ffffff;
}
.auth-divider {
  display: flex;
  align-items: center;
  margin: 22px 0;
  gap: 14px;
  color: var(--text-dim);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-glass);
}

/* Form Fields & Modern Dark Glass Inputs */
.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
  text-align: left;
}
.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100% !important;
  display: block !important;
  padding: 13px 16px !important;
  background: rgba(10, 15, 28, 0.85) !important;
  border: 1px solid var(--border-glass) !important;
  border-radius: var(--radius-sm) !important;
  color: #f0f3fa !important;
  font-size: 0.95rem !important;
  font-family: inherit !important;
  transition: all var(--transition) !important;
  outline: none !important;
  box-sizing: border-box !important;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--tp) !important;
  box-shadow: 0 0 0 3px rgba(var(--tp-rgb), 0.25) !important;
  background: rgba(14, 20, 36, 0.98) !important;
}
.field select option {
  background: #0e1424;
  color: #ffffff;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}


