/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-dark: #0d0d1a;
  --bg-card: #13132b;
  --bg-nav: rgba(13,13,26,0.97);
  --accent: #7c3aed;
  --accent-light: #a855f7;
  --accent-glow: #c084fc;
  --text-primary: #f1f0ff;
  --text-secondary: #a09dc0;
  --text-muted: #6b6890;
  --border: #2a2750;
  --success: #10b981;
  --error: #ef4444;
  --radius: 12px;
  --radius-sm: 6px;
  --shadow: 0 4px 24px rgba(124,58,237,0.15);
  --shadow-lg: 0 8px 48px rgba(124,58,237,0.25);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
}

a { color: var(--accent-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-glow); }

img { max-width: 100%; height: auto; display: block; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ===== NAVIGATION ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 68px;
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.4rem; font-weight: 800; color: var(--text-primary);
  letter-spacing: -0.5px;
}

.nav-logo span { color: var(--accent-light); }

.nav-logo img { width: 36px; height: 36px; border-radius: 8px; }

.nav-links {
  display: flex; align-items: center; gap: 8px; list-style: none;
}

.nav-links a {
  color: var(--text-secondary); font-size: 0.92rem; font-weight: 500;
  padding: 8px 14px; border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--text-primary); background: rgba(124,58,237,0.15);
}

.nav-cta {
  background: var(--accent); color: #fff !important;
  padding: 8px 20px !important; border-radius: 20px !important;
  font-weight: 600 !important;
}

.nav-cta:hover { background: var(--accent-light) !important; color: #fff !important; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px; height: 2px; background: var(--text-primary);
  border-radius: 2px; transition: all 0.3s;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  position: relative; overflow: hidden;
  padding-top: 68px;
}

.hero-bg {
  position: absolute; inset: 0;
  background-image: url('../images/hero.jpg');
  background-size: cover; background-position: center;
  filter: brightness(0.35);
}

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(13,13,26,0.8) 0%, rgba(124,58,237,0.15) 100%);
}

.hero-content {
  position: relative; z-index: 2;
  max-width: 1200px; margin: 0 auto; padding: 80px 24px;
  max-width: 700px; margin-left: auto; margin-right: auto;
  text-align: center;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(124,58,237,0.2); border: 1px solid rgba(124,58,237,0.4);
  color: var(--accent-glow); font-size: 0.8rem; font-weight: 600;
  padding: 6px 16px; border-radius: 20px; margin-bottom: 24px;
  letter-spacing: 0.5px; text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 900; line-height: 1.1;
  margin-bottom: 20px; letter-spacing: -1px;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--accent-light), var(--accent-glow));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem; color: var(--text-secondary);
  margin-bottom: 36px; max-width: 560px; margin-left: auto; margin-right: auto;
}

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 28px;
  font-size: 0.95rem; font-weight: 600; cursor: pointer;
  border: none; transition: all 0.25s; text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff; box-shadow: 0 4px 20px rgba(124,58,237,0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(124,58,237,0.5);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--accent-light); color: var(--accent-light);
  transform: translateY(-2px);
}

.btn-sm { padding: 10px 20px; font-size: 0.85rem; }

/* ===== SECTIONS ===== */
.section { padding: 80px 24px; }
.section-sm { padding: 48px 24px; }

.container { max-width: 1200px; margin: 0 auto; }

.section-header { text-align: center; margin-bottom: 56px; }

.section-tag {
  display: inline-block;
  color: var(--accent-light); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800; line-height: 1.2; margin-bottom: 16px;
}

.section-header p {
  color: var(--text-secondary); font-size: 1.05rem;
  max-width: 560px; margin: 0 auto;
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(124,58,237,0.4);
}

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

.card-body { padding: 20px; }

.card-tag {
  display: inline-block;
  background: rgba(124,58,237,0.15); color: var(--accent-light);
  font-size: 0.75rem; font-weight: 600; padding: 4px 10px;
  border-radius: 4px; margin-bottom: 10px; text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-title {
  font-size: 1.1rem; font-weight: 700; margin-bottom: 8px;
  color: var(--text-primary); line-height: 1.4;
}

.card-text { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 16px; }

.card-meta {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-muted); font-size: 0.8rem; margin-bottom: 16px;
}

/* ===== RATING STARS ===== */
.stars { color: #f59e0b; font-size: 0.9rem; letter-spacing: 2px; }

.rating-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3);
  color: #f59e0b; font-weight: 700; font-size: 0.85rem;
  padding: 4px 10px; border-radius: 6px;
}

/* ===== GRID ===== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ===== FEATURED SECTION ===== */
.featured-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}

.featured-main { grid-row: span 2; }

.featured-main .card-img { height: 320px; }

/* ===== STATS BAR ===== */
.stats-bar {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 32px 24px;
}

.stats-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-around; flex-wrap: wrap; gap: 24px;
}

.stat-item { text-align: center; }

.stat-number {
  font-size: 2rem; font-weight: 900; color: var(--accent-light);
  line-height: 1;
}

.stat-label { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }

/* ===== TOURNAMENT CARD ===== */
.tournament-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.25s;
}

.tournament-card:hover {
  border-color: rgba(124,58,237,0.4);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.t-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }

.t-game { color: var(--accent-light); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

.t-status {
  font-size: 0.75rem; font-weight: 600; padding: 4px 10px; border-radius: 4px;
}

.t-status.live { background: rgba(16,185,129,0.15); color: #10b981; border: 1px solid rgba(16,185,129,0.3); }
.t-status.upcoming { background: rgba(124,58,237,0.15); color: var(--accent-light); border: 1px solid rgba(124,58,237,0.3); }
.t-status.ended { background: rgba(107,104,144,0.15); color: var(--text-muted); border: 1px solid rgba(107,104,144,0.3); }

.t-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }

.t-details { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }

.t-detail { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: 0.85rem; }

.t-detail svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ===== NEWSLETTER ===== */
.newsletter-section {
  background: linear-gradient(135deg, rgba(124,58,237,0.1), rgba(168,85,247,0.05));
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: var(--radius);
  padding: 56px 40px; text-align: center;
}

.newsletter-section h2 { font-size: 2rem; font-weight: 800; margin-bottom: 12px; }
.newsletter-section p { color: var(--text-secondary); margin-bottom: 32px; }

.newsletter-form {
  display: flex; gap: 12px; max-width: 480px; margin: 0 auto;
}

.newsletter-form input {
  flex: 1; padding: 14px 20px;
  background: var(--bg-dark); border: 1px solid var(--border);
  border-radius: 28px; color: var(--text-primary); font-size: 0.95rem;
  outline: none; transition: border-color 0.2s;
}

.newsletter-form input:focus { border-color: var(--accent-light); }
.newsletter-form input::placeholder { color: var(--text-muted); }

/* ===== FORMS ===== */
.form-group { margin-bottom: 20px; }

.form-group label {
  display: block; font-size: 0.9rem; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; padding: 13px 16px;
  background: var(--bg-dark); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-size: 0.95rem; font-family: inherit; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-group select option { background: var(--bg-card); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-message {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 500; margin-top: 16px;
  display: none;
}

.form-message.success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); color: #10b981; display: block; }
.form-message.error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #ef4444; display: block; }

/* ===== PAGE HERO ===== */
.page-hero {
  padding: 120px 24px 60px;
  text-align: center;
  background: linear-gradient(180deg, rgba(124,58,237,0.08) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 900; margin-bottom: 12px; }
.page-hero p { color: var(--text-secondary); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }

/* ===== ABOUT PAGE ===== */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
}

.about-img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }

.about-text h2 { font-size: 2rem; font-weight: 800; margin-bottom: 16px; }
.about-text p { color: var(--text-secondary); margin-bottom: 16px; }

.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.team-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; text-align: center;
  transition: all 0.25s;
}

.team-card:hover { border-color: rgba(124,58,237,0.4); transform: translateY(-2px); }

.team-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700; color: #fff;
  margin: 0 auto 12px;
}

.team-name { font-weight: 700; margin-bottom: 4px; }
.team-role { color: var(--text-muted); font-size: 0.85rem; }

/* ===== CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 48px; }

.contact-info h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 20px; }

.contact-item {
  display: flex; gap: 16px; margin-bottom: 24px;
}

.contact-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: rgba(124,58,237,0.15); border: 1px solid rgba(124,58,237,0.3);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg { width: 20px; height: 20px; color: var(--accent-light); }

.contact-item-text strong { display: block; font-weight: 600; margin-bottom: 2px; }
.contact-item-text span { color: var(--text-secondary); font-size: 0.9rem; }

.contact-form-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
}

.contact-form-box h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 24px; }

/* ===== POLICY PAGES ===== */
.policy-content {
  max-width: 800px; margin: 0 auto; padding: 80px 24px;
}

.policy-content h1 { font-size: 2.2rem; font-weight: 900; margin-bottom: 8px; }
.policy-content .policy-date { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 40px; }

.policy-content h2 {
  font-size: 1.3rem; font-weight: 700; color: var(--accent-light);
  margin: 36px 0 12px; padding-top: 8px;
  border-top: 1px solid var(--border);
}

.policy-content p { color: var(--text-secondary); margin-bottom: 16px; }
.policy-content ul { color: var(--text-secondary); padding-left: 24px; margin-bottom: 16px; }
.policy-content ul li { margin-bottom: 8px; }
.policy-content a { color: var(--accent-light); }

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 56px 24px 24px;
}

.footer-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p { color: var(--text-muted); font-size: 0.9rem; margin-top: 12px; max-width: 280px; }

.footer-col h4 { font-weight: 700; margin-bottom: 16px; font-size: 0.95rem; }

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: var(--text-muted); font-size: 0.9rem; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--accent-light); }

.footer-bottom {
  max-width: 1200px; margin: 0 auto;
  padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}

.footer-bottom p { color: var(--text-muted); font-size: 0.85rem; }

.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: var(--text-muted); font-size: 0.85rem; }
.footer-bottom-links a:hover { color: var(--accent-light); }

/* ===== COOKIE BANNER ===== */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 2000;
  background: var(--bg-card); border-top: 1px solid var(--border);
  padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  transform: translateY(100%); transition: transform 0.4s ease;
}

.cookie-banner.visible { transform: translateY(0); }

.cookie-banner p { color: var(--text-secondary); font-size: 0.9rem; flex: 1; min-width: 200px; }
.cookie-banner a { color: var(--accent-light); }

.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed; bottom: 80px; right: 24px; z-index: 999;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(124,58,237,0.4);
}

.back-to-top.visible { opacity: 1; pointer-events: all; }
.back-to-top:hover { background: var(--accent-light); transform: translateY(-2px); }

.back-to-top svg { width: 20px; height: 20px; color: #fff; }

/* ===== FILTER TABS ===== */
.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }

.filter-tab {
  padding: 8px 18px; border-radius: 20px; font-size: 0.85rem; font-weight: 600;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-secondary); cursor: pointer; transition: all 0.2s;
}

.filter-tab:hover, .filter-tab.active {
  background: rgba(124,58,237,0.15); border-color: var(--accent-light);
  color: var(--accent-light);
}

/* ===== SEARCH BAR ===== */
.search-bar {
  display: flex; gap: 12px; margin-bottom: 32px;
}

.search-bar input {
  flex: 1; padding: 12px 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 28px; color: var(--text-primary); font-size: 0.95rem;
  outline: none; transition: border-color 0.2s;
}

.search-bar input:focus { border-color: var(--accent-light); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .featured-grid { grid-template-columns: 1fr; }
  .featured-main { grid-row: span 1; }
}

@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: var(--bg-nav); border-bottom: 1px solid var(--border); padding: 16px; gap: 4px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .newsletter-form { flex-direction: column; }
  .form-row { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
