﻿@import url('https://fonts.googleapis.com/css2?family=Anta&family=Barlow:wght@400;500;600;700;800&display=swap');

html,
body {
  height: 100%;
  margin: 0;
}

:root {
  --auth-footer-height: 56px;

  /* Mosaic-inspired dark slate palette */
  --sl-950:  #080e1a;
  --sl-900:  #0d1424;
  --sl-800:  #141e32;
  --sl-700:  #1a2540;
  --sl-600:  #243050;
  --sl-500:  #2d3d62;
  --sl-400:  rgba(148,163,200,1);
  --sl-300:  rgba(200,215,240,1);

  --menu-bg:           var(--sl-900);
  --menu-sidebar-bg:   var(--sl-800);
  --menu-card-bg:      var(--sl-700);
  --menu-ink:          #e2ebff;
  --menu-soft:         rgba(200,215,240,0.65);
  --menu-muted:        rgba(148,163,200,0.7);
  --menu-glass:        rgba(13,20,36,0.96);
  --menu-glass-strong: rgba(8,14,26,0.98);
  --menu-border:       rgba(255,255,255,0.07);
  --menu-accent:       #1f6cf0;
  --menu-accent-2:     #ff7b47;
  --menu-accent-glow:  rgba(31,108,240,0.18);

  --app-font-size-base:     16px;
  --app-font-size-small:    13px;
  --app-font-size-h1:       32px;
  --app-font-size-h2:       24px;
  --app-font-size-h3:       20px;
  --app-font-size-nav-brand:16px;
  --app-font-size-button:   16px;
}

body {
  background: var(--sl-900);
  min-height: 100vh;
  font-family: 'Barlow', 'Segoe UI', sans-serif;
  font-size: var(--app-font-size-base);
  position: relative;
  display: flex;
  flex-direction: column;
  color: var(--menu-ink);
}

h1,
.h1 {
  font-size: var(--app-font-size-h1);
}

h2,
.h2 {
  font-size: var(--app-font-size-h2);
}

h3,
.h3 {
  font-size: var(--app-font-size-h3);
}

small,
.small {
  font-size: var(--app-font-size-small);
}

.navbar-brand {
  font-size: var(--app-font-size-nav-brand);
}

.btn {
  font-size: var(--app-font-size-button);
}

#auth-container {
  min-height: calc(100vh - var(--auth-footer-height));
  display: flex;
  align-items: center;
  padding: 24px 16px 16px;
  margin-top: 0 !important;
  flex: 1;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(31,108,240,0.15), transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(255,123,71,0.10), transparent 50%),
    var(--sl-900);
}

#app-container {
  flex: 1;
}

#auth-container > .row {
  width: 100%;
}

#auth-container .card {
  border-radius: 22px;
}

#auth-container .card-body {
  padding: 44px 52px;
}

#auth-container .form-label {
  font-size: 0.95rem;
}

#auth-container .form-control {
  min-height: 48px;
  font-size: 1.02rem;
}

#auth-container .btn {
  padding: 14px 18px;
  font-size: 1.02rem;
}

#auth-container h4 {
  font-size: 1.3rem;
}

#auth-container .text-muted {
  font-size: 0.95rem;
}

#auth-container .nav-pills .nav-link {
  padding: 10px 14px;
  font-size: 1rem;
  border-radius: 12px;
}

@media (min-width: 992px) {
  #auth-container .col-lg-5 {
    flex: 0 0 auto;
    width: 760px;
  }

  #auth-container .card-body {
    padding: 64px 72px;
  }

  #auth-container .form-control {
    min-height: 56px;
    font-size: 1.1rem;
  }
}


@media (min-width: 1400px) {
  #auth-container {
    padding-top: 40px;
    padding-bottom: 16px;
  }

  #auth-container .col-lg-5 {
    width: 840px;
  }

  #auth-container .card-body {
    padding: 76px 90px;
  }

  #auth-container .form-label {
    font-size: 1rem;
  }

  #auth-container .btn {
    font-size: 1.15rem;
    padding: 16px 20px;
  }
}

@media (max-width: 576px) {
  #auth-container .card-body {
    padding: 28px 24px;
  }
}

.site-footer {
  margin-top: auto;
}

.main-layout {
  min-height: 100vh;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
}

.main-layout>.row {
  margin-left: 0;
  margin-right: 0;
}

.main-layout>.row>[class^="col-"] {
  padding-left: 0;
  padding-right: 0;
}

.main-content {
  padding: 12px 10%;
}

/* Home layout — dashboard now uses Tailwind */

.home-header {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--menu-glass);
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--menu-ink);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.home-avatar {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(12, 18, 26, 0.85);
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--menu-accent);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.05), 0 8px 20px rgba(0, 0, 0, 0.2);
}

.home-name {
  font-weight: 800;
  font-size: 18px;
}

.home-meta {
  font-size: 13px;
  opacity: 0.85;
}

.home-cta-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  grid-auto-rows: 1fr;
  grid-auto-flow: row;
  width: 100%;
}

.home-cta-grid .cta-card {
  height: 100%;
  min-height: 120px;
}

.home-cta-grid .cta-card.cta-full,
.home-cta-grid>.cta-full {
  grid-column: 1 / span 2 !important;
  grid-row: auto;
}

@media (max-width: 640px) {
  .home-cta-grid {
    grid-template-columns: 1fr;
  }

  .home-cta-grid .cta-card.cta-full {
    grid-column: 1 / -1 !important;
  }
}

.cta-card {
  border-radius: 16px;
  padding: 16px;
  color: #0f1216;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cta-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.26);
}

.cta-card.orange {
  background: linear-gradient(135deg, #ff7b47 0%, #ff5c2a 100%);
  color: #fff;
}

.cta-card.amber {
  background: linear-gradient(135deg, #f8b133 0%, #f39c12 100%);
  color: #fff;
}

.cta-card.dark {
  background: linear-gradient(135deg, rgba(16, 26, 36, 0.95) 0%, rgba(12, 18, 26, 0.98) 100%);
  color: var(--menu-ink);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-cta-orange {
  background: linear-gradient(135deg, #ff7b47 0%, #ff5c2a 100%);
  color: #fff !important;
  border: none;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(255, 92, 42, 0.35);
  border-radius: 14px;
  padding: 10px 16px;
}

.btn-cta-orange:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.btn-cta-orange:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 124, 71, 0.35);
}

.header-orange {
  background: linear-gradient(135deg, #ff7b47 0%, #ff5c2a 100%);
  color: #fff;
}

.cta-title {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 16px;
}

.cta-sub {
  margin-top: 6px;
  opacity: 0.9;
  font-size: 13px;
}

.cta-banner {
  border-radius: 16px;
  padding: 18px;
  background: linear-gradient(135deg, #1f6cf0 0%, #2f8bff 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(31, 108, 240, 0.35);
}

.stats-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.stats-item {
  background: linear-gradient(135deg, rgba(16, 26, 36, 0.95) 0%, rgba(12, 18, 26, 0.98) 100%);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--menu-ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stats-item i {
  margin-right: 8px;
}

.stats-link {
  font-weight: 800;
}

/* Shared dark gradient for section headers */
.nav-dark-gradient {
  background: var(--sl-800) !important;
  color: var(--menu-ink) !important;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-dark-gradient .navbar-brand,
.nav-dark-gradient .nav-link,
.nav-dark-gradient .navbar-text,
.nav-dark-gradient a {
  color: var(--menu-ink) !important;
}

.btn-cta-dark {
  background: linear-gradient(135deg, #0f1216 0%, #1b232c 100%);
  color: #f5f8fb;
  border: none;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
  font-weight: 700;
}

.btn-cta-dark:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* Footer */
.site-footer {
  margin-top: 0;
  background: rgba(8, 10, 15, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #d6dbe1;
  min-height: var(--auth-footer-height);
  padding: 8px 0;
}

.site-footer .footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
}

.site-footer .footer-brand {
  font-weight: 800;
  letter-spacing: 0.5px;
}

.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-footer .footer-links a {
  color: #f5f8fb;
  text-decoration: none;
  font-weight: 600;
  opacity: 0.9;
}

.site-footer .footer-links a:hover {
  opacity: 1;
  text-decoration: underline;
}

.site-footer .footer-meta {
  font-size: 12px;
  opacity: 0.7;
}

.btn-cta-dark:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.08);
}

/* Futuristic dark surfaces for cards/tables/modals */
.card-dark {
  background: var(--sl-700);
  border: 1px solid rgba(255,255,255,0.07);
  color: var(--menu-ink);
  box-shadow: 0 4px 16px rgba(0,0,0,0.22);
}

.card-dark .card-header,
.modal-content.modal-dark .modal-header {
  background: var(--sl-800);
  color: var(--menu-ink);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.modal-content.modal-dark {
  --bs-modal-bg: transparent;
  background: var(--sl-700) !important;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--menu-ink);
  box-shadow: 0 14px 40px rgba(0,0,0,0.4);
}

.modal-content.modal-dark .modal-body,
.modal-content.modal-dark .modal-footer {
  background: transparent !important;
  color: #e8f0f6;
}

#localGameModal .modal-content,
#localGameModal .modal-header,
#localGameModal .modal-body,
#localGameModal .modal-footer {
  background: var(--sl-700) !important;
  color: var(--menu-ink) !important;
  border-color: rgba(255,255,255,0.07) !important;
}

#localGameModal .modal-content {
  --bs-modal-bg: transparent;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4) !important;
}

#roundLimitModal .modal-content,
#roundLimitModal .modal-header,
#roundLimitModal .modal-body,
#roundLimitModal .modal-footer {
  background: var(--sl-700) !important;
  color: var(--menu-ink) !important;
  border-color: rgba(255,255,255,0.07) !important;
}

#roundLimitModal .btn {
  background: linear-gradient(135deg, #ff7b47 0%, #ff5c2a 100%) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(255, 92, 42, 0.35);
}

#localGameModal .form-control,
#localGameModal .form-select {
  background: var(--sl-800);
  color: var(--menu-ink);
  border: 1px solid rgba(255,255,255,0.10);
}

#localGameModal .form-control::placeholder,
#localGameModal .form-select::placeholder {
  color: #9fb7d3 !important;
  opacity: 1;
}

/* Bot modal list dark cards + active state */
#botModal .list-group-item,
#botModal .list-group-item-action {
  background: linear-gradient(135deg, #0f1a24 0%, #13202c 100%) !important;
  color: #eaf4ff !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  transition: all 0.2s ease;
}

#botModal .list-group-item-action:hover,
#botModal .list-group-item-action:focus {
  background: linear-gradient(135deg, #122033 0%, #192a3d 100%) !important;
  border-color: #2f4366 !important;
  color: #fff !important;
}

#botModal .list-group-item-action.active {
  background: linear-gradient(135deg, #1b3b6c 0%, #22467a 100%) !important;
  border-color: #6ad0ff !important;
  box-shadow: 0 0 12px rgba(106, 208, 255, 0.35);
  color: #fff !important;
}

#botModal .list-group-item .text-muted,
#botModal .list-group-item-action .text-muted {
  color: #9fb7d3 !important;
}

.table-dark-modern {
  background: linear-gradient(180deg, rgba(15, 26, 36, 0.9) 0%, rgba(19, 32, 44, 0.9) 100%);
  color: #e8f0f6;
  border-color: rgba(255, 255, 255, 0.05);
  --bs-table-color: #e8f0f6;
  --bs-table-bg: transparent;
  --bs-table-border-color: rgba(255, 255, 255, 0.08);
  --bs-table-accent-bg: rgba(255, 255, 255, 0.03);
  --bs-table-striped-color: #e8f0f6;
  --bs-table-striped-bg: rgba(255, 255, 255, 0.06);
  --bs-table-active-color: #e8f0f6;
  --bs-table-active-bg: rgba(255, 255, 255, 0.08);
  --bs-table-hover-color: #e8f0f6;
  --bs-table-hover-bg: rgba(255, 255, 255, 0.08);
}

.table-dark-modern thead,
.table-dark-modern thead th {
  background: linear-gradient(135deg, #0f1a24 0%, #13202c 100%) !important;
  color: #f5f8fb !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.table-dark-modern tbody tr {
  border-color: rgba(255, 255, 255, 0.04) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  color: #e8f0f6 !important;
}

.table-dark-modern tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.06) !important;
}

.table-dark-modern tbody tr td,
.table-dark-modern tbody tr th {
  color: #e8f0f6 !important;
}

/* Extra specificity for tables inside dark cards (ranking/history) */
.card-dark .table {
  background: transparent !important;
  color: #e8f0f6 !important;
  --bs-table-color: #e8f0f6;
  --bs-table-bg: transparent;
  --bs-table-border-color: rgba(255, 255, 255, 0.08);
  --bs-table-accent-bg: rgba(255, 255, 255, 0.03);
  --bs-table-striped-color: #e8f0f6;
  --bs-table-striped-bg: rgba(255, 255, 255, 0.06);
  --bs-table-active-color: #e8f0f6;
  --bs-table-active-bg: rgba(255, 255, 255, 0.08);
  --bs-table-hover-color: #e8f0f6;
  --bs-table-hover-bg: rgba(255, 255, 255, 0.08);
}

.card-dark .table thead th {
  background: linear-gradient(135deg, #0f1a24 0%, #13202c 100%) !important;
  color: #f5f8fb !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.card-dark .table tbody tr {
  background: rgba(255, 255, 255, 0.03) !important;
  color: #e8f0f6 !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
}

.card-dark .table tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.06) !important;
}

.card-dark .table tbody td,
.card-dark .table tbody th {
  color: #e8f0f6 !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
}

/* Ensure generic tables in dark sections use dark scheme */
.card-dark .table,
.table.table-striped.table-dark-modern,
.content-section .table.table-striped {
  background: transparent;
  color: #e8f0f6;
}

.content-section .table.table-striped thead {
  background: linear-gradient(135deg, #0f1a24 0%, #13202c 100%);
  color: #f5f8fb;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.content-section .table.table-striped tbody tr {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.05);
}

.content-section .table.table-striped tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.05);
}

.content-section .table.table-striped tbody tr td,
.content-section .table.table-striped tbody tr th {
  color: #e8f0f6;
}

/* Tournaments list */
#tournaments-section .nav-tabs {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#tournaments-section .nav-tabs .nav-link {
  background: rgba(255, 255, 255, 0.04);
  color: #e8f0f6;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
  transition: all 0.2s ease;
}

#tournaments-section .nav-tabs .nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(106, 208, 255, 0.3);
  color: #fff;
}

#tournaments-section .nav-tabs .nav-link.active {
  background: linear-gradient(135deg, #ff7b47 0%, #ff5c2a 100%);
  border-color: #ff7b47;
  color: #fff;
}

#tournaments-section .list-group-item {
  background: linear-gradient(135deg, #0f1a24 0%, #13202c 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #e8f0f6 !important;
  transition: all 0.2s ease;
}

#tournaments-section .list-group-item:hover {
  background: linear-gradient(135deg, #122033 0%, #192a3d 100%) !important;
  border-color: rgba(106, 208, 255, 0.2) !important;
  transform: translateX(3px);
}

/* Global placeholders readable on dark */
.form-control::placeholder,
.form-select::placeholder,
textarea::placeholder,
input::placeholder {
  color: #9fb7d3 !important;
  opacity: 1;
}

.tournament-list .btn-primary {
  background: linear-gradient(135deg, #ff7b47 0%, #ff5c2a 100%) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(255, 92, 42, 0.35);
}

.input-dark,
.form-control.input-dark {
  background: rgba(15, 18, 22, 0.85);
  color: #e8f0f6;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.input-dark:focus,
.form-control.input-dark:focus {
  border-color: #6ad0ff;
  box-shadow: 0 0 0 0.2rem rgba(106, 208, 255, 0.25);
}


/* Global dark inputs */
.form-control,
.form-select,
textarea,
input {
  color: #e8f0f6;
  border: 1px solid rgba(47, 67, 102, 0.8);
}

.form-select option {
  color: #0f1216;
}
/* Improve readability on dark surfaces */
.text-muted {
  color: #d4dde5 !important;
}

.card-dark p,
.card-dark small,
.card-dark label,
.card-dark .text-muted,
.modal-dark p,
.modal-dark small,
.modal-dark label,
.modal-dark .text-muted,
.nav-dark-gradient .text-muted {
  color: #d4dde5 !important;
}

/* Sidebar inspired style */
.sidebar-card {
  background: #0b0f14;
  border-radius: 14px;
  padding: 18px 12px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #e8f0f6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.sidebar-logo {
  text-align: center;
  margin-bottom: 12px;
}

.sidebar-logo img {
  max-height: 48px;
  width: auto;
}

.sidebar-profile {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 0 15px;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.sidebar-avatar {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #0b1621;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 1px;
  color: #6ad0ff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.05), 0 10px 30px rgba(0, 0, 0, 0.2);
}

.sidebar-name {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #eef7ff;
}

.sidebar-promo {
  background: linear-gradient(135deg, #1f6cf0 0%, #2f8bff 100%);
  border-radius: 14px;
  padding: 14px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(47, 139, 255, 0.3);
  margin-bottom: 12px;
}

.promo-title {
  font-weight: 800;
  font-size: 15px;
  text-transform: uppercase;
}

.promo-text {
  font-size: 13px;
  margin: 6px 0 10px;
  opacity: 0.9;
}

.promo-btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 10px 12px;
  background: #0b1621;
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.promo-btn:hover {
  transform: translateY(-1px);
  background: #091019;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.sidebar-item {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  color: #e8f0f6;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: visible;
  margin-bottom: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sidebar-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: transparent;
  border-radius: 8px 0 0 8px;
  transition: all 0.3s ease;
}

.sidebar-item i {
  font-size: 22px;
  color: #7eb9e8;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 28px;
  text-align: center;
}

.sidebar-item span {
  flex: 1;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1rem;
  font-weight: 800;
}

.sidebar-item:hover,
.sidebar-item.active {
  background: rgba(108, 194, 255, 0.1);
  border-color: rgba(108, 194, 255, 0.3);
  transform: translateX(6px) scale(1.02);
  box-shadow: 
    0 4px 12px rgba(108, 194, 255, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.15);
}

.sidebar-item:hover::before,
.sidebar-item.active::before {
  background: linear-gradient(180deg, #6cc2ff 0%, #4a9fd8 100%);
}

.sidebar-item:hover i,
.sidebar-item.active i {
  color: #6cc2ff;
  transform: scale(1.1);
}

.sidebar-item:hover span,
.sidebar-item.active span {
  color: #ffffff;
  letter-spacing: 0.8px;
}

.sidebar-item.active {
  background: rgba(108, 194, 255, 0.12);
  border-color: rgba(108, 194, 255, 0.4);
}

.sidebar-item.active::before {
  background: linear-gradient(180deg, #6cc2ff 0%, #4a9fd8 100%);
}

.sidebar-item.danger {
  background: rgba(255, 255, 255, 0.03);
}

.sidebar-item.danger::before {
  background: transparent;
}

.sidebar-item.danger:hover {
  background: rgba(255, 77, 77, 0.1);
  border-color: rgba(255, 77, 77, 0.3);
  box-shadow: 
    0 4px 12px rgba(255, 77, 77, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.15);
}

.sidebar-item.danger:hover::before {
  background: linear-gradient(180deg, #ff6b6b 0%, #e85555 100%);
}

.sidebar-item.center-btn {
  justify-content: center;
  text-align: center;
}

.sidebar-item.danger i {
  color: #ff6b6b;
}

.sidebar-item.danger:hover i {
  color: #ff8888;
  transform: scale(1.1);
}

/* Hero cards / lobby cards */
.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.hero-card {
  position: relative;
  border-radius: 12px;
  padding: 20px;
  color: var(--menu-ink);
  box-shadow: 0 4px 16px rgba(0,0,0,0.22);
  background: var(--sl-700);
  border: 1px solid rgba(255,255,255,0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 160px;
}

.hero-card::after { display: none; }

.hero-card.light {
  background: var(--sl-700);
  color: var(--menu-ink);
}

.hero-card.accent {
  background: linear-gradient(145deg, rgba(255,123,71,0.92) 0%, rgba(255,90,40,0.96) 100%);
  border-color: rgba(255,123,71,0.3);
  color: #fff;
}

.hero-card.warm {
  background: linear-gradient(145deg, rgba(248,177,51,0.92) 0%, rgba(243,156,18,0.96) 100%);
  border-color: rgba(248,177,51,0.3);
  color: #fff;
}

.hero-title {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.9rem;
}

.hero-sub {
  margin: 0;
  opacity: 0.82;
  font-size: 0.95rem;
  line-height: 1.4;
}

.hero-metric {
  font-size: 28px;
  font-weight: 800;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.hero-metric small {
  font-size: 12px;
  opacity: 0.8;
  letter-spacing: 0.04em;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}

.pill-btn {
  border: none;
  border-radius: 24px;
  padding: 10px 16px;
  font-weight: 700;
  background: #0f1216;
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  transition: all 0.15s ease;
}

.pill-btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #ddeeff;
  border: 1px solid rgba(160, 205, 255, 0.18);
}

.pill-btn:hover {
  transform: translateY(-1px);
}

/* remove old dark overlay that added noise to background */
body::before { display: none; }

.card {
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.stat-card {
  background: var(--sl-700);
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  color: var(--menu-ink);
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.07);
}

.stat-value {
  font-size: 2.3rem;
  font-weight: 800;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.95rem;
  opacity: 0.85;
}

.content-section {
  animation: fadeIn 0.3s;
  max-width: 1200px;
  margin: 0 auto;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.list-group-item-action:hover {
  background-color: #f8f9fa;
  cursor: pointer;
}

.list-group-item-action.active {
  background-color: #667eea;
  border-color: #667eea;
}

.room-item {
  transition: all 0.2s;
}

.room-item:hover {
  transform: translateX(5px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.badge-password {
  background-color: #ffc107;
  color: #000;
}

.badge-ranking {
  background-color: #28a745;
}

.navbar-brand {
  font-weight: bold;
  font-size: 1.3rem;
}

#auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.02);
}

.btn {
  border-radius: 8px;
  transition: all 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Friends Modal Styling */
#friendsModal .nav-pills .nav-link {
  background: rgba(255, 255, 255, 0.04);
  color: #e8f0f6;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}

#friendsModal .nav-pills .nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(106, 208, 255, 0.3);
}

#friendsModal .nav-pills .nav-link.active {
  background: linear-gradient(135deg, #ff7b47 0%, #ff5c2a 100%);
  border-color: #ff7b47;
  color: #fff;
}

#friendsModal .list-group-item {
  background: linear-gradient(135deg, #0f1a24 0%, #13202c 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e8f0f6;
  transition: all 0.2s ease;
}

#friendsModal .list-group-item:hover {
  background: linear-gradient(135deg, #122033 0%, #192a3d 100%);
  border-color: rgba(106, 208, 255, 0.2);
  transform: translateX(3px);
}

#friendsModal .badge {
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
}

#friendsModal .form-control {
  background: linear-gradient(135deg, #0f1a24 0%, #13202c 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e8f0f6;
}

#friendsModal .form-control:focus {
  border-color: #6ad0ff;
  box-shadow: 0 0 0 0.2rem rgba(106, 208, 255, 0.25);
  background: linear-gradient(135deg, #0f1a24 0%, #13202c 100%);
}

/* ══════════ Lobby Panel (dashboard style) ══════════ */
.lob-panel {
  background: rgba(13, 21, 36, 0.92);
  border: 1px solid rgba(100, 160, 220, 0.13);
  border-radius: 14px;
  overflow: hidden;
}
.lob-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: rgba(20, 30, 50, 0.95);
  border-bottom: 1px solid rgba(100, 160, 220, 0.12);
  gap: 8px;
}
.lob-tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.lob-tabs::-webkit-scrollbar { display: none; }
.lob-tab {
  padding: 11px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(180, 210, 245, 0.55);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
}
.lob-tab:hover { color: rgba(200, 230, 255, 0.85); }
.lob-tab.active {
  color: #ff7b47;
  border-bottom-color: #ff7b47;
}
.lob-refresh-btn {
  background: rgba(31, 108, 240, 0.12);
  border: 1px solid rgba(31, 108, 240, 0.25);
  color: #7ab4f5;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.82rem;
  flex-shrink: 0;
  transition: background 0.15s;
  font-family: inherit;
}
.lob-refresh-btn:hover { background: rgba(31, 108, 240, 0.22); }
.lob-body { padding: 14px; }
.lob-pane { display: none; }
.lob-pane.active { display: block; }
.lob-empty {
  text-align: center;
  color: rgba(180, 210, 245, 0.4);
  padding: 28px 16px;
  font-size: 0.88rem;
}
.lobby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.lobby-card {
  background: rgba(20, 32, 52, 0.85);
  border: 1px solid rgba(100, 160, 220, 0.12);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s, transform 0.15s;
}
.lobby-card:hover {
  border-color: rgba(100, 160, 220, 0.28);
  transform: translateY(-1px);
}
.lobby-card .meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.lobby-card .title {
  font-weight: 800;
  color: #e2ecff;
  font-size: 1rem;
  letter-spacing: 0.5px;
}
.lobby-card .badge {
  background: rgba(255, 255, 255, 0.07);
  color: #9bd7ff;
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 600;
}
.camera-badge {
  background: rgba(255, 77, 77, 0.15) !important;
  color: #ff9b9b !important;
  border-color: rgba(255, 77, 77, 0.35) !important;
}
.lobby-card .host {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: rgba(180, 210, 245, 0.75);
}
.lobby-card .host img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.15);
}
.lobby-card .footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}
.btn-join {
  border: none;
  border-radius: 20px;
  padding: 7px 16px;
  font-weight: 700;
  background: linear-gradient(135deg, #ff7b47 0%, #ff5c2a 100%);
  color: #fff;
  font-size: 0.83rem;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  font-family: inherit;
}
.btn-join:hover { opacity: 0.9; transform: translateY(-1px); }

/* Active room card in lobby */
#active-ranked-room .lobby-card,
#active-casual-room .lobby-card {
  border-color: rgba(255, 193, 7, 0.5);
  background: rgba(26, 28, 10, 0.88);
}

/* Lobby Section Styling - legacy fallbacks */
#lobby-section .card {
  background: linear-gradient(180deg, rgba(15, 26, 36, 0.95) 0%, rgba(19, 32, 44, 0.9) 50%, rgba(13, 19, 26, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #e8f0f6;
}
#lobby-section .nav-tabs {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#lobby-section .nav-tabs .nav-link {
  background: rgba(255, 255, 255, 0.04);
  color: #e8f0f6;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
  transition: all 0.2s ease;
}

#lobby-section .nav-tabs .nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(106, 208, 255, 0.3);
  color: #fff;
}

#lobby-section .nav-tabs .nav-link.active {
  background: linear-gradient(135deg, #ff7b47 0%, #ff5c2a 100%);
  border-color: #ff7b47;
  color: #fff;
}

#lobby-section .list-group-item {
  background: linear-gradient(135deg, #0f1a24 0%, #13202c 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #e8f0f6 !important;
  transition: all 0.2s ease;
}

#lobby-section .list-group-item:hover {
  background: linear-gradient(135deg, #122033 0%, #192a3d 100%) !important;
  border-color: rgba(106, 208, 255, 0.2) !important;
  transform: translateX(3px);
}

#lobby-section .list-group-item-warning {
  background: linear-gradient(135deg, #1a1f0f 0%, #1f2413 100%) !important;
  border: 2px solid rgba(255, 193, 7, 0.5) !important;
}

#lobby-section .badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
}

#lobby-section .text-muted {
  color: #9fb7d3 !important;
}

/* Notification Bell */
.notification-bell {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #e8f0f6;
}

.notification-bell:hover {
  background: rgba(255, 123, 71, 0.2);
  border-color: #ff7b47;
  transform: scale(1.1);
}

.notification-bell i {
  font-size: 1.2rem;
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: linear-gradient(135deg, #ff7b47 0%, #ff5c2a 100%);
  color: #fff;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 0.7rem;
  font-weight: bold;
  min-width: 18px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(255, 92, 42, 0.5);
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

/* Notifications Panel */
.notifications-panel {
  position: fixed;
  top: 60px;
  right: 20px;
  width: 400px;
  max-height: 600px;
  background: linear-gradient(135deg, #0f1a24 0%, #13202c 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 2000;
  overflow: hidden;
}

.notifications-header {
  background: linear-gradient(135deg, #ff7b47 0%, #ff5c2a 100%);
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.notifications-header h6 {
  margin: 0;
  color: #fff;
  font-weight: 700;
}

.notifications-header .btn-link {
  padding: 0 8px;
  text-decoration: none;
  font-size: 0.85rem;
}

.notifications-header .btn-link:hover {
  opacity: 0.8;
}

.notifications-body {
  max-height: 500px;
  overflow-y: auto;
  padding: 10px;
}

.notification-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(106, 208, 255, 0.3);
  transform: translateX(3px);
}

.notification-item.unread {
  border-left: 4px solid #ff7b47;
  background: rgba(255, 123, 71, 0.1);
}

.notification-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.notification-item-title {
  font-weight: 700;
  color: #e8f0f6;
  font-size: 0.95rem;
}

.notification-item-time {
  font-size: 0.75rem;
  color: #9fb7d3;
}

.notification-item-message {
  color: #d4dde5;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.notification-item-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.notification-item-actions .btn {
  font-size: 0.85rem;
  padding: 4px 12px;
}

@media (max-width: 768px) {
  .notifications-panel {
    right: 10px;
    left: 10px;
    width: auto;
    max-height: 70vh;
  }

  .notification-bell {
    width: 35px;
    height: 35px;
  }

  .notification-bell i {
    font-size: 1rem;
  }
}

/* Online/Offline Status Indicators */
.status-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #0f1a24;
  box-shadow: 0 0 0 2px rgba(15, 26, 36, 0.8);
}

.status-online {
  background: #28a745;
  box-shadow: 0 0 0 2px rgba(15, 26, 36, 0.8), 0 0 8px rgba(40, 167, 69, 0.6);
  animation: pulse-online 2s infinite;
}

.status-offline {
  background: #6c757d;
  box-shadow: 0 0 0 2px rgba(15, 26, 36, 0.8);
}

@keyframes pulse-online {

  0%,
  100% {
    box-shadow: 0 0 0 2px rgba(15, 26, 36, 0.8), 0 0 8px rgba(40, 167, 69, 0.6);
  }

  50% {
    box-shadow: 0 0 0 2px rgba(15, 26, 36, 0.8), 0 0 12px rgba(40, 167, 69, 0.8);
  }
}

/* Chat Styles */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 600px;
  background: linear-gradient(135deg, #0f1a24 0%, #13202c 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-message {
  display: flex;
  gap: 12px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff7b47 0%, #ff5c2a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}

.chat-message-content {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 14px;
  max-width: 70%;
}

.chat-message.own-message {
  flex-direction: row-reverse;
}

.chat-message.own-message .chat-message-content {
  background: linear-gradient(135deg, rgba(255, 123, 71, 0.2) 0%, rgba(255, 92, 42, 0.2) 100%);
  border-color: rgba(255, 123, 71, 0.3);
}

.chat-message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.chat-message-username {
  font-weight: 700;
  color: #ff7b47;
  font-size: 0.9rem;
}

.chat-message-time {
  font-size: 0.75rem;
  color: #9fb7d3;
}

.chat-message-text {
  color: #e8f0f6;
  word-wrap: break-word;
  line-height: 1.4;
}

.chat-input-container {
  display: flex;
  gap: 10px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e8f0f6 !important;
  border-radius: 8px;
  padding: 10px 15px;
  transition: all 0.2s ease;
}

.chat-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: #ff7b47;
  box-shadow: 0 0 0 3px rgba(255, 123, 71, 0.1);
  outline: none;
}

.chat-input::placeholder {
  color: #9fb7d3;
}

/* Private Chat Modal */
.private-chat-modal {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 400px;
  height: 500px;
  background: linear-gradient(135deg, #0f1a24 0%, #13202c 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: none;
  flex-direction: column;
}

.private-chat-modal.active {
  display: flex;
}

.private-chat-header {
  background: linear-gradient(135deg, #ff7b47 0%, #ff5c2a 100%);
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 12px 12px 0 0;
}

.private-chat-header h6 {
  margin: 0;
  color: #fff;
  font-weight: 700;
}

.private-chat-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.private-chat-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.notification-bell {
  position: relative;
  background: none;
  border: none;
  color: #e8f0f6;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.2s;
  flex-shrink: 0;
}

.notification-bell:hover {
  background: rgba(255, 255, 255, 0.1);
}

.notifications-panel {
  position: fixed;
  top: 100px;
  left: 25%;
  margin-left: 10px;
  width: 380px;
  max-width: calc(75vw - 40px);
  max-height: calc(100vh - 120px);
  background: linear-gradient(135deg, #0f1a24 0%, #13202c 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

@media (max-width: 1200px) {
  .notifications-panel {
    width: 350px;
  }
}

@media (max-width: 900px) {
  .notifications-panel {
    left: auto;
    right: 10px;
    margin-left: 0;
    width: 340px;
  }
}

@media (max-width: 768px) {
  .notifications-panel {
    width: calc(100vw - 20px);
    max-width: 360px;
  }
}

/* In-game Chat Bubble */
.game-chat-bubble {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 350px;
  max-height: 400px;
  background: linear-gradient(135deg, #0f1a24 0%, #13202c 100%);
  border: 2px solid rgba(255, 123, 71, 0.5);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.game-chat-bubble.minimized {
  height: 60px;
  max-height: 60px;
}

.game-chat-header {
  background: linear-gradient(135deg, #ff7b47 0%, #ff5c2a 100%);
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.game-chat-header h6 {
  margin: 0;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}

.game-chat-toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
  transition: transform 0.3s;
}

.game-chat-bubble.minimized .game-chat-toggle {
  transform: rotate(180deg);
}

.game-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 250px;
}

.game-chat-message {
  display: flex;
  gap: 8px;
  font-size: 0.85rem;
}

.game-chat-message-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff7b47 0%, #ff5c2a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.game-chat-message-content {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 6px 10px;
}

.game-chat-message-username {
  font-weight: 700;
  color: #ff7b47;
  font-size: 0.75rem;
  margin-bottom: 2px;
}

.game-chat-message-text {
  color: #e8f0f6;
  line-height: 1.3;
}

.game-chat-input-container {
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 8px;
}

.game-chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e8f0f6 !important;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.85rem;
}

.game-chat-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: #ff7b47;
  outline: none;
}

.game-chat-send {
  background: linear-gradient(135deg, #ff7b47 0%, #ff5c2a 100%);
  border: none;
  color: #fff;
  padding: 8px 15px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  transition: filter 0.2s;
}

.game-chat-send:hover {
  filter: brightness(1.1);
}

@media (max-width: 768px) {
  .chat-container {
    height: 500px;
  }

  .private-chat-modal {
    width: calc(100% - 20px);
    right: 10px;
    left: 10px;
  }

  .game-chat-bubble {
    width: calc(100% - 20px);
    right: 10px;
    left: 10px;
  }
}

/* Premium Styles */
.premium-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
  color: #000;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
  vertical-align: middle;
}

.premium-username {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
  position: relative;
}

.premium-username-bg {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 237, 78, 0.15) 100%);
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.premium-avatar-border {
  border: 2px solid #ffd700 !important;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.4) !important;
}

.premium-glow {
  animation: premiumGlow 2s ease-in-out infinite;
}

@keyframes premiumGlow {

  0%,
  100% {
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3), 0 0 20px rgba(255, 215, 0, 0.2);
  }

  50% {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5), 0 0 30px rgba(255, 215, 0, 0.3);
  }
}

/* ==================== CONTAINER BACKGROUNDS WITH TRANSPARENCY ==================== */
[data-container-bg="true"] {
  position: relative;
  overflow: hidden;
}

[data-container-bg="true"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: var(--container-bg-url);
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  z-index: 0;
  pointer-events: none;
}

[data-container-bg="true"] > * {
  position: relative;
  z-index: 1;
}

/* ==================== TRAINING SECTION ==================== */

.training-mode-card {
  transition: all 0.3s ease;
  border: 2px solid rgba(255,255,255,0.08);
}

.training-mode-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(0,0,0,0.35);
  border-color: rgba(255,123,71,0.4);
}

.training-usage {
  padding: 8px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.05);
}

.training-history {
  max-height: 200px;
  overflow-y: auto;
  padding: 10px;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.05);
}

.training-history::-webkit-scrollbar {
  width: 6px;
}

.training-history::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.03);
  border-radius: 3px;
}

.training-history::-webkit-scrollbar-thumb {
  background: rgba(255,123,71,0.5);
  border-radius: 3px;
}

.training-history::-webkit-scrollbar-thumb:hover {
  background: rgba(255,123,71,0.7);
}

#training-feedback-panel {
  animation: slideInUp 0.4s ease;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── App shell layout ─────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
  background: var(--sl-900);
}

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
  z-index: 90;
}

body.nav-open { overflow: hidden; }
#app-container { position: relative; }

.app-sidebar-column {
  width: 240px;
  min-width: 240px;
  flex-shrink: 0;
  background: var(--sl-800);
  border-right: 1px solid rgba(255,255,255,0.06);
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--sl-900);
}

/* ─── Topbar ────────────────────────────────────────── */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  height: 60px;
  background: var(--sl-800);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: var(--menu-ink);
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}
.topbar-menu-btn:hover { background: rgba(255,255,255,0.08); }

.topbar-title {
  margin: 0;
  font-family: 'Barlow', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--menu-ink);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification-bell.topbar-bell {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--menu-muted);
  transition: background 0.15s, color 0.15s;
  font-size: 1rem;
  margin-right: 0;
}
.notification-bell.topbar-bell:hover {
  background: rgba(255,255,255,0.08);
  color: var(--menu-ink);
}

.topbar-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  text-decoration: none;
  color: var(--menu-ink);
  transition: background 0.15s, border-color 0.15s;
  min-width: 0;
}
.topbar-user-pill:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.14);
  color: #fff;
}

.topbar-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sl-600);
  color: #8cc8ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.topbar-av img { width: 100%; height: 100%; object-fit: cover; }

.topbar-uname {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.topbar-chevron {
  font-size: 0.65rem;
  color: var(--menu-muted);
  flex-shrink: 0;
}

/* ─── Main content area ─────────────────────────────── */
.main-content {
  flex: 1;
  padding: 28px 32px;
  min-width: 0;
}

.content-section {
  animation: fadeIn 0.25s ease;
  max-width: 1200px;
  margin: 0 auto;
}

/* ─── Home dashboard ────────────────────────────────── */
.home-dashboard {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Greeting row */
.home-greeting {
  padding-bottom: 4px;
}
.home-greeting-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--menu-ink);
  margin-bottom: 5px;
}
.home-greeting-sub {
  font-size: 0.875rem;
  color: var(--menu-muted);
  line-height: 1.5;
}

/* Stat tiles row */
.home-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.hstat-tile {
  background: var(--sl-700);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.hstat-tile:hover {
  background: var(--sl-600);
  border-color: rgba(255,255,255,0.14);
}

.hstat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(31,108,240,0.14);
  color: #5aaeff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.hstat-icon--orange { background: rgba(255,123,71,0.14); color: #ff9b6a; }
.hstat-icon--green  { background: rgba(34,197,94,0.14);  color: #4ade80; }
.hstat-icon--purple { background: rgba(139,92,246,0.14); color: #a78bfa; }

.hstat-body { min-width: 0; }

.hstat-label {
  font-size: 0.75rem;
  color: var(--menu-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hstat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--menu-ink);
  line-height: 1.2;
  margin-top: 2px;
}

/* Action cards */
.home-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.home-action-card {
  background: var(--sl-700);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 22px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  cursor: pointer;
  text-decoration: none;
  color: var(--menu-ink);
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
}
.home-action-card:hover {
  background: var(--sl-600);
  border-color: rgba(255,255,255,0.14);
  transform: translateY(-1px);
}

.hac-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  background: rgba(31,108,240,0.14);
  color: #5aaeff;
}
.home-action-card--orange .hac-icon { background: rgba(255,123,71,0.14);  color: #ff9b6a; }
.home-action-card--amber  .hac-icon { background: rgba(248,177,51,0.14);  color: #fbbf24; }
.home-action-card--teal   .hac-icon { background: rgba(20,184,166,0.14);  color: #2dd4bf; }

.hac-body { flex: 1; min-width: 0; }

.hac-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--menu-muted);
  margin-bottom: 4px;
}

.hac-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--menu-ink);
  margin-bottom: 4px;
}

.hac-desc {
  font-size: 0.82rem;
  color: var(--menu-muted);
  line-height: 1.5;
}

.hac-arrow {
  color: var(--menu-muted);
  font-size: 0.8rem;
  margin-top: 2px;
  transition: color 0.15s, transform 0.15s;
  flex-shrink: 0;
}
.home-action-card:hover .hac-arrow {
  color: var(--menu-ink);
  transform: translateX(3px);
}

/* Quick links */
.home-quicklinks {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hql-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.03);
  color: var(--menu-muted);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.hql-item:hover {
  background: rgba(255,255,255,0.08);
  color: var(--menu-ink);
  border-color: rgba(255,255,255,0.14);
}

/* ────────────────────────────────────────────────
   SIDEBAR — Mosaic-inspired
──────────────────────────────────────────────── */
.sidebar-card {
  min-height: 100vh;
  height: 100vh;
  border-radius: 0;
  padding: 0;
  gap: 0;
  background: var(--sl-800);
  border: none;
  border-right: 1px solid rgba(255,255,255,0.07);
  box-shadow: none;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Top branding area */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.sidebar-logo img {
  max-height: 36px;
  width: auto;
  flex-shrink: 0;
}

.sidebar-kicker {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--menu-ink);
  letter-spacing: 0.03em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Profile mini-card inside sidebar */
.sidebar-profile-card {
  padding: 16px 20px;
  border-radius: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.sidebar-profile {
  gap: 10px;
  margin-bottom: 0;
  padding: 0;
}

.sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 0.75rem;
  background: var(--sl-600);
  color: #8cc8ff;
  flex-shrink: 0;
}

.sidebar-user-info {
  gap: 1px;
  min-width: 0;
}

.sidebar-name {
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  text-transform: none;
  font-weight: 600;
  color: var(--menu-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-caption {
  display: block;
  font-size: 0.72rem;
  color: var(--menu-muted);
}

/* Scrollable nav area */
.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 0 0 auto;
  padding: 6px 10px 0;
}

.sidebar-menu.sidebar-menu-secondary {
  flex: 1;
  padding: 6px 10px 16px;
}

/* Section labels */
.sidebar-nav-label {
  margin: 18px 0 6px;
  padding: 0 12px 0 20px;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(148,163,200,0.45);
  display: block;
  flex-shrink: 0;
}

.sidebar-nav-label::after {
  display: none;
}

/* Nav items */
.sidebar-item {
  margin-bottom: 1px;
  padding: 8px 10px;
  border-radius: 6px;
  border: none;
  border-left: none;
  background: transparent;
  box-shadow: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;
  color: rgba(148,163,200,0.85);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.12s ease, color 0.12s ease;
}

.sidebar-item::before { display: none; }

.sidebar-item i {
  font-size: 15px;
  min-width: 20px;
  text-align: center;
  color: rgba(148,163,200,0.55);
  transition: color 0.12s ease;
  flex-shrink: 0;
}

.sidebar-item span {
  text-align: left;
  font-size: 0.875rem;
  color: inherit;
  font-weight: 500;
  transition: color 0.12s ease;
  flex: 1;
}

.sidebar-item:hover {
  background: rgba(255,255,255,0.06);
  color: var(--menu-ink);
  transform: none;
  box-shadow: none;
}

.sidebar-item:hover i {
  color: rgba(200,215,240,0.8);
}

.sidebar-item.active {
  background: rgba(31,108,240,0.16);
  color: #ffffff;
  transform: none;
  box-shadow: none;
  font-weight: 600;
}

.sidebar-item.active i {
  color: #5aaeff;
}

.sidebar-item.active span {
  color: #ffffff;
}

.sidebar-item:hover::before, .sidebar-item.active::before { display: none; }

.sidebar-item.center-btn { justify-content: flex-start; }

.sidebar-item.premium-entry {
  background: rgba(255,167,26,0.08);
  color: #ffd65a;
}
.sidebar-item.premium-entry i,
.sidebar-item.premium-entry span { color: #ffd65a; }
.sidebar-item.premium-entry:hover {
  background: rgba(255,167,26,0.14);
  color: #ffe780;
}

.sidebar-item.danger { color: rgba(255,107,107,0.75); }
.sidebar-item.danger i { color: rgba(255,107,107,0.55); }
.sidebar-item.danger:hover {
  background: rgba(255,70,70,0.12);
  color: #ff8888;
  transform: none;
}
.sidebar-item.danger:hover i,
.sidebar-item.danger:hover span { color: #ff8888; }

/* Mobile head */
.sidebar-mobile-head {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 0;
}

.sidebar-mobile-label {
  font-size: 0.76rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(148,163,200,0.6);
}

.sidebar-close-btn {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: var(--menu-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s;
}

.sidebar-close-btn:hover { background: rgba(255,255,255,0.08); }

/* Subcopy + status pills — hidden */
.sidebar-subcopy, .sidebar-status-row,
.sidebar-status-pill, .sidebar-status-pill.muted { display: none; }

.notification-bell.topbar-bell { display: flex; }

/* fix notifications panel position for new topbar */
.notifications-panel {
  top: 70px;
  right: 24px;
  left: auto;
  margin-left: 0;
}

/* @media home grid overrides removed — Tailwind */

@media (max-width: 1199px) {
  .app-sidebar-column {
    width: 220px;
    min-width: 220px;
  }
  .home-stats-row { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 991px) {
  .app-sidebar-column {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 120;
    width: min(88vw, 280px);
    min-width: unset;
    transform: translateX(-105%);
    transition: transform 0.28s ease;
  }

  #app-container.nav-open .app-sidebar-column {
    transform: translateX(0);
  }

  #app-container.nav-open .mobile-nav-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-card {
    position: relative;
    top: 0;
    height: 100vh;
    min-height: 100vh;
    overflow-y: auto;
    border-radius: 0;
  }

  .sidebar-mobile-head { display: flex !important; }
  .topbar-menu-btn { display: flex !important; }

  .notifications-panel {
    top: 70px;
    right: 10px;
    left: 10px;
    width: auto;
    max-width: none;
  }
}

@media (max-width: 768px) {
  .main-content { padding: 16px; }
  .home-stats-row { grid-template-columns: repeat(2,1fr); gap: 10px; }
  .home-actions-grid { grid-template-columns: 1fr; }
  .topbar-uname { max-width: 100px; }
}

@media (max-width: 480px) {
  .home-stats-row { grid-template-columns: 1fr 1fr; }
  .hstat-value { font-size: 1.2rem; }
  .main-content { padding: 12px; }
}

#training-game-ui {
  animation: fadeIn 0.3s ease;
}

