/* =====================================================
   SSOJ ESPORT — Global Styles
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --color-primary: #7C3AED;
  --color-primary-dark: #5B21B6;
  --color-primary-light: #8B5CF6;
  --color-accent: #A78BFA;
  --color-white: #FFFFFF;
  --color-bg: #0F0F1A;
  --color-bg-card: #1A1A2E;
  --color-bg-card-hover: #1E1E35;
  --color-border: #2A2A4A;
  --color-text: #E8E8F0;
  --color-text-muted: #9999BB;
  --color-success: #10B981;
  --color-danger: #EF4444;
  --color-warning: #F59E0B;
  --color-info: #3B82F6;

  --font-title: 'Rajdhani', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(124, 58, 237, 0.15);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.4);
  --transition: all 0.2s ease;

  --navbar-h: 64px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

/* =====================================================
   LAYOUT
   ===================================================== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section-title {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.section-title span { color: var(--color-primary-light); }
.section-subtitle { color: var(--color-text-muted); margin-bottom: 40px; }

/* =====================================================
   NAVBAR
   ===================================================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--navbar-h);
  background: rgba(15, 15, 26, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.navbar-logo {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.navbar-logo span { color: var(--color-primary-light); }
.navbar-logo .logo-dot {
  width: 8px; height: 8px;
  background: var(--color-primary);
  border-radius: 50%;
  display: inline-block;
}
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.navbar-nav a {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: var(--transition);
}
.navbar-nav a:hover, .navbar-nav a.active {
  color: var(--color-white);
  background: rgba(124, 58, 237, 0.15);
}
.navbar-actions { display: flex; align-items: center; gap: 12px; }
.navbar-user { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.navbar-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  object-fit: cover;
  background: var(--color-bg-card);
}
.navbar-points {
  font-family: var(--font-title);
  font-weight: 600;
  color: var(--color-accent);
  font-size: 0.9rem;
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition);
}

/* =====================================================
   HERO
   ===================================================== */
.hero {
  padding-top: calc(var(--navbar-h) + 80px);
  padding-bottom: 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.2) 0%, transparent 70%);
  pointer-events: none;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.4);
  color: var(--color-accent);
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.05;
  margin-bottom: 20px;
}
.hero-title .glow {
  color: var(--color-primary-light);
  text-shadow: 0 0 40px rgba(139, 92, 246, 0.6);
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto 40px;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(124, 58, 237, 0.55);
}
.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-outline:hover {
  color: var(--color-white);
  border-color: var(--color-primary);
  background: rgba(124, 58, 237, 0.1);
}
.btn-danger { background: var(--color-danger); color: white; }
.btn-danger:hover { background: #dc2626; color: white; }
.btn-success { background: var(--color-success); color: white; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 32px; font-size: 1.1rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* =====================================================
   CARDS
   ===================================================== */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover {
  border-color: rgba(124, 58, 237, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.card-body { padding: 20px; }
.card-img {
  width: 100%; height: 180px;
  object-fit: cover;
  background: linear-gradient(135deg, #1A1A2E 0%, #2A1A4E 100%);
}
.card-img-placeholder {
  width: 100%; height: 180px;
  background: linear-gradient(135deg, #1A1A2E 0%, #2A1A4E 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

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

/* =====================================================
   BADGES
   ===================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-upcoming  { background: rgba(59, 130, 246, 0.15); color: #60A5FA; border: 1px solid rgba(59,130,246,0.3); }
.badge-ongoing   { background: rgba(16, 185, 129, 0.15); color: #34D399; border: 1px solid rgba(16,185,129,0.3); }
.badge-finished  { background: rgba(107, 114, 128, 0.15); color: #9CA3AF; border: 1px solid rgba(107,114,128,0.3); }
.badge-cancelled { background: rgba(239, 68, 68, 0.15); color: #FCA5A5; border: 1px solid rgba(239,68,68,0.3); }
.badge-draft     { background: rgba(245, 158, 11, 0.15); color: #FCD34D; border: 1px solid rgba(245,158,11,0.3); }

.role-badge { font-size: 0.75rem; padding: 2px 8px; border-radius: 4px; font-weight: 600; text-transform: uppercase; }
.role-joueur       { background: rgba(107,114,128,0.2); color: #9CA3AF; }
.role-moderateur   { background: rgba(59,130,246,0.2); color: #60A5FA; }
.role-organisateur { background: rgba(16,185,129,0.2); color: #34D399; }
.role-admin        { background: rgba(245,158,11,0.2); color: #FCD34D; }
.role-fondateur    { background: rgba(239,176,68,0.2); color: #F59E0B; border: 1px solid rgba(239,176,68,0.4); }

/* =====================================================
   FORMS
   ===================================================== */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}
.form-control {
  width: 100%;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 16px;
  transition: var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(124,58,237,0.15); }
.form-control::placeholder { color: var(--color-text-muted); }

/* =====================================================
   MODAL
   ===================================================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 480px;
  width: 100%;
  transform: translateY(20px) scale(0.97);
  transition: var(--transition);
}
.modal-overlay.active .modal { transform: translateY(0) scale(1); }
.modal-title { font-size: 1.4rem; margin-bottom: 12px; }
.modal-body { color: var(--color-text-muted); margin-bottom: 24px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; }

/* =====================================================
   TOAST
   ===================================================== */
.toast-container {
  position: fixed;
  top: calc(var(--navbar-h) + 16px);
  right: 16px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 18px;
  min-width: 280px;
  box-shadow: var(--shadow-card);
  animation: slideIn 0.3s ease;
}
.toast.success { border-left: 3px solid var(--color-success); }
.toast.error   { border-left: 3px solid var(--color-danger); }
.toast.info    { border-left: 3px solid var(--color-info); }
.toast-icon { font-size: 1.1rem; }
.toast-msg { flex: 1; font-size: 0.9rem; }
.toast-close { cursor: pointer; color: var(--color-text-muted); font-size: 1.1rem; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
  background: var(--color-bg-card);
  border-top: 1px solid var(--color-border);
  padding: 48px 0 24px;
  margin-top: 80px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand-title {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: 8px;
}
.footer-brand-desc { color: var(--color-text-muted); font-size: 0.9rem; max-width: 280px; }
.footer-col-title {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--color-text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--color-white); }
.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* =====================================================
   STATS BAR
   ===================================================== */
.stats-bar {
  display: flex;
  gap: 0;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat-item {
  flex: 1;
  padding: 24px;
  text-align: center;
  border-right: 1px solid var(--color-border);
}
.stat-item:last-child { border-right: none; }
.stat-value {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-white);
}
.stat-label { font-size: 0.85rem; color: var(--color-text-muted); margin-top: 4px; }

/* =====================================================
   PAGE HEADER
   ===================================================== */
.page-header {
  padding-top: calc(var(--navbar-h) + 48px);
  padding-bottom: 48px;
}
.page-header-title { font-size: 2.5rem; text-transform: uppercase; }
.page-header-sub { color: var(--color-text-muted); margin-top: 8px; }

/* =====================================================
   TABS
   ===================================================== */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--color-border); margin-bottom: 32px; }
.tab-btn {
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--color-text); }
.tab-btn.active { color: var(--color-primary-light); border-bottom-color: var(--color-primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* =====================================================
   TABLE
   ===================================================== */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--color-border); }
table { width: 100%; border-collapse: collapse; }
thead th {
  background: var(--color-bg-card);
  padding: 14px 16px;
  text-align: left;
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}
tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(42,42,74,0.5);
  font-size: 0.9rem;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--color-bg-card-hover); }

/* =====================================================
   PROGRESS BAR
   ===================================================== */
.progress { background: var(--color-bg); border-radius: 100px; height: 8px; overflow: hidden; }
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 100px;
  transition: width 0.4s ease;
}

/* =====================================================
   LOADING SPINNER
   ===================================================== */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.loading-center { display: flex; justify-content: center; align-items: center; padding: 60px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================
   FILTERS
   ===================================================== */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.filter-btn {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 16px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn:hover { border-color: var(--color-primary); color: var(--color-text); }
.filter-btn.active { background: var(--color-primary); border-color: var(--color-primary); color: white; }

/* =====================================================
   DISCORD OAUTH BUTTONS
   ===================================================== */
.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: var(--transition);
  background: var(--color-bg);
  color: var(--color-text);
  text-decoration: none;
}
.oauth-btn:hover { transform: translateY(-1px); }
.oauth-discord { border-color: #5865F2; color: #5865F2; }
.oauth-discord:hover { background: rgba(88,101,242,0.1); color: #5865F2; }
.oauth-google { border-color: #EA4335; color: #EA4335; }
.oauth-google:hover { background: rgba(234,67,53,0.1); color: #EA4335; }
.oauth-twitch { border-color: #9146FF; color: #9146FF; }
.oauth-twitch:hover { background: rgba(145,70,255,0.1); color: #9146FF; }

/* =====================================================
   PAGINATION
   ===================================================== */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; }
.page-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text-muted);
  cursor: pointer;
  font-family: var(--font-title);
  font-weight: 600;
  transition: var(--transition);
}
.page-btn:hover, .page-btn.active { background: var(--color-primary); border-color: var(--color-primary); color: white; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* =====================================================
   ALERT / NOTICE
   ===================================================== */
.alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 20px;
}
.alert-warning { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3); color: #FCD34D; }
.alert-info    { background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.3); color: #93C5FD; }
.alert-danger  { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #FCA5A5; }

/* =====================================================
   POINTS ICON
   ===================================================== */
.points-icon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--color-accent);
  font-family: var(--font-title);
  font-weight: 700;
}
.points-icon::before { content: '◆'; font-size: 0.7em; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
  .navbar-nav { display: none; }
  .hamburger { display: flex; }
  .navbar-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--navbar-h); left: 0; right: 0;
    background: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
    padding: 16px;
    gap: 4px;
  }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-bar { flex-direction: column; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--color-border); }
  .hero { padding-top: calc(var(--navbar-h) + 40px); }
}
@media (max-width: 480px) {
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
  .section-title { font-size: 1.5rem; }
}
