* { margin: 0; padding: 0; box-sizing: border-box; }

:root { 
  --primary: #00f2ff; 
  --secondary: #ff00ff; 
  --accent: #ffff00;
  --dark: #0a0a0f; 
  --darker: #050508; 
  --card-bg: rgba(20, 20, 25, 0.85);
  --border: rgba(255,255,255,0.08);
  --success: #00ff88;
  --danger: #ff0044;
  --warning: #ffaa00;
  --text: #ffffff; 
  --text-muted: rgba(255,255,255,0.5);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Orbitron', sans-serif;
  background: linear-gradient(135deg, #0f2027 0%, #203a43 25%, #2c5364 50%, #4a004a 75%, #6a006a 100%);
  background-attachment: fixed;
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
  line-height: 1.6;
}

/* ========== ФОН ========== */
.cyber-bg {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -3;
  background: 
    radial-gradient(at 0% 0%, rgba(0,242,255,0.1) 0, transparent 50%),
    radial-gradient(at 100% 0%, rgba(255,0,255,0.1) 0, transparent 50%),
    radial-gradient(at 100% 100%, rgba(0,242,255,0.05) 0, transparent 50%),
    radial-gradient(at 0% 100%, rgba(255,0,255,0.05) 0, transparent 50%),
    linear-gradient(135deg, var(--darker), var(--dark));
  pointer-events: none;
}

.orbs { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -2; overflow: hidden; pointer-events: none; }
.orb {
  position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.3; animation: orbFloat 20s infinite ease-in-out;
}
.orb:nth-child(1) { width: 600px; height: 600px; background: var(--primary); top: -200px; left: -200px; }
.orb:nth-child(2) { width: 500px; height: 500px; background: var(--secondary); bottom: -150px; right: -150px; animation-delay: -7s; }
.orb:nth-child(3) { width: 400px; height: 400px; background: var(--danger); top: 50%; left: 50%; animation-delay: -14s; }
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -40px) scale(1.1); }
}

.grid-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
  background-image: linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px; pointer-events: none;
}

#particleCanvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* ========== ЗАГРУЗКА ========== */
.loader {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--darker); z-index: 99999;
  display: flex; justify-content: center; align-items: center; transition: opacity 0.6s;
}
.loader.hidden { opacity: 0; pointer-events: none; }
.loader-content { text-align: center; }
.loader-ball {
  width: 70px; height: 70px; background: linear-gradient(135deg, var(--primary), var(--secondary)); border-radius: 50%;
  animation: loaderBounce 1s infinite; box-shadow: 0 0 60px rgba(0,242,255,0.6); position: relative;
}
.loader-ball::before, .loader-ball::after {
  content: ''; position: absolute; border-radius: 50%; background: inherit; top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.loader-ball::before { width: 140%; height: 140%; opacity: 0.4; animation: loaderPulse 1s infinite; }
.loader-ball::after { width: 180%; height: 180%; opacity: 0.2; animation: loaderPulse 1s infinite 0.3s; }
@keyframes loaderBounce { 0%, 100% { transform: scale(1) rotate(0deg); } 50% { transform: scale(1.2) rotate(180deg); } }
@keyframes loaderPulse { 0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; } 50% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; } }
.loader-text {
  margin-top: 25px; font-family: 'Orbitron', sans-serif; font-size: 1rem; font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  animation: textPulse 1.5s infinite; letter-spacing: 3px;
}
@keyframes textPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ========== НАВИГАЦИЯ ========== */
.top-nav {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
}

.nav-link {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  text-shadow: 0 0 15px rgba(0,242,255,0.5);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s;
  box-shadow: 0 0 10px var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.admin-link {
  color: rgba(255,255,255,0.3);
}

.admin-link:hover {
  color: var(--warning);
  text-shadow: 0 0 15px rgba(255,170,0,0.5);
}

/* ========== HERO ========== */
.hero-new {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 40px 80px;
  text-align: center;
  z-index: 2;
  animation: heroFadeIn 1s ease;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(0, 242, 255, 0.08);
  border: 1px solid rgba(0, 242, 255, 0.25);
  border-radius: 50px;
  color: rgba(255,255,255,0.7);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 1px;
  margin-bottom: 40px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  animation: blink 2s infinite;
}

.hero-main-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 5.5rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 6px;
  line-height: 1;
  margin-bottom: 10px;
  text-shadow: 0 0 40px rgba(255,255,255,0.15);
}

.hero-sub-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 4rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), #00ff88);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 4px;
  line-height: 1.2;
  margin-bottom: 15px;
  filter: drop-shadow(0 0 20px rgba(0,242,255,0.4));
}

.hero-year {
  font-family: 'Orbitron', sans-serif;
  font-size: 5rem;
  font-weight: 900;
  color: rgba(0, 242, 255, 0.12);
  letter-spacing: 8px;
  margin-bottom: 30px;
  text-shadow: 0 0 60px rgba(0,242,255,0.2);
}

.hero-description {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.5);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 50px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  font-family: 'Orbitron', sans-serif;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary);
  text-shadow: 0 0 20px rgba(0,242,255,0.5);
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 5px;
  font-weight: 600;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.btn-glow {
  padding: 14px 35px;
  background: linear-gradient(135deg, var(--primary), #00ff88);
  color: #000;
  text-decoration: none;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s;
  box-shadow: 0 0 30px rgba(0,242,255,0.4);
}

.btn-glow:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 50px rgba(0,242,255,0.7), 0 10px 40px rgba(0,242,255,0.3);
}

.btn-outline {
  padding: 14px 35px;
  background: transparent;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 2px solid rgba(255,255,255,0.15);
  transition: all 0.3s;
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 25px rgba(0,242,255,0.3);
  transform: translateY(-3px);
}

/* ========== КОНТЕЙНЕР ========== */
.container { max-width: 1400px; margin: 0 auto; padding: 0 30px 60px; }
.section { margin: 70px 0; }
.section-title {
  font-family: 'Orbitron', sans-serif; font-size: 1.8rem; font-weight: 900; margin-bottom: 35px;
  display: flex; align-items: center; gap: 12px; text-transform: uppercase; letter-spacing: 2px;
}
.section-title::before {
  content: ''; width: 4px; height: 30px; background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 2px; box-shadow: 0 0 10px var(--primary);
}

/* ========== КАРТОЧКИ МАТЧЕЙ ========== */
.match-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 20px; }

.match-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0,0,0,0.4);
  transition: all 0.25s ease;
}
.match-card:hover {
  border-color: rgba(0,242,255,0.3);
  transform: translateY(-5px);
  box-shadow: 0 20px 45px rgba(0,0,0,0.5);
}

.match-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px; font-size: 0.8rem; color: var(--text-muted);
}
.match-top .date { font-weight: 500; }
.match-top .status {
  padding: 4px 12px; border-radius: 16px; font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
  background: rgba(0,255,100,0.12); color: var(--success); border: 1px solid rgba(0,255,100,0.25);
}
.match-top .status.live { background: rgba(255,0,0,0.12); color: var(--danger); border-color: rgba(255,0,0,0.25); }

.match-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.match-team {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  flex: 1; text-decoration: none; color: var(--text); transition: 0.2s; min-width: 0;
}
.match-team:hover { transform: scale(1.04); }

.match-team-logo {
  width: 65px; height: 65px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: 'Orbitron', sans-serif; font-weight: 900; font-size: 1.1rem;
  background: rgba(255,255,255,0.06);
  border: 2px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.match-team-logo.has-img { background: transparent; border: none; }
.match-team-logo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

.match-team-name {
  font-weight: 600; font-size: 0.85rem; text-align: center; line-height: 1.2;
  color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}

.match-center {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; flex-shrink: 0; min-width: 130px;
}
.match-score {
  font-family: 'Orbitron', sans-serif; font-size: 1.8rem; font-weight: 900; color: #fff;
  letter-spacing: 2px; line-height: 1; display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.match-score-divider { color: rgba(255,255,255,0.3); font-weight: 700; }
.match-status-text {
  font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600;
  display: flex; align-items: center; gap: 4px;
}
.match-status-text::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--success); }

/* ========== ТУРНИРНАЯ ТАБЛИЦА ========== */
.table-wrapper {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow-x: auto;
  box-shadow: 0 15px 35px rgba(0,0,0,0.4);
  -webkit-overflow-scrolling: touch;
}
.table-wrapper::-webkit-scrollbar { height: 6px; }
.table-wrapper::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 3px; }
.table-wrapper::-webkit-scrollbar-thumb { background: linear-gradient(90deg, var(--primary), var(--secondary)); border-radius: 3px; }

.standings-table { width: 100%; min-width: 600px; border-collapse: separate; border-spacing: 0; }
.standings-table thead { background: rgba(0,242,255,0.05); }
.standings-table th {
  padding: 16px 12px; text-align: left; font-family: 'Orbitron', sans-serif; font-weight: 700; font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 1px; color: var(--primary); border-bottom: 1px solid var(--border);
}
.standings-table td { padding: 14px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.standings-table tbody tr { transition: background 0.2s; }
.standings-table tbody tr:nth-child(even) { background: rgba(255,255,255,0.02); }
.standings-table tbody tr:hover { background: rgba(0,242,255,0.05); }

.rank-cell { width: 50px; text-align: center; }
.rank-badge {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  font-family: 'Orbitron', sans-serif; font-weight: 900; font-size: 0.9rem; margin: 0 auto;
}
.rank-1 { background: linear-gradient(135deg, #ffd700, #ffaa00); color: #000; box-shadow: 0 0 15px rgba(255,215,0,0.3); }
.rank-2 { background: linear-gradient(135deg, #c0c0c0, #888); color: #000; }
.rank-3 { background: linear-gradient(135deg, #cd7f32, #8b4513); color: #fff; }
.rank-default { background: rgba(255,255,255,0.08); color: var(--text-muted); }

.team-cell-table { display: flex; align-items: center; gap: 10px; }
.mini-logo {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.65rem; font-weight: 900; border: 2px solid rgba(255,255,255,0.1); overflow: hidden;
  background: rgba(255,255,255,0.05); flex-shrink: 0;
}
.mini-logo img { width: 100%; height: 100%; object-fit: cover; display: none; border-radius: 50%; }
.mini-logo.has-img img { display: block; }
.mini-logo.has-img span { display: none; }

.stat-cell { text-align: center; font-weight: 600; font-size: 0.9rem; }
.stat-positive { color: var(--success); }
.stat-negative { color: var(--danger); }

.groups-container { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
.group-table { background: rgba(20,20,25,0.4); border-radius: 16px; padding: 20px; border: 1px solid rgba(255,255,255,0.05); }

/* ========== ФУТЕР ========== */
footer { max-width: 1400px; margin: 0 auto; padding: 50px 30px; text-align: center; border-top: 1px solid rgba(255,255,255,0.05); }
.footer-text { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 15px; }
.footer-links { display: flex; justify-content: center; gap: 25px; }
.footer-links a { color: var(--text-muted); text-decoration: none; transition: 0.2s; font-weight: 500; font-size: 0.85rem; }
.footer-links a:hover { color: var(--primary); }

.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  padding: 14px 24px; border-radius: 14px; background: rgba(20,20,25,0.9);
  border: 1px solid var(--border); color: var(--text); font-weight: 600;
  display: flex; align-items: center; gap: 10px; animation: toastSlide 0.3s ease;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4); font-size: 0.9rem;
}
@keyframes toastSlide { from { opacity: 0; transform: translateX(80px); } to { opacity: 1; transform: translateX(0); } }
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }

/* Адаптив */
@media(max-width: 968px) {
  .hero-main-title { font-size: 3.5rem; }
  .hero-sub-title { font-size: 2.8rem; }
  .hero-year { font-size: 3.5rem; }
  .match-grid { grid-template-columns: 1fr; }
  .groups-container { grid-template-columns: 1fr; }
  .container, .hero-new { padding-left: 20px; padding-right: 20px; }
}
@media(max-width: 640px) {
  .hero-main-title { font-size: 2.2rem; letter-spacing: 3px; }
  .hero-sub-title { font-size: 1.8rem; letter-spacing: 2px; }
  .hero-year { font-size: 2.5rem; letter-spacing: 4px; }
  .hero-stats { gap: 30px; }
  .stat-value { font-size: 2rem; }
  .top-nav { gap: 15px; padding: 15px 20px; }
  .nav-link { font-size: 0.85rem; }
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--darker); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--primary), var(--secondary)); border-radius: 4px; }
::selection { background: var(--primary); color: #000; }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }