:root {
  --brand-1: #1a3a8a;
  --brand-2: #d62828;
  --brand-3: #ffb703;
  --bg-soft: #f4f6fb;
  --ink: #142042;
  --ink-soft: #4a5778;
}

* { box-sizing: border-box; }
body {
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  background: var(--bg-soft);
  color: var(--ink);
  margin: 0;
}

/* Navbar */
.app-navbar {
  background: linear-gradient(120deg, #0b1d50 0%, #1a3a8a 50%, #d62828 100%);
  box-shadow: 0 4px 24px rgba(11, 29, 80, 0.18);
}
.app-navbar .nav-link { font-weight: 600; opacity: 0.92; transition: 0.2s; }
.app-navbar .nav-link:hover { opacity: 1; transform: translateY(-1px); }
.logo-mark {
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-3), #ff8c00);
  color: #1a3a8a; font-size: 1.2rem;
  box-shadow: 0 6px 16px rgba(255, 183, 3, 0.5);
}

/* Hero */
.hero {
  position: relative;
  background:
    linear-gradient(120deg, rgba(11,29,80,0.92) 0%, rgba(26,58,138,0.85) 50%, rgba(214,40,40,0.85) 100%),
    url('https://images.unsplash.com/photo-1517649763962-0c623066013b?w=1920') center/cover;
  color: white;
  padding: 5rem 0 6rem;
  overflow: hidden;
}
.hero::before, .hero::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.4;
  animation: float 8s ease-in-out infinite;
}
.hero::before { width: 300px; height: 300px; background: var(--brand-3); top: -80px; left: -80px; }
.hero::after  { width: 360px; height: 360px; background: var(--brand-2); bottom: -120px; right: -120px; animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-20px); } }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 800; line-height: 1.1; letter-spacing: -0.02em;
}
.hero .lead { font-size: 1.15rem; max-width: 720px; opacity: 0.95; }
.hero-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1rem;
  margin-top: 2.5rem;
}
.hero-stat {
  background: rgba(255,255,255,0.13);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 1.1rem; border-radius: 16px; text-align: center;
  transition: 0.3s;
}
.hero-stat:hover { transform: translateY(-4px); background: rgba(255,255,255,0.18); }
.hero-stat .num { font-size: 2rem; font-weight: 800; color: var(--brand-3); display: block; }
.hero-stat .lbl { font-size: 0.82rem; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.05em; }

/* Section */
section { padding: 3.5rem 0; }
.section-title {
  font-weight: 800; font-size: 2rem; margin-bottom: 0.4rem;
  background: linear-gradient(120deg, var(--brand-1), var(--brand-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.section-sub { color: var(--ink-soft); margin-bottom: 2rem; }

/* Cards */
.card-soft {
  border: none; border-radius: 18px;
  box-shadow: 0 4px 24px rgba(20, 32, 66, 0.07);
  transition: 0.3s; overflow: hidden; background: white;
}
.card-soft:hover { transform: translateY(-6px); box-shadow: 0 14px 38px rgba(20, 32, 66, 0.13); }
.card-banner {
  height: 180px; background-size: cover; background-position: center;
  position: relative;
}
.card-banner::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.55) 100%);
}
.card-banner .badge-status {
  position: absolute; top: 12px; right: 12px; z-index: 2;
}
.uni-avatar {
  width: 56px; height: 56px; border-radius: 16px; display: inline-flex;
  align-items: center; justify-content: center; color: white; font-weight: 800; font-size: 1.1rem;
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}
.sport-icon {
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, #fff7e0, #ffe5b4);
  color: var(--brand-2); display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.6rem; box-shadow: 0 4px 14px rgba(214,40,40,0.2);
}

/* Badges */
.status-planned  { background: #d6e4ff; color: #1a3a8a; }
.status-ongoing  { background: #ffe9b3; color: #b87000; animation: pulse 1.6s infinite; }
.status-finished { background: #d4f3df; color: #0a6e3a; }
@keyframes pulse { 50% { opacity: 0.7; } }

/* Medals */
.medal { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 20px; font-weight: 700; font-size: 0.85rem; }
.medal-1 { background: linear-gradient(135deg, #ffd700, #ff9d00); color: #5b3500; }
.medal-2 { background: linear-gradient(135deg, #d6dee4, #a4b0bb); color: #2c3640; }
.medal-3 { background: linear-gradient(135deg, #ce8c5c, #ad5d2b); color: #fff; }

/* Rating table */
.rating-table th { background: var(--brand-1); color: #fff; }
.rating-rank {
  width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; font-weight: 800; background: #eef2fb; color: var(--brand-1);
}
.rating-rank.top-1 { background: linear-gradient(135deg, #ffd700, #ff9d00); color: #fff; }
.rating-rank.top-2 { background: linear-gradient(135deg, #c5cdd6, #889099); color: #fff; }
.rating-rank.top-3 { background: linear-gradient(135deg, #ce8c5c, #ad5d2b); color: #fff; }

/* Footer */
.app-footer {
  background: linear-gradient(120deg, #0b1d50, #1a3a8a);
  color: #e9ecef;
}
.footer-link { color: #e9ecef; text-decoration: none; opacity: 0.78; }
.footer-link:hover { color: var(--brand-3); opacity: 1; }

/* Buttons */
.btn-brand {
  background: linear-gradient(120deg, var(--brand-1), var(--brand-2));
  border: none; color: white; font-weight: 700; padding: 0.7rem 1.6rem; border-radius: 14px;
  transition: 0.3s;
}
.btn-brand:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(214,40,40,0.35); }

/* Login card */
.login-card {
  max-width: 420px; margin: 4rem auto;
  border-radius: 22px; overflow: hidden;
  box-shadow: 0 20px 50px rgba(20, 32, 66, 0.18);
}
.login-card .head {
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: white; padding: 2rem; text-align: center;
}
.login-card .head i { font-size: 2.6rem; }
.login-card form { padding: 2rem; background: white; }

/* Admin sidebar */
.admin-sidebar {
  background: #0b1d50; color: white; min-height: calc(100vh - 70px);
}
.admin-sidebar a {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,0.78); padding: 12px 18px; text-decoration: none;
  border-left: 3px solid transparent; transition: 0.2s;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
  background: rgba(255,255,255,0.08); color: #fff; border-left-color: var(--brand-3);
}

/* Stat tile */
.stat-tile {
  background: white; border-radius: 18px; padding: 1.4rem;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 4px 18px rgba(20,32,66,0.06);
  transition: 0.3s;
}
.stat-tile:hover { transform: translateY(-3px); }
.stat-tile .ico {
  width: 54px; height: 54px; border-radius: 14px; display: inline-flex;
  align-items: center; justify-content: center; color: white; font-size: 1.5rem;
}
.stat-tile .num { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.stat-tile .lbl { color: var(--ink-soft); font-size: 0.85rem; }

/* News */
.news-card img { height: 200px; object-fit: cover; width: 100%; }

@media (max-width: 768px) {
  .hero { padding: 3rem 0 4rem; }
  section { padding: 2.5rem 0; }
}
