:root {
  --font-main: "Space Grotesk", sans-serif;
  --font-display: "Bebas Neue", sans-serif;
  --bg-main: linear-gradient(135deg, #0a1421, #0e1d30 45%, #11172a);
  --text: #ecf4ff;
  --muted: #b5c5d8;
  --line: rgba(255, 255, 255, 0.22);
  --glass: rgba(255, 255, 255, 0.12);
  --glass-strong: rgba(255, 255, 255, 0.2);
  --messi: #20b8ff;
  --ronaldo: #ff5b5f;
  --ok: #66e3a3;
  --warn: #ffb05a;
}

body[data-theme="light"] {
  --bg-main: linear-gradient(135deg, #f3f7ff, #e9f2ff 44%, #f9fbff);
  --text: #1d2c3a;
  --muted: #425a73;
  --line: rgba(25, 56, 84, 0.24);
  --glass: rgba(255, 255, 255, 0.7);
  --glass-strong: rgba(255, 255, 255, 0.88);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-main);
  color: var(--text);
  background:
    radial-gradient(800px 500px at 5% 10%, rgba(32, 184, 255, 0.24), transparent 58%),
    radial-gradient(700px 420px at 96% 88%, rgba(255, 91, 95, 0.22), transparent 60%),
    var(--bg-main);
  overflow-x: hidden;
}

body[dir="rtl"] {
  font-family: "Cairo", sans-serif;
}

.bg-orb {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.72;
  z-index: -1;
  animation: drift 8s ease-in-out infinite alternate;
}

.orb-messi {
  background: var(--messi);
  left: -80px;
  top: -70px;
}

.orb-ronaldo {
  background: var(--ronaldo);
  right: -90px;
  bottom: -60px;
  animation-delay: 0.6s;
}

.glass {
  background: linear-gradient(145deg, var(--glass-strong), var(--glass));
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.22);
}

.navbar {
  width: min(1080px, 94%);
  margin: 1rem auto 0.85rem;
  padding: 0.6rem 0.75rem;
  position: sticky;
  top: 0.6rem;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.brand {
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.93rem;
  padding: 0.42rem 0.62rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.nav-links a:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.nav-controls {
  display: flex;
  gap: 0.45rem;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 0.4rem 0.72rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.chip:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.16);
}

.hero {
  width: min(1080px, 94%);
  margin: 0 auto 1.15rem;
  text-align: center;
  padding: 2rem 1rem 1.9rem;
}

.kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.82rem;
  color: var(--muted);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 1px;
}

body[dir="rtl"] h1,
body[dir="rtl"] h2,
body[dir="rtl"] h3 {
  font-family: "Cairo", sans-serif;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2.5rem, 7vw, 4.8rem);
  margin: 0.44rem 0 0.25rem;
}

.subtitle {
  width: min(860px, 96%);
  margin: 0 auto;
  line-height: 1.68;
  color: var(--muted);
}

.container {
  width: min(1080px, 94%);
  margin: 0 auto;
  padding-bottom: 1.2rem;
}

.summary-grid,
.pros-cons-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.player-card,
.comparison,
.pros-cons-grid article,
footer {
  padding: 1rem;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.player-card h2 {
  font-size: 2rem;
}

.player-card .tag {
  margin: 0.2rem 0 0.7rem;
  color: var(--muted);
}

.player-card ul,
.list {
  margin: 0;
  padding-left: 1.1rem;
  line-height: 1.62;
}

.messi-card {
  border-top: 3px solid var(--messi);
}

.ronaldo-card {
  border-top: 3px solid var(--ronaldo);
}

.player-card:hover,
.comparison:hover,
.pros-cons-grid article:hover,
footer:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.38);
}

.comparison {
  margin: 1rem 0;
}

.comparison h2 {
  font-size: 1.85rem;
  margin-bottom: 0.65rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

th,
td {
  text-align: left;
  padding: 0.72rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

th {
  color: var(--muted);
  font-weight: 500;
}

body[dir="rtl"] th,
body[dir="rtl"] td,
body[dir="rtl"] .subtitle,
body[dir="rtl"] .player-card,
body[dir="rtl"] .comparison,
body[dir="rtl"] .pros-cons-grid article {
  text-align: right;
}

body[dir="rtl"] .player-card ul,
body[dir="rtl"] .list {
  padding-right: 1.1rem;
  padding-left: 0;
}

h3 {
  font-size: 1.55rem;
  margin-bottom: 0.45rem;
}

.list {
  margin-bottom: 1rem;
}

.pros li::marker {
  color: var(--ok);
}

.cons li::marker {
  color: var(--warn);
}

footer {
  width: min(1080px, 94%);
  margin: 0.4rem auto 1.3rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

[class*="reveal-"] {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal 680ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reveal-1 { animation-delay: 40ms; }
.reveal-2 { animation-delay: 120ms; }
.reveal-3 { animation-delay: 220ms; }
.reveal-4 { animation-delay: 300ms; }
.reveal-5 { animation-delay: 380ms; }
.reveal-6 { animation-delay: 460ms; }

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  from {
    transform: translateY(0) scale(1);
  }
  to {
    transform: translateY(24px) scale(1.08);
  }
}

@media (max-width: 920px) {
  .navbar {
    flex-wrap: wrap;
    justify-content: center;
  }

  .summary-grid,
  .pros-cons-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 1.7rem;
  }
}

@media (max-width: 560px) {
  .nav-controls,
  .nav-links {
    width: 100%;
    justify-content: center;
  }

  .chip,
  .nav-links a {
    font-size: 0.8rem;
  }
}
