@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800;900&display=swap');

/* 
   Dichiu Score - Elite Design System 
   Colors: Forest Green (#047857) & Muted Gold (#d97706)
*/

:root {
  /* Core Palette */
  --forest: #047857;
  --forest-light: #059669;
  --forest-dark: #064e3b;
  --forest-deep: #022c22;

  --gold: #FDFD96;
  --gold-rgb: 253, 253, 150;
  --gold-light: #ffffb3;
  --gold-dark: #e6e686;
  --gold-gradient: linear-gradient(135deg, #FDFD96 0%, #ffffb3 100%);

  --bg: #04100c;
  /* Very deep forest green/black */
  --panel: rgba(10, 31, 24, 0.8);
  --panel-glass: rgba(12, 38, 30, 0.4);
  --stroke: rgba(253, 253, 150, 0.15);
  --stroke-light: rgba(255, 255, 255, 0.05);

  --text: #f3f4f6;
  --text-muted: rgba(156, 163, 175, 0.8);
  --muted: rgba(156, 163, 175, 0.6);

  --live: #ef4444;
  --goal: #10b981;
  --yellow: #facc15;
  --red: #ef4444;

  /* Elevation */
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --radius: 16px;
  --radius-sm: 8px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html,
body {
  height: 100%;
  scrollbar-gutter: stable;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 50% -20%, rgba(4, 120, 87, 0.45), transparent 60%),
    radial-gradient(circle at 0% 30%, rgba(253, 253, 150, 0.08), transparent 40%),
    radial-gradient(circle at 100% 70%, rgba(4, 120, 87, 0.15), transparent 40%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
  background: var(--forest);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4 {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.accent-text {
  color: var(--gold);
}

/* Pulse Indicator */
.pulse-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulseElite 2s infinite;
}

@keyframes pulseElite {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.forest-text {
  color: var(--forest-light);
}

/* ---------- Layout ---------- */
.app-container {
  display: grid;
  grid-template-columns: 220px 1fr 300px;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  align-items: start;
}

@media (max-width: 1200px) {
  .app-container {
    grid-template-columns: 1fr;
    padding: 10px;
    gap: 15px;
    margin-bottom: 70px;
    /* Space for bottom nav */
  }

  .sidebar-hide {
    display: none !important;
  }

  /* Force elements to full width on mobile */
  .main-content {
    width: 100%;
  }

  .glass-panel {
    border-radius: 12px;
  }
}

/* ---------- Mobile App Navigation ---------- */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 65px;
  background: rgba(4, 20, 16, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--stroke);
  z-index: 2000;
  justify-content: space-around;
  align-items: center;
  padding: 0 10px;
}

@media (max-width: 768px) {
  .mobile-nav {
    display: flex;
  }

  .brand-elite div {
    display: none;
    /* Hide 'DichiuScore' text on very small screens, keep logo */
  }

  .navbar-elite {
    padding: 10px 15px;
  }
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 700;
  flex: 1;
}

.mobile-nav-item i {
  font-size: 20px;
}

.mobile-nav-item.active {
  color: var(--gold);
}

.mobile-nav-item.active i {
  color: var(--gold);
}

/* ---------- Components: Glass Card ---------- */
.glass-panel {
  background: var(--panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  overflow: hidden;
}

.glass-panel:hover {
  border-color: rgba(253, 253, 150, 0.3);
}

.section-title-elite {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
}

.section-title-elite::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--stroke), transparent);
}

/* ---------- Match View UI (Compact & Premium) ---------- */
.match-card-elite {
  padding: 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(4, 120, 87, 0.1) 0%, transparent 100%);
}

.score-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin: 15px 0;
}

.score-num {
  font-size: 56px;
  font-weight: 900;
  letter-spacing: -2px;
  color: #fff;
  text-shadow: 0 0 30px rgba(253, 253, 150, 0.3);
}

.team-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 120px;
}

.team-logo-elite {
  width: 60px;
  height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.team-name-elite {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

/* ---------- Navbar ---------- */
.navbar-elite {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: rgba(4, 16, 12, 0.8);
  backdrop-filter: blur(15px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--stroke);
}

.brand-elite {
  font-size: 20px;
  font-weight: 900;
  color: var(--gold);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-elite span {
  color: var(--text);
  font-weight: 400;
  opacity: 0.7;
}

/* ---------- Badges & Status ---------- */
.badge-elite {
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 900;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.badge-live {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-finished {
  background: rgba(4, 120, 87, 0.15);
  color: #10b981;
  border: 1px solid rgba(4, 120, 87, 0.3);
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  display: inline-block;
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* ---------- Buttons ---------- */
.btn-elite {
  background: var(--gold-gradient);
  color: #000;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 900;
  font-size: 13px;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-elite:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(253, 253, 150, 0.3);
}

/* ---------- Lists & Rows ---------- */
.row-elite {
  display: flex;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.row-elite:hover {
  background: rgba(253, 253, 150, 0.05);
}

/* ---------- Standings Table ---------- */
.standings-table {
  width: 100%;
  border-collapse: collapse;
}

.standings-table th {
  padding: 12px;
  font-size: 10px;
  color: var(--muted);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.standings-table td {
  padding: 10px 12px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.standing-row-highlight {
  background: rgba(253, 253, 150, 0.08) !important;
}

.standing-pos {
  font-weight: 900;
  color: var(--gold);
  width: 30px;
}

/* ---------- Forms ---------- */
.input-elite {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--stroke);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition);
}

.input-elite:focus {
  border-color: var(--gold);
  box-shadow: 0 0 15px rgba(253, 253, 150, 0.1);
}

/* Tab logic */
.tabs-elite {
  display: flex;
  border-bottom: 1px solid var(--stroke);
  margin-bottom: 20px;
}

.tab-link-elite {
  padding: 12px 24px;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.tab-link-elite.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.5s ease forwards;
}

@keyframes scorePulse {
  0% {
    transform: scale(1);
    color: #fff;
  }

  50% {
    transform: scale(1.2);
    color: var(--gold);
    text-shadow: 0 0 20px var(--gold);
  }

  100% {
    transform: scale(1);
    color: #fff;
  }
}

.score-update-pulse {
  animation: scorePulse 1s ease 2;
  display: inline-block;
}