:root {
  --bg-dark: #0f1923;
  --bg-surface: #172430;
  --bg-card: rgba(23, 36, 48, 0.88);
  --bg-glass: rgba(15, 25, 35, 0.85);
  
  --val-red: #ff4655;
  --val-red-hover: #ff2b3d;
  --val-cyan: #00f0ff;
  --val-gold: #ffd700;
  --val-text: #ece8e1;
  --val-text-muted: #8b978f;
  --val-border: rgba(255, 255, 255, 0.12);
  --val-border-focus: rgba(255, 70, 85, 0.6);

  --font-main: 'Rajdhani', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-dark);
  color: var(--val-text);
  font-family: var(--font-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(255, 70, 85, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 240, 255, 0.05) 0%, transparent 40%);
}

/* HEADER */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 2rem;
  background: var(--bg-glass);
  border-bottom: 1px solid var(--val-border);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
}

.v-icon {
  background: var(--val-red);
  color: #fff;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(0 0, 100% 0, 80% 100%, 0 100%);
}

.titles .logo-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1;
}

.titles .logo-sub {
  font-size: 0.8rem;
  color: var(--val-red);
  letter-spacing: 3px;
  font-weight: 600;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/* LANGUAGE SWITCHER */
.lang-switch-wrap {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--val-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.btn-lang {
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  background: transparent;
  color: var(--val-text-muted);
  border: none;
  cursor: pointer;
}

.btn-lang.active {
  background: var(--val-red);
  color: #fff;
}

.btn-admin {
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid var(--val-gold);
  color: var(--val-gold);
  font-weight: 700;
  letter-spacing: 1px;
}

.btn-admin:hover {
  background: var(--val-gold);
  color: #000;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: var(--font-body);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--val-border);
}

.status-badge .dot,
.conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-badge.online .dot,
.conn-dot.online {
  background: #00ff88;
  box-shadow: 0 0 6px #00ff88;
}

.status-badge.offline .dot,
.conn-dot.offline {
  background: var(--val-red);
  box-shadow: 0 0 6px var(--val-red);
}

/* ==================== ADMIN DRAWER ==================== */
.admin-drawer {
  position: fixed;
  top: 0;
  right: -380px;
  width: 360px;
  height: 100vh;
  background: var(--bg-surface);
  border-left: 2px solid var(--val-gold);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
  z-index: 300;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.admin-drawer.open {
  right: 0;
}

.admin-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem;
  border-bottom: 1px solid var(--val-border);
  background: rgba(0, 0, 0, 0.2);
}

.admin-drawer-header h3 {
  font-size: 1.3rem;
  color: var(--val-gold);
  letter-spacing: 1px;
}

.btn-close {
  background: transparent;
  color: var(--val-text-muted);
  font-size: 1.6rem;
  border: none;
  cursor: pointer;
}

.btn-close:hover {
  color: #fff;
}

.admin-drawer-body {
  padding: 1.2rem;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.admin-note {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--val-text-muted);
}

.admin-action-block {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--val-border);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.admin-action-block h4 {
  font-size: 0.95rem;
  color: var(--val-cyan);
  letter-spacing: 1px;
  margin-bottom: 0.8rem;
}

.sub-desc {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--val-text-muted);
  margin-top: 0.2rem;
}

.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  z-index: 250;
  display: none;
}

.drawer-backdrop.open {
  display: block;
}

img {
  max-width: 100%;
  height: auto;
  user-select: none;
}

/* MAIN CONTAINER */
.main-container {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
}

/* PANELS */
.view-panel {
  display: none !important;
}

.view-panel.active {
  display: block !important;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* BUTTONS */
button {
  font-family: var(--font-main);
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.2s ease;
}

.btn-radiant {
  padding: 0.8rem 1.6rem;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  position: relative;
  clip-path: polygon(8px 0%, 100% 0%, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0% 100%, 0% 8px);
}

.btn-primary {
  background: var(--val-red);
  color: #fff;
}

.btn-primary:hover {
  background: var(--val-red-hover);
  box-shadow: 0 0 15px rgba(255, 70, 85, 0.5);
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--val-cyan);
}

.btn-danger {
  background: rgba(255, 70, 85, 0.2);
  color: var(--val-red);
  border: 1px solid var(--val-red);
}

.btn-danger:hover {
  background: var(--val-red);
  color: #fff;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: var(--val-text);
  border: 1px solid var(--val-border);
}

.btn-sm:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.08);
  color: var(--val-text);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  border: 1px solid var(--val-border);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--val-cyan);
}

.btn-report {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.6;
  transition: opacity 0.2s;
  padding: 0.2rem;
}

.btn-report:hover {
  opacity: 1;
  transform: scale(1.15);
}

.full-width { width: 100%; }
.mb-2 { margin-bottom: 0.6rem; }
.mt-2 { margin-top: 1rem; }
.mr-2 { margin-right: 0.6rem; }
.text-center { text-align: center; }

/* CARDS */
.card {
  background: var(--bg-card);
  border: 1px solid var(--val-border);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  backdrop-filter: blur(8px);
}

.login-card {
  max-width: 480px;
  margin: 4rem auto;
  border-top: 3px solid var(--val-red);
}

.hero-val-badge {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 3px;
  color: var(--val-red);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card-header h2 {
  font-size: 1.8rem;
  letter-spacing: 1px;
}

.card-header .subtitle {
  color: var(--val-text-muted);
  font-family: var(--font-body);
  font-size: 0.95rem;
  margin-top: 0.2rem;
  margin-bottom: 1.5rem;
}

/* ==================== HUB VIEW ==================== */
.hub-welcome-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--val-border);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.8rem;
  margin-bottom: 1.5rem;
}

.user-greeting .greet-sub {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--val-text-muted);
}

.user-greeting .greet-name {
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.badge-flagged {
  font-size: 0.75rem;
  background: rgba(255, 70, 85, 0.2);
  color: var(--val-red);
  border: 1px solid var(--val-red);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.badge-admin {
  font-size: 0.75rem;
  background: rgba(255, 215, 0, 0.2);
  color: var(--val-gold);
  border: 1px solid var(--val-gold);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  letter-spacing: 1px;
}

.hub-profile-actions {
  display: flex;
  gap: 0.6rem;
}

.hub-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.hub-action-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-top: 3px solid var(--val-cyan);
}

.hub-action-card:first-child {
  border-top-color: var(--val-red);
}

.hub-card-icon {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.hub-action-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.2rem;
}

.hub-action-card p {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--val-text-muted);
  margin-bottom: 1.2rem;
}

/* LOBBIES LIST */
.card-header-sm {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--val-border);
}

.lobbies-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 80px;
}

.lobby-row-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--val-border);
  border-radius: var(--radius-sm);
}

.lobby-row-card .r-code {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--val-red);
}

.lobby-row-card .r-status {
  font-size: 0.85rem;
  color: var(--val-text-muted);
  font-family: var(--font-body);
}

/* FORMS */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.form-grid.single-col {
  grid-template-columns: 1fr;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  color: var(--val-text-muted);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.input-select {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--val-border);
  color: #fff;
  font-family: var(--font-main);
  font-size: 1.1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease;
}

.input-select option {
  background: var(--bg-surface);
  color: #fff;
}

.form-group input:focus,
.input-select:focus {
  border-color: var(--val-red);
  outline: none;
  box-shadow: 0 0 8px rgba(255, 70, 85, 0.3);
}

/* TEAM SELECTOR */
.team-selector {
  display: flex;
  gap: 1rem;
}

.team-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--val-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 700;
  font-size: 1.1rem;
}

.team-btn input { display: none; }
.team-btn.attack { border-left: 4px solid var(--val-red); }
.team-btn.defense { border-left: 4px solid var(--val-cyan); }
.team-btn:has(input:checked) {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* AGENTS SELECTION GRID */
.agent-pool-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.pool-actions {
  display: flex;
  gap: 0.5rem;
}

.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.6rem;
  max-height: 250px;
  overflow-y: auto;
  padding: 0.6rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--val-border);
  border-radius: var(--radius-sm);
}

.agent-checkbox-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.6rem 0.4rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--val-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.agent-checkbox-card:hover {
  background: rgba(255, 255, 255, 0.08);
}

.agent-checkbox-card.selected {
  border-color: var(--val-red);
  background: rgba(255, 70, 85, 0.15);
  box-shadow: 0 0 8px rgba(255, 70, 85, 0.3);
}

.agent-checkbox-card img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  object-position: center center;
  border-radius: 6px;
  margin-bottom: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, #0f1923 100%);
  padding: 2px;
}

.agent-checkbox-card span {
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* ==================== VIEW 2 : LOBBY ==================== */
.lobby-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--val-border);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.lobby-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.lobby-info .code {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--val-red);
  letter-spacing: 2px;
}

.badge {
  padding: 0.3rem 0.8rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--val-border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.teams-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.team-column {
  background: var(--bg-card);
  border: 1px solid var(--val-border);
  border-radius: var(--radius-md);
  padding: 1.2rem;
}

.team-attack { border-top: 4px solid var(--val-red); }
.team-defense { border-top: 4px solid var(--val-cyan); }

.team-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--val-border);
}

.player-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 200px;
}

.player-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--val-border);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.player-card.is-me {
  border-color: var(--val-gold);
  background: rgba(255, 215, 0, 0.06);
}

.player-card .p-name {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.crown-icon {
  color: var(--val-gold);
  font-size: 0.9rem;
}

.p-status-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.p-status {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.p-status.ready {
  background: rgba(0, 255, 136, 0.2);
  color: #00ff88;
}

.p-status.waiting {
  background: rgba(255, 255, 255, 0.1);
  color: var(--val-text-muted);
}

.lobby-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  padding: 1.2rem 1.5rem;
  border: 1px solid var(--val-border);
  border-radius: var(--radius-md);
}

.lobby-status-note {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--val-text-muted);
}

.lobby-actions {
  display: flex;
  gap: 1rem;
}

/* SWITCH */
.switch-container {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  user-select: none;
}

.switch-container input { display: none; }

.slider {
  width: 38px;
  height: 20px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  position: relative;
  transition: 0.3s;
}

.slider:before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}

.switch-container input:checked + .slider { background: var(--val-red); }
.switch-container input:checked + .slider:before { transform: translateX(18px); }

/* ==================== VIEW 3 : IN-GAME VIEW & HUD ==================== */
.game-hud-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg, rgba(22, 33, 46, 0.95), rgba(12, 20, 28, 0.95));
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--val-border);
  border-top: 3px solid var(--val-cyan);
  border-radius: var(--radius-md);
  margin-bottom: 1.2rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  flex-wrap: wrap;
  gap: 1rem;
}

.hud-round-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(0, 0, 0, 0.45);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hud-round-pill .round-label {
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: var(--val-text-muted);
  font-weight: 700;
}

.hud-round-pill .round-number {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--val-gold);
  line-height: 1;
}

.hud-score-board {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.3rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--val-border);
}

.hud-score-board .score-team {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.1rem;
}

.hud-score-board .score-team.attack { color: #FF7675; }
.hud-score-board .score-team.defense { color: #74B9FF; }

.hud-score-board .team-score {
  font-size: 1.8rem;
  font-family: var(--font-heading);
  background: rgba(0, 0, 0, 0.5);
  padding: 0.1rem 0.6rem;
  border-radius: 4px;
  min-width: 32px;
  text-align: center;
  color: #fff;
}

.hud-score-board .score-vs {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--val-text-muted);
  letter-spacing: 1px;
}

.hud-phase-pill {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.4rem 1rem;
  border-radius: 25px;
  border: 1px solid var(--val-border);
}

.phase-indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--val-cyan);
  box-shadow: 0 0 8px var(--val-cyan);
  animation: pulse 1.5s infinite;
}

.phase-texts {
  display: flex;
  flex-direction: column;
}

.phase-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  line-height: 1.1;
}

.phase-sub {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--val-text-muted);
}

.hud-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* GAME GRID LAYOUT */
.game-grid-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.2rem;
  align-items: start;
  margin-bottom: 1.5rem;
}

.game-left-col, .game-right-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* AGENT HERO CARD */
.agent-hero-card {
  background: linear-gradient(135deg, rgba(25, 36, 48, 0.95), rgba(15, 22, 32, 0.95));
  border: 1px solid var(--val-border);
  border-left: 5px solid var(--val-red);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.agent-hero-card .agent-avatar-wrap {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--val-red);
  overflow: hidden;
  background: radial-gradient(circle, rgba(255, 70, 85, 0.25) 0%, #0f1923 100%);
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(255, 70, 85, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.agent-hero-card .agent-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  padding: 2px;
}

.agent-hero-details {
  display: flex;
  flex-direction: column;
}

.agent-hero-role {
  font-size: 0.75rem;
  letter-spacing: 2px;
  color: var(--val-cyan);
  font-weight: 700;
  text-transform: uppercase;
}

.agent-hero-name {
  font-size: 2.2rem;
  font-family: var(--font-heading);
  color: #fff;
  margin: 0;
  line-height: 1;
  letter-spacing: 1px;
}

.agent-details .role-tag {
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: var(--val-red);
  font-weight: 700;
  text-transform: uppercase;
}

.agent-details .agent-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

/* VALORANT CREDITS TERMINAL BOX */
.credits-box {
  background: linear-gradient(135deg, rgba(20, 32, 45, 0.95), rgba(12, 20, 30, 0.95));
  border: 2px solid var(--val-gold);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  box-shadow: 0 10px 30px rgba(255, 215, 0, 0.15);
  display: flex;
  flex-direction: column;
}

.credits-box-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.credits-currency-icon {
  font-size: 2.2rem;
  color: var(--val-gold);
  line-height: 1;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.credits-box-title {
  font-size: 1.2rem;
  color: var(--val-gold);
  letter-spacing: 1px;
  margin: 0;
}

.credits-box-sub {
  font-size: 0.82rem;
  color: var(--val-text-muted);
  margin: 0.2rem 0 0 0;
}

.credits-row-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.terminal-field-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--val-text-muted);
  text-transform: uppercase;
}

.credits-input-group,
.shield-input-group {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.credits-symbol-wrap {
  background: rgba(255, 215, 0, 0.15);
  color: var(--val-gold);
  font-weight: 700;
  font-size: 1.4rem;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--val-gold);
}

.shield-symbol-wrap {
  background: rgba(0, 240, 255, 0.15);
  color: var(--val-cyan);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0 0.8rem;
  display: flex;
  align-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--val-cyan);
}

.credits-input-group input,
.shield-input-group input {
  flex: 1;
  min-width: 100px;
  font-size: 1.3rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--val-border);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  outline: none;
}

.credits-input-group input:focus {
  border-color: var(--val-gold);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.shield-input-group input:focus {
  border-color: var(--val-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.shield-quick-chips {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}

.btn-shield-chip {
  padding: 0.35rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--val-border);
  color: var(--val-text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-shield-chip:hover {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--val-cyan);
  color: var(--val-cyan);
}

.btn-shield-chip.active {
  background: rgba(0, 240, 255, 0.25);
  border-color: var(--val-cyan);
  color: #fff;
}

.shield-help-note {
  font-size: 0.76rem;
  color: var(--val-text-muted);
  line-height: 1.4;
  margin-top: 0.3rem;
  font-family: var(--font-body);
}

.shield-help-note strong {
  color: var(--val-cyan);
}

.locked-box {
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.4);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
}

.locked-icon {
  font-size: 2rem;
  margin-bottom: 0.3rem;
}

.locked-box h4 {
  color: #00ff88;
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.locked-box p {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--val-text-muted);
}

/* BUILD DISPLAY CARD */
.build-display-card {
  background: linear-gradient(135deg, rgba(20, 30, 42, 0.95), rgba(12, 18, 25, 0.95));
  border: 1px solid var(--val-border);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 0.8rem;
  animation: pulse 2s infinite;
}

.empty-state h3 {
  font-size: 1.4rem;
  color: var(--val-cyan);
  letter-spacing: 1px;
  margin-bottom: 0.4rem;
}

.empty-state p {
  color: var(--val-text-muted);
  font-size: 0.9rem;
}

/* BUILD BUDGET HEADER */
.build-header-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.45);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--val-border);
  margin-bottom: 1.2rem;
}

.b-stat {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.b-stat .lbl {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--val-text-muted);
}

.b-stat .val {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: #fff;
}

.b-stat .val.gold {
  color: var(--val-gold);
}

/* ITEMS GRID (WEAPON & SHIELD) */
.build-items-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.build-item-box {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.35));
  border: 1px solid var(--val-border);
  border-radius: var(--radius-sm);
  padding: 1.1rem;
  position: relative;
  transition: transform 0.2s, border-color 0.2s;
}

.build-item-box:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
}

.build-item-box.weapon-box {
  border-left: 4px solid var(--val-red);
}

.build-item-box.shield-box {
  border-left: 4px solid var(--val-cyan);
}

.item-badge {
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  color: var(--val-text-muted);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.build-item-box h3 {
  font-size: 1.8rem;
  font-family: var(--font-heading);
  color: #fff;
  margin: 0.1rem 0 0.3rem 0;
  letter-spacing: 0.5px;
}

.item-cat {
  font-size: 0.82rem;
  color: var(--val-text-muted);
  display: block;
}

.item-cost {
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--val-gold);
  margin-top: 0.3rem;
  display: inline-block;
}

/* ABILITIES SECTION & ICONS */
.build-abilities-box {
  margin-bottom: 1.2rem;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--val-cyan);
  letter-spacing: 1px;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}

.abilities-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.8rem;
}

.ability-buy-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--val-border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: all 0.15s ease;
}

.ability-buy-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--val-cyan);
}

.ability-key-badge {
  background: var(--val-red);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(255, 70, 85, 0.4);
}

.ability-icon-wrap {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--val-border);
  border-radius: var(--radius-sm);
  padding: 3px;
  flex-shrink: 0;
}

.ability-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

.ability-info {
  flex: 1;
  min-width: 0;
}

.ability-info h5 {
  font-size: 0.95rem;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ability-qty {
  font-size: 0.82rem;
  color: var(--val-cyan);
  font-weight: 700;
  margin-top: 0.1rem;
  display: block;
}

/* CHALLENGE / MODIFIER BOX */
.build-modifier-box {
  background: linear-gradient(135deg, rgba(255, 70, 85, 0.12), rgba(0, 0, 0, 0.4));
  border: 1px solid var(--val-red);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mod-icon {
  font-size: 1.8rem;
}

.mod-content h4 {
  font-size: 1.1rem;
  color: var(--val-red);
  margin: 0 0 0.2rem 0;
}

.mod-content p {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--val-text-muted);
  margin: 0;
}

/* TEAM OVERVIEW SECTION */
.team-overview-section {
  background: linear-gradient(180deg, rgba(20, 30, 42, 0.95), rgba(12, 18, 26, 0.95));
  border: 1px solid var(--val-border);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.5rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.overview-title {
  font-size: 1.1rem;
  color: var(--val-cyan);
  letter-spacing: 1px;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--val-border);
  padding-bottom: 0.5rem;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.overview-player-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--val-border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.overview-player-card:hover {
  background: rgba(255, 255, 255, 0.03);
}

.overview-player-card.attack { border-left: 4px solid var(--val-red); }
.overview-player-card.defense { border-left: 4px solid var(--val-cyan); }

.overview-player-card .p-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 700;
}

.overview-player-card .p-title-wrap img,
.player-card .p-name img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: contain;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, #0f1923 100%);
  border: 1px solid var(--val-border);
  padding: 1px;
  vertical-align: middle;
}

.overview-player-card .p-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.overview-player-card .p-build-line {
  font-size: 0.82rem;
  font-family: var(--font-body);
  color: var(--val-text-muted);
  line-height: 1.3;
}

.overview-player-card .p-build-line strong { color: #fff; }

/* MODALS */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal.active { display: flex; }

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--val-border);
  border-top: 4px solid var(--val-red);
  border-radius: var(--radius-md);
  padding: 2rem;
  width: 85vw;
  max-width: 950px;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-lg, .modal-large {
  width: 90vw;
  max-width: 1100px;
  height: 88vh;
  max-height: 88vh;
}

.modal-dm {
  width: 80vw;
  max-width: 550px;
  height: 520px;
}

.modal-profile-view {
  width: 90vw;
  max-width: 1150px;
  height: 88vh;
  max-height: 88vh;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--val-border);
  padding-bottom: 0.8rem;
}

.modal-header-bar h3 {
  font-size: 1.3rem;
  letter-spacing: 1px;
}

.settings-scroll-body {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-right: 0.4rem;
}

.settings-section h4 {
  font-size: 1.1rem;
  color: var(--val-cyan);
  margin-bottom: 0.3rem;
}

.keybind-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.keybind-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--val-border);
  border-radius: var(--radius-sm);
}

.input-keybind {
  width: 60px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--val-border);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 0.2rem;
  text-transform: uppercase;
}

.input-keybind:focus {
  border-color: var(--val-red);
  outline: none;
}

.modal-footer-bar {
  border-top: 1px solid var(--val-border);
  padding-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

#qrcode-container {
  padding: 10px;
  background: #fff;
  border-radius: var(--radius-sm);
  margin: 0 auto;
}

.qr-url {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--val-cyan);
  word-break: break-all;
  text-align: center;
}

/* ==================== OWNED INVENTORY COUNTERS ==================== */
.owned-inventory-wrap {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--val-border);
  border-radius: var(--radius-sm);
  padding: 0.8rem;
}

.owned-inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.6rem;
}

.btn-inv-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--val-border);
  border-radius: var(--radius-sm);
  color: var(--val-text);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-inv-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--val-cyan);
}

.btn-inv-chip.has-owned {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--val-cyan);
  color: #fff;
}

.inv-badge {
  background: var(--val-cyan);
  color: #000;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

/* ==================== VOTEKICK BANNER (CS STYLE) ==================== */
.votekick-banner {
  position: sticky;
  top: 65px;
  z-index: 150;
  background: rgba(23, 36, 48, 0.96);
  border: 2px solid var(--val-red);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 30px rgba(255, 70, 85, 0.35);
  backdrop-filter: blur(10px);
  margin-bottom: 1.5rem;
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.votekick-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.votekick-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.votekick-info h4 {
  font-size: 1.1rem;
  color: var(--val-red);
  letter-spacing: 1px;
}

.votekick-info p {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0.1rem 0;
}

.vk-sub {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--val-text-muted);
}

.votekick-actions {
  display: flex;
  gap: 0.8rem;
}

.btn-votekick {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.6;
  transition: opacity 0.2s;
  padding: 0.2rem;
}

.btn-votekick:hover {
  opacity: 1;
  transform: scale(1.15);
}

/* ==================== SOCIAL / FRIENDS DRAWER ==================== */
.social-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  max-width: 90vw;
  height: 100vh;
  background: var(--bg-surface);
  border-left: 2px solid var(--val-border);
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.7);
  z-index: 2500;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.social-drawer.open {
  right: 0;
}

.social-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--val-border);
}

.social-drawer-header h3 {
  font-size: 1.2rem;
  color: var(--val-cyan);
  letter-spacing: 1px;
}

.social-drawer-body {
  padding: 1.2rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.social-add-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--val-border);
  border-radius: var(--radius-sm);
  padding: 0.8rem;
}

.social-add-box label {
  font-size: 0.85rem;
  color: var(--val-text-muted);
  display: block;
  margin-bottom: 0.4rem;
}

.social-add-row {
  display: flex;
  gap: 0.5rem;
}

.social-add-row input {
  flex: 1;
  padding: 0.4rem 0.6rem;
  background: var(--bg-dark);
  border: 1px solid var(--val-border);
  color: #fff;
  border-radius: var(--radius-sm);
}

.social-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--val-text-muted);
  letter-spacing: 1px;
}

.friends-list-container {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.friend-card {
  background: var(--bg-card);
  border: 1px solid var(--val-border);
  border-radius: var(--radius-sm);
  padding: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  transition: border-color 0.2s, background 0.2s;
}

.friend-card.online {
  border-left: 4px solid var(--val-cyan);
}

.friend-card.offline {
  border-left: 4px solid rgba(255, 255, 255, 0.15);
  opacity: 0.65;
}

.friend-card.in-game {
  border-left: 4px solid var(--val-red);
  background: rgba(255, 70, 85, 0.05);
}

.friend-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex: 1;
  min-width: 0;
}

.friend-avatar-wrap {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--val-border);
  flex-shrink: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, #0f1923 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.friend-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  padding: 1px;
}

.friend-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.friend-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.friend-status-text {
  font-size: 0.78rem;
  color: var(--val-text-muted);
}

.friend-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

/* ==================== USER AVATAR ON HUB ==================== */
.user-avatar-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: contain;
  object-position: center center;
  border: 2px solid var(--val-red);
  box-shadow: 0 0 10px rgba(255, 70, 85, 0.3);
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
  background: radial-gradient(circle, rgba(255, 70, 85, 0.25) 0%, #0f1923 100%);
  padding: 2px;
}

.user-avatar-circle:hover {
  transform: scale(1.04);
  border-color: var(--val-gold);
}

/* ==================== AVATAR PICKER GRID ==================== */
.avatar-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.avatar-pick-card {
  background: var(--bg-card);
  border: 2px solid var(--val-border);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  transition: all 0.2s;
}

.avatar-pick-card img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: contain;
  object-position: center center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, #0f1923 100%);
  padding: 2px;
}

.avatar-pick-card span {
  font-size: 0.75rem;
  font-weight: 600;
}

.avatar-pick-card:hover {
  border-color: var(--val-cyan);
  transform: translateY(-3px);
}

.avatar-pick-card.selected {
  border-color: var(--val-gold);
  background: rgba(255, 215, 0, 0.15);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
}

/* ==================== EPHEMERAL DM CHAT ==================== */
.dm-messages-box {
  height: 250px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--val-border);
  border-radius: var(--radius-sm);
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.dm-bubble {
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  max-width: 80%;
  font-size: 0.9rem;
  line-height: 1.3;
}

.dm-bubble.incoming {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--val-border);
  color: #fff;
}

.dm-bubble.outgoing {
  align-self: flex-end;
  background: var(--val-red);
  color: #fff;
}

.dm-bubble .dm-time {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  display: block;
  margin-top: 0.2rem;
  text-align: right;
}

.dm-input-row {
  display: flex;
  gap: 0.5rem;
}

.dm-input-row input {
  flex: 1;
  padding: 0.6rem;
  background: var(--bg-dark);
  border: 1px solid var(--val-border);
  border-radius: var(--radius-sm);
  color: #fff;
}

/* ==================== HUD SCORE DISPLAY ==================== */
.hud-score-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
}

.hud-score-atk { color: var(--val-red); }
.hud-score-def { color: var(--val-cyan); }
.hud-score-sep { color: var(--val-text-muted); font-size: 1.4rem; }

.score-buttons-row {
  display: flex;
  gap: 0.4rem;
}

.admin-score-summary {
  font-size: 0.95rem;
  color: #fff;
}

/* ==================== MATCH RESULT MODAL ==================== */
.match-result-banner {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.2rem;
}

.match-result-banner.victory {
  background: linear-gradient(135deg, rgba(39, 174, 96, 0.3), rgba(0, 0, 0, 0.6));
  border: 2px solid #27AE60;
  color: #2ECC71;
}

.match-result-banner.defeat {
  background: linear-gradient(135deg, rgba(255, 70, 85, 0.3), rgba(0, 0, 0, 0.6));
  border: 2px solid var(--val-red);
  color: var(--val-red);
}

.match-result-banner.draw {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(0, 0, 0, 0.6));
  border: 2px solid var(--val-gold);
  color: var(--val-gold);
}

.match-final-score-box {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--val-border);
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.2rem;
}

.score-side {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.score-num {
  font-size: 2.5rem;
  font-weight: 700;
  font-family: var(--font-heading);
}

/* ==================== SETTINGS TABS & MATCH HISTORY ==================== */
.settings-nav-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--val-border);
  padding: 0 1.5rem;
  overflow-x: auto;
}

.tab-settings-btn {
  padding: 0.8rem 1.2rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--val-text-muted);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}

.tab-settings-btn.active {
  color: #fff;
  border-bottom-color: var(--val-red);
  background: rgba(255, 70, 85, 0.08);
}

.tab-settings-pane {
  display: none;
}

.tab-settings-pane.active {
  display: block;
}

.history-matches-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.history-match-card {
  background: var(--bg-card);
  border: 1px solid var(--val-border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.history-match-card.victory { border-left: 5px solid #27AE60; }
.history-match-card.defeat { border-left: 5px solid var(--val-red); }
.history-match-card.draw { border-left: 5px solid var(--val-gold); }

.history-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.history-badge.victory { background: rgba(39, 174, 96, 0.2); color: #2ECC71; }
.history-badge.defeat { background: rgba(255, 70, 85, 0.2); color: var(--val-red); }
.history-badge.draw { background: rgba(255, 215, 0, 0.2); color: var(--val-gold); }

/* ==================== USER PROFILE VIEW MODAL ==================== */
.user-profile-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
}

.user-profile-banner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--val-border);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border-left: 5px solid var(--val-cyan);
}

.user-profile-avatar-large {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: contain;
  object-position: center center;
  border: 3px solid var(--val-red);
  box-shadow: 0 0 15px rgba(255, 70, 85, 0.4);
  background: radial-gradient(circle, rgba(255, 70, 85, 0.25) 0%, #0f1923 100%);
  padding: 3px;
}

.user-profile-meta h2 {
  font-size: 2rem;
  letter-spacing: 1px;
  margin-bottom: 0.3rem;
}

.user-profile-action-btns {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

/* ==================== ROOM CHAT WIDGET ==================== */
.room-chat-box {
  position: fixed;
  bottom: 15px;
  left: 15px;
  width: 360px;
  max-width: calc(100vw - 30px);
  background: rgba(15, 25, 35, 0.95);
  border: 1px solid var(--val-border);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  z-index: 1200;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.room-chat-box.minimized {
  width: 220px;
}

.room-chat-box.minimized .chat-body-wrap {
  display: none;
}

/* BLINKING CHAT ANIMATION ON NEW MESSAGE */
@keyframes chatBoxBlink {
  0% {
    box-shadow: 0 0 5px rgba(0, 240, 255, 0.4);
    border-color: var(--val-border);
  }
  50% {
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.9), 0 0 12px rgba(255, 215, 0, 0.8);
    border-color: var(--val-cyan);
  }
  100% {
    box-shadow: 0 0 5px rgba(0, 240, 255, 0.4);
    border-color: var(--val-border);
  }
}

.room-chat-box.has-new-message {
  animation: chatBoxBlink 1.2s infinite ease-in-out;
}

@keyframes chatLogoPulse {
  0% { color: var(--val-cyan); transform: scale(1); text-shadow: none; }
  50% { color: var(--val-gold); transform: scale(1.12); text-shadow: 0 0 10px var(--val-gold); }
  100% { color: var(--val-cyan); transform: scale(1); text-shadow: none; }
}

.chat-title.blinking {
  animation: chatLogoPulse 0.9s infinite ease-in-out;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.9rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--val-border);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  cursor: pointer;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  overflow-x: auto;
}

.chat-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--val-cyan);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.chat-tabs {
  display: flex;
  gap: 0.3rem;
  flex-wrap: nowrap;
}

.chat-tab {
  padding: 0.2rem 0.5rem;
  background: transparent;
  border: 1px solid transparent;
  color: var(--val-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.chat-tab.active {
  background: rgba(255, 70, 85, 0.2);
  color: #fff;
  border-color: var(--val-red);
}

.btn-chat-toggle {
  background: transparent;
  border: none;
  color: var(--val-text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.chat-body-wrap {
  display: flex;
  flex-direction: column;
}

.chat-messages {
  height: 180px;
  overflow-y: auto;
  padding: 0.6rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.82rem;
}

.chat-msg {
  word-break: break-word;
  line-height: 1.3;
}

.chat-msg.all { color: #fff; }
.chat-msg.team-attack { color: #FF7675; }
.chat-msg.team-defense { color: #74B9FF; }

/* CLEAN PM MESSAGE STYLES */
.chat-msg.pm-msg {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.25rem 0.4rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.chat-msg.pm-msg.outgoing {
  background: rgba(255, 215, 0, 0.08);
  border-left: 3px solid var(--val-gold);
}

.chat-msg.pm-msg.incoming {
  background: rgba(0, 240, 255, 0.08);
  border-left: 3px solid var(--val-cyan);
}

.chat-msg .c-time {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  margin-right: 0.3rem;
}

.chat-msg .c-tag {
  font-weight: 700;
  margin-right: 0.3rem;
}

.chat-input-bar {
  display: flex;
  gap: 0.3rem;
  padding: 0.5rem 0.8rem;
  border-top: 1px solid var(--val-border);
  background: rgba(0, 0, 0, 0.3);
}

.chat-whisper-select {
  padding: 0.3rem;
  background: var(--bg-dark);
  border: 1px solid var(--val-border);
  color: #fff;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  max-width: 90px;
}

.chat-input-bar input {
  flex: 1;
  padding: 0.4rem 0.6rem;
  background: var(--bg-dark);
  border: 1px solid var(--val-border);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.82rem;
}

/* ==================== HALFTIME BANNER ==================== */
.halftime-banner {
  background: linear-gradient(135deg, rgba(255, 70, 85, 0.9), rgba(0, 240, 255, 0.9));
  border: 2px solid #fff;
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  color: #fff;
  box-shadow: 0 10px 35px rgba(0, 240, 255, 0.4);
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.halftime-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ht-icon {
  font-size: 2.2rem;
}

.ht-text h3 {
  font-size: 1.4rem;
  margin: 0;
  letter-spacing: 1px;
}

.ht-text p {
  margin: 0.2rem 0 0 0;
  font-size: 0.95rem;
}

/* ==================== END MATCH VOTE & ADMIN RECAP ==================== */
.end-vote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.admin-recap-section {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--val-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  margin-top: 1.2rem;
  text-align: left;
}

.admin-rounds-recap-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 220px;
  overflow-y: auto;
  margin-top: 0.8rem;
  padding-right: 0.4rem;
}

.admin-round-recap-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--val-border);
}

.admin-round-recap-row .round-label-text {
  font-weight: 700;
  font-size: 0.9rem;
}

.admin-round-recap-row select {
  padding: 0.25rem 0.5rem;
  background: var(--bg-dark);
  border: 1px solid var(--val-border);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

/* PLAYER CARD BUTTONS */
.btn-card-action {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--val-text-muted);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-card-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: var(--val-cyan);
}

/* ==================== FRIEND REQUESTS & NOTIFICATIONS ==================== */
.badge-notif {
  background: var(--val-red);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  margin-left: 0.3rem;
  box-shadow: 0 0 8px rgba(255, 70, 85, 0.6);
}

.friend-requests-box {
  background: rgba(255, 70, 85, 0.1);
  border: 1px solid var(--val-red);
  border-radius: var(--radius-sm);
  padding: 0.8rem;
}

.fr-header {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--val-red);
  margin-bottom: 0.6rem;
  letter-spacing: 0.5px;
}

.friend-requests-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.fr-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--val-border);
  gap: 0.5rem;
}

.fr-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
}

.fr-actions {
  display: flex;
  gap: 0.3rem;
}

.friend-request-toast {
  position: fixed;
  top: 75px;
  right: 20px;
  background: rgba(15, 25, 35, 0.96);
  border: 2px solid var(--val-cyan);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.2rem;
  box-shadow: 0 10px 30px rgba(0, 240, 255, 0.35);
  z-index: 3000;
  backdrop-filter: blur(10px);
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

.fr-toast-content {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.fr-toast-icon { font-size: 1.8rem; }
.fr-toast-text { display: flex; flex-direction: column; }
.fr-toast-title { font-size: 0.78rem; color: var(--val-cyan); font-weight: 700; }
.fr-toast-actions { display: flex; gap: 0.4rem; margin-left: 0.5rem; }

/* DYNAMIC PM TABS IN BOTTOM CHAT */
.chat-tab.tab-pm {
  background: rgba(0, 240, 255, 0.12);
  color: var(--val-cyan);
  border-color: rgba(0, 240, 255, 0.3);
}

.chat-tab.tab-pm.active {
  background: var(--val-cyan);
  color: #000;
  border-color: var(--val-cyan);
}

.chat-tab.has-unread {
  border-color: var(--val-red);
  box-shadow: 0 0 8px rgba(255, 70, 85, 0.5);
  animation: pulse 1s infinite;
}

.chat-tab .tab-close {
  margin-left: 0.3rem;
  opacity: 0.6;
  font-size: 0.75rem;
  cursor: pointer;
}

.chat-tab .tab-close:hover { opacity: 1; color: var(--val-red); }


/* RESPONSIVE */
@media (max-width: 900px) {
  .game-content-grid { grid-template-columns: 1fr; }
  .teams-container { grid-template-columns: 1fr; }
  .hub-cards-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .keybind-grid { grid-template-columns: 1fr; }
  .hide-mobile { display: none; }
}
