:root {
  --bg0: #f0f9ff;
  --bg1: #e0f2fe;
  --card: rgba(255, 255, 255, 0.95);
  --card-border: rgba(14, 165, 233, 0.2);
  --text: #0c4a6e;
  --muted: #475569;
  --muted2: #64748b;
  --nav: #0369a1;
  --shadow: 0 20px 60px rgba(14, 165, 233, 0.12), 0 8px 24px rgba(56, 189, 248, 0.08);
  --glow: 0 0 20px rgba(14, 165, 233, 0.3), 0 0 40px rgba(56, 189, 248, 0.2);
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.6; filter: blur(40px); }
  50% { opacity: 1; filter: blur(60px); }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--text);
  background: var(--bg0);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(14, 165, 233, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.10) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(125, 211, 252, 0.08) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    repeating-linear-gradient(0deg, rgba(14, 165, 233, 0.04) 0px, transparent 2px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(56, 189, 248, 0.04) 0px, transparent 2px, transparent 4px);
  pointer-events: none;
  z-index: 0;
}

header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(14, 165, 233, 0.2);
  box-shadow: 0 4px 24px rgba(14, 165, 233, 0.1);
  color: #0c4a6e;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.6), rgba(56, 189, 248, 0.6), transparent);
  animation: shimmer 3s linear infinite;
}

header h1 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  font-weight: 900;
  background: linear-gradient(135deg, #0369a1, #0ea5e9, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(14, 165, 233, 0.3);
}

nav {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

nav a {
  color: var(--nav);
  text-decoration: none;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(14, 165, 233, 0.3);
  background: rgba(14, 165, 233, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

nav a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.2), transparent);
  transition: left 0.5s ease;
}

nav a:hover::before {
  left: 100%;
}

nav a:hover {
  color: #ffffff;
  border-color: rgba(14, 165, 233, 0.6);
  background: rgba(14, 165, 233, 0.3);
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.4), 0 0 40px rgba(56, 189, 248, 0.3);
  transform: translateY(-2px);
}

main {
  width: min(1100px, 94vw);
  margin: 28px auto 40px;
  position: relative;
  z-index: 1;
}

@keyframes card-glow {
  0%, 100% { box-shadow: var(--shadow); }
  50% { box-shadow: var(--shadow), var(--glow); }
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 24px 26px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(14, 165, 233, 0.6), 
    rgba(56, 189, 248, 0.6), 
    rgba(125, 211, 252, 0.6),
    transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  border-color: rgba(14, 165, 233, 0.5);
  box-shadow: 
    0 20px 60px rgba(14, 165, 233, 0.2), 
    0 8px 24px rgba(56, 189, 248, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.card + .card {
  margin-top: 20px;
}

.intro h2 {
  margin: 0 0 8px;
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #0369a1, #0ea5e9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.tile {
  padding: 18px 18px;
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: 14px;
  background: rgba(14, 165, 233, 0.05);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.15), transparent);
  transition: left 0.6s ease;
}

.tile:hover::before {
  left: 100%;
}

.tile:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 
    0 20px 40px rgba(14, 165, 233, 0.2),
    0 8px 16px rgba(56, 189, 248, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-color: rgba(14, 165, 233, 0.5);
  background: rgba(14, 165, 233, 0.12);
}

.tile strong {
  font-size: 1.1rem;
  color: #0369a1;
  font-weight: 900;
}

.tile span {
  color: var(--muted);
  font-size: 0.95rem;
}

.tile a {
  color: #60a5fa;
  font-weight: 800;
  text-decoration: none;
  margin-top: 4px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tile a:hover {
  color: #93c5fd;
  transform: translateX(4px);
}

.tile.tile-compact {
  max-width: 420px;
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(56, 189, 248, 0.15));
  border: 1px solid rgba(14, 165, 233, 0.4);
  color: #0369a1;
  font-size: 0.9rem;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.2);
  transition: all 0.3s ease;
}

.bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}

@keyframes bar-entry {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.bar-row {
  background: rgba(14, 165, 233, 0.05);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: 14px;
  padding: 14px 16px;
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  animation: bar-entry 0.5s ease backwards;
}

.bar-row:nth-child(1) { animation-delay: 0.05s; }
.bar-row:nth-child(2) { animation-delay: 0.1s; }
.bar-row:nth-child(3) { animation-delay: 0.15s; }
.bar-row:nth-child(4) { animation-delay: 0.2s; }
.bar-row:nth-child(5) { animation-delay: 0.25s; }
.bar-row:nth-child(6) { animation-delay: 0.3s; }
.bar-row:nth-child(7) { animation-delay: 0.35s; }
.bar-row:nth-child(8) { animation-delay: 0.4s; }
.bar-row:nth-child(9) { animation-delay: 0.45s; }

.bar-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.15), transparent);
  transition: left 0.6s ease;
}

.bar-row:hover::before {
  left: 100%;
}

.bar-row:hover {
  border-color: rgba(14, 165, 233, 0.5);
  background: rgba(14, 165, 233, 0.12);
  box-shadow: 
    0 8px 24px rgba(14, 165, 233, 0.2),
    0 4px 12px rgba(56, 189, 248, 0.15);
  transform: translateX(4px);
}

.bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 900;
  color: #0c4a6e;
  margin-bottom: 10px;
  gap: 12px;
  flex-wrap: wrap;
}

.rank {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(56, 189, 248, 0.2));
  border: 1px solid rgba(14, 165, 233, 0.5);
  font-size: 0.9rem;
  font-weight: 900;
  margin-right: 10px;
  color: #0369a1;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.score {
  font-variant-numeric: tabular-nums;
  color: #0369a1;
  font-weight: 900;
  font-size: 1.05rem;
}

.bar-track {
  background: rgba(226, 232, 240, 0.5);
  border-radius: 999px;
  height: 14px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
}

.bar-track::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

@keyframes bar-fill-animation {
  from { width: 0; }
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0ea5e9, #38bdf8, #7dd3fc);
  background-size: 200% 100%;
  border-radius: 999px;
  width: 0;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 
    0 0 20px rgba(14, 165, 233, 0.5),
    0 0 40px rgba(56, 189, 248, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  animation: shimmer 3s linear infinite;
}

.bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4));
  filter: blur(8px);
}

footer {
  text-align: center;
  color: rgba(203, 213, 225, 0.85);
  font-size: 0.9rem;
  padding: 14px 0 26px;
}

@media (max-width: 720px) {
  header h1 { font-size: 1.02rem; }
  nav a { padding: 7px 9px; }
  .card { padding: 16px 14px; }
}
