/* =========================================
   D2LB REDESIGN SYSTEM - MODERN ABYSS
   ========================================= */

:root {
  /* --- Color Palette --- */
  --bg-deep: #050505;
  --bg-dark: #0f0f0f;
  
  /* Modern Glass System */
  --bg-glass-base: rgba(15, 15, 15, 0.6);
  --bg-glass-hover: rgba(255, 255, 255, 0.03);
  --bg-glass-active: rgba(220, 20, 20, 0.08);
  
  /* --- Accents --- */
  --accent-primary: #e62020;    /* SF Red */
  --accent-bright: #ff4d4d;     /* Bright Red */
  --accent-glow: rgba(230, 32, 32, 0.5);
  
  /* --- Text --- */
  --text-primary: #ffffff;
  --text-secondary: #888888;
  --text-tertiary: #444444;
  
  /* --- Borders & Shadows --- */
  --border-subtle: 1px solid rgba(255, 255, 255, 0.06);
  --border-highlight: 1px solid rgba(255, 255, 255, 0.15);
  --shadow-panel: 0 20px 40px rgba(0,0,0,0.6);
  
  /* --- Dimensions --- */
  --sidebar-w: 320px;
  --right-panel-w: 300px;
  
  /* --- Transitions --- */
  --ease-smooth: cubic-bezier(0.2, 0.8, 0.2, 1);
  --trans-fast: 0.15s var(--ease-smooth);
  --trans-med: 0.3s var(--ease-smooth);
}

/* ================= RESET & BASE ================= */
* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  font-size: 14px;
}

a { text-decoration: none; color: inherit; transition: var(--trans-fast); }
button { border: none; background: none; cursor: pointer; font-family: inherit; }

/* ================= LAYOUT ================= */
.app-container {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr var(--right-panel-w);
  height: 100vh;
  gap: 0; /* Seamless layout */
}

/* ================= PANELS (MODERN) ================= */
.panel {
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100%;
  background: var(--bg-glass-base);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-right: var(--border-subtle);
}

.main-stage {
  border-right: none; /* Middle panel */
  background: transparent; /* Show video through */
}

.right-panel {
  border-left: var(--border-subtle);
  border-right: none;
}

/* ================= SIDEBAR (LEFT) ================= */
.logo-area {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  margin-bottom: 20px;
}

.logo-icon {
  width: 32px; height: 32px;
  background: var(--accent-primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  color: white;
  box-shadow: 0 0 20px var(--accent-glow);
}

.logo-text {
  font-family: 'Oswald', sans-serif;
  font-size: 48px;
  font-weight: 700;
  letter-spacing: 2px;
  text-align: center;
  width: 100%;
}

/* Nav Menu */
.nav-menu {
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-label {
  padding: 0 12px;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 13px;
  transition: var(--trans-fast);
}

.nav-item:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--bg-glass-active);
  color: var(--accent-bright);
}

.nav-icon {
  width: 20px;
  margin-right: 12px;
  opacity: 0.7;
}

.nav-item.active .nav-icon { opacity: 1; }

/* Friends List (Modern) */
.friends-list-container {
  margin-top: 32px;
  padding: 0 12px;
  flex: 1;
  overflow-y: auto;
}

.section-header {
  display: flex;
  justify-content: space-between;
  padding: 0 12px;
  margin-bottom: 12px;
}

.section-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-tertiary);
  letter-spacing: 1px;
}

.friend-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  transition: var(--trans-fast);
  cursor: pointer;
}

.friend-item:hover {
  background: var(--bg-glass-hover);
}

.f-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  margin-right: 10px;
  position: relative;
}

.f-avatar img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.f-status {
  position: absolute;
  bottom: 0; right: 0;
  width: 8px; height: 8px;
  background: #4caf50;
  border-radius: 50%;
  border: 2px solid #1a1a1a;
}

.f-info {
  display: flex;
  flex-direction: column;
}

.f-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.f-activity {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 16px 24px;
  border-top: var(--border-subtle);
}

/* ================= MAIN STAGE (CENTER) ================= */
.main-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.video-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.4;
}

.video-bg video {
  width: 100%; height: 100%;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at center, transparent 0%, var(--bg-deep) 100%);
}

.hero-content {
  text-align: center;
  z-index: 10;
  max-width: 800px;
  padding: 0 20px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  background: rgba(255,255,255,0.05);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--accent-bright);
  margin-bottom: 24px;
  border: 1px solid rgba(255,255,255,0.05);
}

.hero-title {
  font-family: 'Oswald', sans-serif;
  font-size: 6rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -2px;
  margin-bottom: 16px;
  text-transform: uppercase;
  background: linear-gradient(to bottom, #fff, #888);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 48px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Modern Play Button */
.play-btn {
  height: 64px;
  padding: 0 64px;
  background: var(--accent-primary);
  border-radius: 12px;
  font-family: 'Oswald', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: white;
  letter-spacing: 1px;
  transition: var(--trans-med);
  box-shadow: 0 10px 30px rgba(230, 32, 32, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.play-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(230, 32, 32, 0.5);
  background: var(--accent-bright);
}

.play-btn:active {
  transform: translateY(-1px);
}

.stats-bar {
  display: flex;
  gap: 40px;
  margin-top: 60px;
  padding: 20px 40px;
  background: rgba(255,255,255,0.03);
  border-radius: 100px;
  border: var(--border-subtle);
  backdrop-filter: blur(10px);
}

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

.stat-val {
  font-family: 'Oswald';
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-lbl {
  font-size: 10px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ================= RIGHT PANEL (PROFILE) ================= */
.right-panel {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.user-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px;
  background: var(--bg-glass-hover);
  border-radius: 16px;
  border: var(--border-subtle);
}

.u-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  margin-bottom: 16px;
  border: 2px solid var(--accent-primary);
  padding: 2px;
}

.u-avatar img {
  width: 100%; height: 100%;
  border-radius: 50%;
}

.u-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.u-rank {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-bright);
  background: rgba(230, 32, 32, 0.1);
  padding: 4px 10px;
  border-radius: 100px;
}

.activity-list {
  flex: 1;
  overflow-y: auto;
}

.match-item {
  display: flex;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  background: var(--bg-glass-hover);
}

.match-result {
  width: 4px;
  height: 32px;
  border-radius: 2px;
  margin-right: 12px;
}

.win { background: #4caf50; }
.loss { background: #f44336; }

.match-info {
  flex: 1;
}

.match-vs {
  font-size: 13px;
  font-weight: 500;
}

.match-date {
  font-size: 11px;
  color: var(--text-tertiary);
}

/* ================= UTILS ================= */
.hidden { display: none !important; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* ================= MATCH FOUND MODAL ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  width: 500px;
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid var(--accent-primary);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  position: relative;
  box-shadow: 0 0 100px rgba(230, 32, 32, 0.2);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay:not(.hidden) .modal-content {
  transform: scale(1);
}

.modal-title {
  font-family: 'Oswald', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 32px;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: linear-gradient(to right, #fff, #bbb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lobby-info {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
}

.info-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-row .label {
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
}

.info-row .value {
  font-family: 'Oswald', sans-serif;
  font-size: 42px;
  font-weight: 700;
  color: var(--accent-bright);
  letter-spacing: 4px;
  text-shadow: 0 0 20px rgba(230, 32, 32, 0.4);
}

.status-msg {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 32px;
}

.modal-btn {
  width: 100%;
  height: 56px;
  font-size: 16px;
  border-radius: 8px;
}
