:root[data-theme="dark"] {
  --bg-primary: #050505;
  --bg-secondary: rgba(25, 10, 10, 0.6);
  --bg-sidebar: #020202;
  --text-primary: #ffffff;
  --text-secondary: #a3a3a3;
  --border: rgba(220, 38, 38, 0.15);
  --accent: #dc2626; /* Sporty Red */
  --accent-dark: #991b1b;
  --accent-text: #ffffff;
  --overlay: rgba(0, 0, 0, 0.9);
  --bg-gradient: radial-gradient(
    circle at top right,
    #300505 0%,
    #050505 40%,
    #000000 100%
  );
  --sidebar-text: #ffffff;
  --sidebar-text-muted: rgba(255, 255, 255, 0.6);
  --sidebar-hover-bg: rgba(255, 255, 255, 0.05);
  --jersey-texture: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 6px,
    rgba(255, 255, 255, 0.03) 6px,
    rgba(255, 255, 255, 0.03) 7px
  );
  --jersey-texture-red: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 6px,
    rgba(0, 0, 0, 0.06) 6px,
    rgba(0, 0, 0, 0.06) 7px
  );
}

:root[data-theme="light"] {
  --bg-primary: #fcfcfc;
  --bg-secondary: rgba(255, 255, 255, 0.9);
  --bg-sidebar: #ffffff;
  --text-primary: #111111;
  --text-secondary: #4a4a4a;
  --border: rgba(212, 175, 55, 0.3);
  --accent: #d4af37; /* Metallic Gold */
  --accent-dark: #b5952f;
  --accent-text: #111111;
  --overlay: rgba(255, 255, 255, 0.85);
  --bg-gradient: linear-gradient(135deg, #ffffff 0%, #fdfbf7 50%, #f7f3e8 100%);
  --sidebar-text: #111111;
  --sidebar-text-muted: rgba(0, 0, 0, 0.6);
  --sidebar-hover-bg: rgba(0, 0, 0, 0.05);
  --jersey-texture: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 6px,
    rgba(0, 0, 0, 0.03) 6px,
    rgba(0, 0, 0, 0.03) 7px
  );
  --jersey-texture-red: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 6px,
    rgba(0, 0, 0, 0.06) 6px,
    rgba(0, 0, 0, 0.06) 7px
  );
}

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

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-primary);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  display: flex;
  height: 100vh;
  overflow: hidden;
  transition:
    background-color 0.3s,
    color 0.3s,
    background-image 0.3s;
}

/* --- SIDEBAR --- */
.sidebar {
  position: absolute;
  top: 16px;
  left: 16px;
  max-height: calc(100vh - 32px);
  height: calc(100vh - 32px);
  width: 260px;
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 100;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.sidebar:not(.collapsed) {
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}

.sidebar.collapsed {
  width: 72px;
  height: 72px;
  max-height: 72px;
  border-radius: 36px;
  border-color: transparent;
  background-color: transparent;
  box-shadow: none;
}

.sidebar.collapsed .nav-menu,
.sidebar.collapsed .sidebar-footer {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.sidebar.collapsed .logo-text {
  opacity: 0;
  pointer-events: none;
  width: 0;
  display: none;
}

.sidebar-header {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--sidebar-text);
  height: 88px; /* Fixed height to keep it stable */
  box-sizing: border-box;
  transition: all 0.3s;
}

.sidebar.collapsed .sidebar-header {
  padding: 16px;
  height: 72px;
  justify-content: center;
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  padding: 4px;
  object-fit: contain;
  flex-shrink: 0;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.sidebar.collapsed .logo-img {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: scale(1.1);
}

.logo-text {
  font-weight: 800;
  font-size: 16px;
  white-space: nowrap;
}

.nav-menu {
  flex: 1;
  padding: 16px 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: opacity 0.2s;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 12px 24px;
  color: var(--sidebar-text-muted); /* Sidebar items adaptive text */
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
  cursor: pointer;
  border-left: 3px solid transparent;
  white-space: nowrap;
}

.sidebar.collapsed .nav-item {
  padding: 12px 0;
  justify-content: center;
}

.nav-item:hover {
  background-color: var(--sidebar-hover-bg);
  color: var(--sidebar-text);
}

.nav-item.active {
  background-color: var(--accent-dark);
  color: var(--accent-text);
  border-left: 3px solid var(--accent);
}

.nav-icon {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  fill: currentColor;
  flex-shrink: 0;
}

.sidebar.collapsed .nav-icon {
  margin-right: 0;
}

.nav-separator {
  height: 1px;
  background-color: var(--border);
  margin: 16px 24px;
}

.sidebar.collapsed .nav-separator {
  margin: 16px 12px;
}

.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar.collapsed .sidebar-footer {
  padding: 16px 0;
  align-items: center;
}

.toggle-btn {
  background: none;
  border: none;
  color: var(--sidebar-text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  transition: color 0.3s;
}

.toggle-btn:hover {
  color: var(--sidebar-text);
}

.online-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--sidebar-text-muted);
  font-size: 12px;
  font-weight: 600;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.collapse-btn {
  position: absolute;
  right: -12px;
  top: 48px;
  width: 24px;
  height: 24px;
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--sidebar-text-muted);
  z-index: 101;
}

.collapse-btn:hover {
  color: var(--sidebar-text);
  background-color: var(--accent);
  border-color: var(--accent);
}

.sidebar-wrapper {
  position: relative;
  width: 104px; /* Space for folded sidebar + margins */
  flex-shrink: 0;
  z-index: 1000;
}

/* --- MOBILE TOPBAR & DRAWER --- */
.mobile-topbar {
  display: none;
  height: 56px;
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
}

.hamburger {
  background: none;
  border: none;
  color: var(--sidebar-text);
  cursor: pointer;
}

.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 95;
  opacity: 0;
  transition: opacity 0.3s;
}

/* --- MAIN AREA --- */
.main-area {
  flex: 1;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding: 24px;
  background-color: var(--bg-primary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* --- GENERIC --- */
.section-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 24px;
}

.btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition:
    transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    background-color 0.3s,
    border-color 0.3s,
    box-shadow 0.3s;
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  display: inline-block;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background-color: var(--accent);
  color: var(--accent-text);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.btn-primary:hover {
  background-color: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4);
}

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

.btn-outline:hover {
  border-color: var(--text-primary);
  background-color: var(--border);
  transform: translateY(-2px);
}

.pulse-anim {
  animation: pulse-shadow 2s infinite;
}

@keyframes pulse-shadow {
  0% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
  }
}

@keyframes pulse {
  0% {
    opacity: 0.5;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
  100% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- HERO SECTION --- */
.hero {
  height: 420px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px;
  z-index: 1;
}

.hero-slide.active {
  opacity: 1;
  z-index: 2;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  transform: scale(1);
  transition: transform 8s linear;
}

.hero-slide.active .hero-bg {
  transform: scale(1.08);
}

.slide-1 .hero-bg {
  background: url("images/hero-image.png")
    center/cover no-repeat;
}
.slide-2 .hero-bg {
  background: url("images/camisa1.jpg")
    center/cover no-repeat;
}
.slide-3 .hero-bg {
  background: url("images/presidente.jpg")
    center/cover no-repeat;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  z-index: -1;
}

.hero-content {
  color: #fff;
}

.hero-title {
  font-size: 56px;
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: -1px;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.8);
}

.hero-subtitle {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}

.hero-actions {
  display: flex;
  gap: 16px;
}

.hero-indicators {
  position: absolute;
  bottom: 24px;
  right: 40px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: background-color 0.3s;
}

.indicator.active {
  background-color: var(--accent);
}

/* --- STATS SECTION --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  overflow: hidden;
}

.stat-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-card.highlight {
  background-color: var(--accent);
  color: var(--accent-text);
  border: none;
}

.stat-card.highlight .stat-label {
  color: var(--accent-text);
  opacity: 0.8;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* --- NEXT GAME --- */
.next-game-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
}

.match-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  margin-bottom: 32px;
}

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

.team-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 2px solid var(--border);
}

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

.team-logo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e0e0e0 0%, #a0a0a0 100%);
  color: #333;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.5),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2);
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

.team-name {
  font-weight: 800;
  font-size: 16px;
  text-transform: uppercase;
}

.vs {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-secondary);
  font-style: italic;
}

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

.match-date-time {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.match-countdown {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.countdown-val {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
}

.countdown-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 600;
}

.countdown-separator {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.countdown-live {
  font-family: "Oswald", sans-serif;
  color: var(--accent);
  font-size: 24px;
  animation: pulse 1.5s infinite;
  text-transform: uppercase;
}

/* --- PATROCINADORES --- */
.sponsors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 24px;
  align-items: center;
  justify-items: center;
}

.sponsor-card {
  padding: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s;
  height: 100px;
}

.sponsor-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

.sponsor-card img {
  max-width: 100%;
  max-height: 100%;
  opacity: 0.5;
  transition: all 0.3s;
}

.sponsor-card:hover img {
  opacity: 1;
}

/* --- SEJA SOCIO --- */
.socio-banner {
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 100%);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  color: var(--accent-text);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(220, 38, 38, 0.2);
}

.socio-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--jersey-texture-red);
  opacity: 0.5;
  pointer-events: none;
}

.socio-banner-content {
  position: relative;
  z-index: 1;
}

.socio-title {
  font-family: "Oswald", sans-serif;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.socio-text {
  font-size: 16px;
  margin-bottom: 24px;
  max-width: 600px;
  margin-inline: auto;
  opacity: 0.9;
}

.btn-white {
  background: white;
  color: var(--accent-dark);
}

.btn-white:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}


/* --- CALENDAR STYLES --- */
.end-season-banner {
  background-color: var(--accent);
  color: var(--accent-text);
  padding: 24px;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 32px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  animation: soft-pulse 4s infinite alternate;
}

@keyframes soft-pulse {
  0% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  100% {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  }
}

.end-season-banner h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.end-season-banner p {
  font-size: 16px;
  opacity: 0.9;
}

.calendar-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calendar-item {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  padding: 16px 24px;
  transition: transform 0.2s;
}

.calendar-item:hover {
  transform: translateX(8px);
  border-color: var(--accent);
}

.calendar-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  padding-right: 24px;
  border-right: 1px solid var(--border);
}

.calendar-date .day {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.calendar-date .month {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 4px;
}

.calendar-match {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
}

.calendar-match .team {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.calendar-match .team.align-right {
  justify-content: flex-end;
  text-align: right;
}

.calendar-match .team.align-left {
  justify-content: flex-start;
  text-align: left;
}

.match-score {
  font-size: 24px;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 8px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border);
  min-width: 80px;
  text-align: center;
}

.match-score.win {
  color: #4ade80; /* nice green for win */
}

.match-score.draw {
  color: #fbbf24; /* yellow for draw */
}

.match-score.loss {
  color: #f87171; /* red for loss */
}

.mini-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: contain;
  background-color: #fff;
  padding: 4px;
}

.calendar-status {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  min-width: 80px;
  text-align: right;
}

/* --- NEWS --- */
.news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.news-filters {
  display: flex;
  gap: 8px;
}

.filter-btn {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
  background-color: var(--text-primary);
  color: var(--bg-primary);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.news-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.news-img {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0; /* Hide emoji */
  background-size: cover;
  background-position: center;
  position: relative;
}

.news-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

.news-card[data-category="jogos"] .news-img {
  background-image: url("https://images.unsplash.com/photo-1518091043644-c1d44570a2c1?auto=format&fit=crop&w=600&q=80");
}
.news-card[data-category="clube"] .news-img {
  background-image: url("https://images.unsplash.com/photo-1522778119026-d647f0596c20?auto=format&fit=crop&w=600&q=80");
}
.news-card[data-id="1"] .news-img {
  background-image: url("https://images.unsplash.com/photo-1510566337590-2fc1f2110026?auto=format&fit=crop&w=600&q=80");
}
.news-card[data-id="2"] .news-img {
  background-image: url("images/Acordo.png");
}

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

.news-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.news-tag {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
}

.news-card[data-category="jogos"] .news-tag {
  background-color: #333333;
}
.news-card[data-category="clube"] .news-tag {
  background-color: #0055ff;
}
.news-card[data-category="Formação"] .news-tag {
  background-color: #00aa00;
}
.news-card[data-category="Formação"] .news-tag {
  background-color: #00aa00;
}

.news-date {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

.news-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.3;
}

.news-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.news-link {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
}

/* --- GALLERY --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-item {
  aspect-ratio: 4/3;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.gallery-placeholder,
.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-size: cover;
  background-position: center;
}

.gallery-item:nth-child(1) .gallery-placeholder {
  background-image: url("images/cdp1.jpg");
}
.gallery-item:nth-child(2) .gallery-placeholder {
  background-image: url("images/cdp2.jpg");
}
.gallery-item:nth-child(3) .gallery-placeholder {
  background-image: url("images/cdp3.jpg");
}
.gallery-item:nth-child(4) .gallery-placeholder {
  background-image: url("images/cdp4.jpg")
}
.gallery-item:nth-child(5) .gallery-placeholder {
  background-image: url("images/cdp5.jpg");
}
.gallery-item:nth-child(6) .gallery-placeholder {
  background-image: url("images/cdp6.jpg");
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-icon {
  width: 32px;
  height: 32px;
  fill: #fff;
}

/* --- SQUAD (PLANTEL & FORMAÇÃO) --- */
.squad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.player-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
}

.player-img-wrapper {
  position: relative;
  aspect-ratio: 3/4;
  background-color: #eee;
  overflow: hidden;
}

.player-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-stats-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.85);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(2px);
}

.player-card:hover .player-stats-overlay {
  opacity: 1;
}

.player-stat-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 12px;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 6px;
}

.player-stat-label {
  color: var(--accent);
  font-weight: 600;
}

.player-stat-value {
  font-weight: 800;
  color: #fff;
}

.player-number {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: var(--accent);
  color: var(--accent-text);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.player-img-wrapper .player-flag {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 22px !important;
  height: 22px !important;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.3);
  object-fit: cover;
  object-position: center;
  z-index: 10;
}

.player-info {
  padding: 16px;
}

.player-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
  text-transform: capitalize;
}

.player-position {
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
}

.position-title {
  margin-top: 40px;
  margin-bottom: 24px;
  font-size: 24px;
  color: var(--text-primary);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 8px;
  display: inline-block;
}

.formacao-tabs,
.plantel-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.formacao-tab,
.plantel-tab {
  background: none;
  border: 2px solid transparent;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
}

.formacao-tab:hover,
.plantel-tab:hover {
  color: var(--text-primary);
  background-color: var(--border);
}

.formacao-tab.active,
.plantel-tab.active {
  background-color: var(--accent);
  color: var(--accent-text);
}

.formacao-content {
  display: none;
  animation: fadeIn 0.4s ease;
}

.formacao-content.active {
  display: grid;
}

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

/* --- LIGHTBOX --- */
.lightbox {
  position: fixed;
  inset: 0;
  background-color: var(--overlay);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  width: auto;
  height: auto;
  max-width: 100vw;
  max-height: 100vh;
  position: relative;
  background-color: transparent !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  z-index: 1010;
}

.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: #fff;
  font-size: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
  z-index: 1010;
}

.lightbox-btn:hover {
  background: rgba(0, 0, 0, 0.9);
}
.lightbox-prev {
  left: 20px;
}
.lightbox-next {
  right: 20px;
}

/* --- CONTACT --- */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.map-wrapper {
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
  min-height: 300px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

#form-success {
  display: none;
  padding: 12px;
  background-color: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border-radius: 8px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

/* --- FOOTER --- */
.footer {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
  font-size: 12px;
  padding-bottom: 24px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-socials {
  display: flex;
  gap: 16px;
}

.social-link {
  color: var(--text-secondary);
  transition: color 0.3s;
}

.social-link:hover {
  color: var(--text-primary);
}

.social-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* --- POPUP --- */
.popup {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 300px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 900;
  transform: translateY(150%);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.popup.visible {
  transform: translateY(0);
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.popup-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
}

.popup-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
}

.popup-text {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.popup-link {
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar-wrapper {
    display: none;
  }
  .mobile-topbar {
    display: flex;
  }
  .main-area {
    padding-top: 80px;
  }

  .contact-container {
    grid-template-columns: 1fr;
  }
  .footer {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }
  .footer-left {
    flex-direction: column;
  }

  .hero-title {
    font-size: 32px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .news-grid {
    grid-template-columns: 1fr;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .calendar-item {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  .calendar-date {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    width: 100%;
  }
  .calendar-match {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }
  .calendar-match .team {
    flex-direction: column !important;
    justify-content: center !important;
    text-align: center !important;
  }
  .calendar-status {
    text-align: center;
    width: 100%;
  }

  /* Mobile Drawer Styles applied to sidebar when active */
  .sidebar-wrapper.mobile-active {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000; /* Increased z-index to overlay content properly */
    width: 260px;
  }
  .sidebar-wrapper.mobile-active .collapse-btn {
    display: none;
  }
  .sidebar-wrapper.mobile-active .sidebar {
    width: calc(100% - 32px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
  }
  .mobile-overlay.active {
    display: block;
    opacity: 1;
  }
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}

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

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background-color 0.2s;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.9);
}

.modal-body {
  padding: 32px;
}

.modal-img {
  width: 100%;
  height: 300px;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 768px) {
  .modal-content {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
}

/* ================= MELHORIA 1: TEXTURA DE CAMISOLA ================= */
body,
.sidebar,
.stat-card,
.news-card,
.player-card,
.gallery-item,
.next-game-card,
.calendar-item {
  position: relative;
}

body::before,
.sidebar::before,
.hero-slide::before,
.stat-card::before,
.news-card::before,
.player-card::before,
.gallery-item::before,
.next-game-card::before,
.calendar-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--jersey-texture);
  border-radius: inherit;
}

.hero-slide::before,
.end-season-banner::before,
.stat-card.highlight::before,
.btn-primary::before,
.indicator.active::before {
  background-image: var(--jersey-texture-red);
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
}

.stat-card > *:not(::before),
.news-card > *:not(::before),
.player-card > *:not(::before),
.gallery-item > *:not(::before),
.next-game-card > *:not(::before),
.calendar-item > *:not(::before) {
  position: relative;
  z-index: 1;
}

/* ================= MELHORIA 2: TIPOGRAFIA DE ESTÁDIO ================= */
.stat-value,
.match-score,
.team-name,
.vs,
.countdown-val,
.countdown-value,
.score,
.counter-value,
.count-value,
.calendar-date .day,
.player-number {
  font-family: "Oswald", sans-serif !important;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.team-name {
  text-transform: uppercase;
}

.vs {
  color: #cc0000;
}

.countdown-val,
.countdown-value {
  font-size: 115%;
}
.countdown-label {
  font-family: "Inter", sans-serif !important;
  font-weight: 400;
  font-size: 0.7em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.countdown-separator {
  font-family: "Oswald", sans-serif !important;
  font-weight: 700;
  color: #cc0000;
}
/* ================= MELHORIA 3: HOVER E SELEÇÃO PREMIUM ================= */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(160, 160, 160, 0.2);
  border-radius: 5px;
  border: 2px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

::selection {
  background-color: var(--accent);
  color: var(--accent-text);
}

/* Float effects for cards */
.stat-card,
.news-card,
.player-card,
.calendar-item,
.next-game-card {
  transition:
    transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    box-shadow 0.4s ease,
    border-color 0.4s ease;
}

.stat-card:hover,
.news-card:hover,
.player-card:hover,
.calendar-item:hover,
.next-game-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
  border-color: var(--accent);
  z-index: 2;
}

:root[data-theme="light"] .stat-card:hover,
:root[data-theme="light"] .news-card:hover,
:root[data-theme="light"] .player-card:hover,
:root[data-theme="light"] .calendar-item:hover,
:root[data-theme="light"] .next-game-card:hover {
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
}

.top-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 40px;
}
.top-stat-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
}
.top-stat-title {
  font-family: "Oswald", sans-serif;
  color: var(--accent);
  font-size: 24px;
  margin-bottom: 24px;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 12px;
}
.top-player-row {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.top-player-row:last-child {
  border-bottom: none;
}
.top-rank {
  font-family: "Oswald", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.3);
  width: 24px;
  margin-right: 12px;
}
.top-player-row:nth-child(2) .top-rank {
  color: #ffd700;
}
.top-player-row:nth-child(3) .top-rank {
  color: #c0c0c0;
}
.top-player-row:nth-child(4) .top-rank {
  color: #cd7f32;
}
.top-player-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 16px;
  border: 2px solid var(--accent);
}
.top-player-name {
  flex-grow: 1;
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
}
.top-player-val {
  font-family: "Oswald", sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}
.season-stats-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.season-stats-header {
  font-family: "Oswald", sans-serif;
  color: var(--accent);
  font-size: 14px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  text-align: center;
}
.stat-box {
  background: rgba(0, 0, 0, 0.6);
  border-radius: 6px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.stat-lbl {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2px;
}
.stat-val {
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}
:root[data-theme="light"] .stat-val {
  color: #fff;
} /* overlay is dark */
