:root {
  --primary: #00a8ff;
  --primary-light: #48c1ff;
  --primary-dark: #008cd4;
  --accent: #fbc531;
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --glass-bg: rgba(30, 41, 59, 0.6);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  --radius: 16px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --font-main: 'Outfit', sans-serif;
}

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

body {
  font-family: var(--font-main);
  background-color: #0f172a;
  background-image: var(--bg-gradient);
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: 
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2v-4h4v-2h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2v-4h4v-2H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.15;
  z-index: -1;
  pointer-events: none;
}

.container {
  max-width: 1300px; /* Širší pro leaderboards */
  margin: 0 auto;
  padding: 0 20px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

.floating { animation: float 4s ease-in-out infinite; }
.fade-in { animation: fadeIn 0.8s ease forwards; }

/* Navbar */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 80px;
  z-index: 1000;
  transition: var(--transition);
  display: flex;
  align-items: center;
}

.navbar.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  height: 70px;
  border-bottom: 1px solid var(--glass-border);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary-light);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo span {
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 600;
  transition: var(--transition);
  position: relative;
  opacity: 0.8;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--primary-light);
  opacity: 1;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px; left: 0;
  width: 0; height: 2px;
  background: var(--primary-light);
  transition: var(--transition);
}

.nav-links a:hover::after, .nav-links a.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-main);
}

/* Hero Section */
.hero {
  padding: 180px 0 100px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero p {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto 40px;
}

/* Buttons */
.btn {
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 0 20px rgba(0, 168, 255, 0.4);
}

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-3px);
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--text-main);
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
}

.btn-shine::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: all 0.6s;
}

.btn-shine:hover::before { left: 100%; }

/* Cards */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  padding: 40px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 168, 255, 0.3);
}

/* Grids - FORCE MULTI-COLUMN ON DESKTOP */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Force 3 columns on desktop */
  gap: 30px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Force 4 columns for global stats */
  gap: 25px;
  text-align: center;
}

.leaderboards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 leaderboards side-by-side */
  gap: 20px;
}

@media (max-width: 1200px) {
    .leaderboards-grid { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .leaderboards-grid, .features-grid, .stats-grid { grid-template-columns: 1fr; }
  .menu-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 75px; left: 20px; right: 20px;
    background: rgba(15, 23, 42, 0.98);
    flex-direction: column;
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--glass-border);
    gap: 20px;
  }
  .nav-links.active { display: flex; }
}

.stat-number {
  font-size: 3rem;
  font-weight: 900;
  color: var(--primary-light);
  display: block;
}

.stat-label {
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
}

/* Mouse Glow */
.mouse-glow {
  position: fixed;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0, 168, 255, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  opacity: 0;
}

/* Particles */
#particles-js {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: -2;
}

/* Footer */
footer {
  padding: 60px 0 30px;
  border-top: 1px solid var(--glass-border);
  background: rgba(15, 23, 42, 0.8);
  margin-top: auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.social-links {
  display: flex;
  gap: 20px;
}

.social-links a {
  color: var(--text-muted);
  font-size: 1.5rem;
  transition: var(--transition);
}

.social-links a:hover { color: var(--primary-light); }
