/* 
   BlackjackProApp - Premium Dashboard Stylesheet
   Premium style for the dashboard and private area pages
*/

/* === VARIABLES === */
:root {
  --dashboard-bg: #0a0e17;
  --sidebar-bg: #1a2138;
  --card-bg: #1a2138;
  --text-primary: #ffffff;
  --text-secondary: #b8c2cc;
  --accent-color: #d4af37;
  --accent-dark: #b59530;
  --accent-light: #f0e6c2;
  --success-color: #28a745;
  --error-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --border-radius: 8px;
  --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  --box-shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
  --gradient-gold: linear-gradient(135deg, #d4af37 0%, #f0e6c2 100%);
  --gradient-dark: linear-gradient(135deg, #0a0e17 0%, #1a2138 100%);
  --font-main: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Playfair Display', serif;
}

/* ===== CRITICAL: Prevent sidebar zoom on all dashboard pages ===== */
.sidebar,
.dashboard-container .sidebar,
#sidebarMenu {
  font-size: 16px !important;
  zoom: 1 !important;
  -webkit-text-size-adjust: 100% !important;
  -moz-text-size-adjust: 100% !important;
  -ms-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
}

.sidebar *,
.dashboard-container .sidebar *,
#sidebarMenu * {
  -webkit-text-size-adjust: 100% !important;
  -moz-text-size-adjust: 100% !important;
  -ms-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
}

.sidebar-nav,
.sidebar-nav a {
  font-size: 0.95rem !important;
}

.sidebar-nav a i,
.sidebar-nav i {
  font-size: 1.1rem !important;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #1a2138;
  color: #ffffff;
  flex-shrink: 0;
}

.sidebar-header .logo a {
  font-family: 'Playfair Display', var(--font-heading, serif);
  font-size: 0.9rem;
  font-weight: 500;
  color: #d4af37;
  text-decoration: none;
  letter-spacing: 0.5px;
  white-space: nowrap;
  line-height: 1.2;
}

.close-sidebar {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-sidebar:hover {
  color: var(--text-primary);
}

.plan-badge {
  background: var(--gradient-gold);
  color: var(--dashboard-bg);
  padding: 0.15rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
  display: inline-block;
}


.notifications {
  position: relative;
  margin-right: 1.5rem;
}

.notification-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
  position: relative;
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--error-color);
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: bold;
}


.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--sidebar-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow-sm);
  min-width: 200px;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 1000;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.user-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.dropdown-menu a i {
  margin-right: 0.75rem;
  width: 20px;
  text-align: center;
}

/* === DASHBOARD CONTAINER - MOBILE FIRST === */
.dashboard-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--dashboard-bg);
}

/* === SIDEBAR - MOBILE FIRST (Hidden by default) === */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100%;
  width: 280px;
  z-index: 1051 !important;
  background-color: var(--sidebar-bg);
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
  overflow-y: auto;
  box-shadow: var(--box-shadow);
  display: flex;
  flex-direction: column;
}

.sidebar.show {
  transform: translateX(0);
}

/* === MOBILE MENU TOGGLE - Visible by default === */
.mobile-main-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1052;
  background: var(--accent-color);
  color: var(--dashboard-bg);
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--box-shadow-sm);
  transition: all 0.3s ease;
}

.mobile-main-menu-toggle:hover {
  transform: scale(1.1);
  box-shadow: var(--box-shadow);
}

/* === SIDEBAR OVERLAY - Mobile only === */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1040 !important;
  transition: opacity 0.3s ease-in-out;
  opacity: 0;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* === MAIN CONTENT - MOBILE FIRST === */
.main-content {
  width: 100%;
  margin-left: 0;
  padding-top: 70px;
  transition: margin-left 0.3s ease;
}

/* === DASHBOARD MAIN CONTENT - MOBILE FIRST === */
.dashboard-main {
  padding: 1rem;
}

.page-header {
  margin-bottom: 2rem;
  /* Clear floating hamburger on mobile */
  padding-left: 3.25rem;
}

@media (min-width: 993px) {
  .page-header {
    padding-left: 0;
  }
}

.page-header h1 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-header p {
  color: var(--text-secondary);
  max-width: 100%;
  line-height: 1.6;
  font-size: 0.9rem;
}

/* === PREMIUM STATS OVERVIEW - MOBILE FIRST === */
.stats-overview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--box-shadow-sm);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-gold);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow);
  border-color: rgba(212, 175, 55, 0.3);
}

.stat-card:hover::before {
  opacity: 0.1;
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--accent-color);
  margin-right: 0;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}

.stat-info {
  position: relative;
  z-index: 1;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  font-family: var(--font-heading);
  color: var(--text-primary);
}

.stat-title {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* === PREMIUM DASHBOARD GRID - MOBILE FIRST === */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.dashboard-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.dashboard-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow);
  border-color: rgba(212, 175, 55, 0.3);
}

.card-header {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.card-header h3 {
  font-size: 1.1rem;
  margin-bottom: 0;
  color: var(--accent-color);
  font-family: var(--font-heading);
}

.card-actions {
  margin-top: 0.5rem;
  width: 100%;
}

.card-actions .view-all {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.card-actions .view-all:hover {
  color: var(--accent-color);
}

.card-body {
  padding: 1rem;
}

/* Chart cards - Mobile First */
.progress-chart-card .card-body,
.accuracy-chart-card .card-body {
  height: 250px;
  position: relative;
}

.chart-container {
  width: 100%;
  height: 100%;
  position: relative;
}

/* Session list */
.session-list {
  display: flex;
  flex-direction: column;
}

.session-item {
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.session-item:last-child {
  border-bottom: none;
}

.session-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.session-date .date {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.session-date .time {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.session-details {
  text-align: left;
  margin-top: 0.5rem;
}

.session-details .duration,
.session-details .session-accuracy {
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  color: var(--text-secondary);
}

.session-details i {
  margin-right: 0.25rem;
  color: var(--accent-color);
}

.session-accuracy.high {
  color: var(--success-color);
}

.session-accuracy.medium {
  color: var(--warning-color);
}

.session-accuracy.low {
  color: var(--error-color);
}

.no-data-message {
  text-align: center;
  color: var(--text-secondary);
  padding: 2rem 0;
  font-style: italic;
}

/* Subscription card */
.subscription-info {
  text-align: center;
  padding: 1rem 0;
}

.current-plan {
  margin-bottom: 2rem;
}

.current-plan .plan-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
  color: var(--accent-color);
}

.current-plan .plan-name span {
  color: var(--accent-color);
}

.current-plan .plan-expires {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.plan-features {
  margin-bottom: 2rem;
  text-align: left;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.plan-features ul {
  list-style: none;
}

.plan-features ul li {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: flex-start;
  color: var(--text-primary);
}

.plan-features ul li i {
  color: var(--accent-color);
  margin-right: 0.75rem;
  margin-top: 0.2rem;
  font-size: 0.9rem;
}

.btn-upgrade {
  background: var(--gradient-gold);
  color: var(--dashboard-bg);
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
  border: none;
  cursor: pointer;
  font-family: var(--font-main);
}

.btn-upgrade:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

/* === TABLET AND UP (min-width: 576px) === */
@media (min-width: 576px) {
  .dashboard-main {
    padding: 1.5rem;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .page-header p {
    font-size: 1rem;
  }

  .stats-overview {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .stat-card {
    flex-direction: row;
    text-align: left;
    padding: 1.25rem;
  }

  .stat-icon {
    width: 55px;
    height: 55px;
    font-size: 1.35rem;
    margin-right: 1rem;
    margin-bottom: 0;
  }

  .stat-value {
    font-size: 1.6rem;
  }

  .stat-title {
    font-size: 0.85rem;
  }

  .dashboard-grid {
    gap: 1.25rem;
  }

  .card-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
  }

  .card-header h3 {
    font-size: 1.15rem;
  }

  .card-actions {
    margin-top: 0;
    width: auto;
  }

  .card-body {
    padding: 1.25rem;
  }

  .session-item {
    flex-direction: row;
    justify-content: space-between;
  }

  .session-details {
    text-align: right;
    margin-top: 0;
  }

  .progress-chart-card .card-body,
  .accuracy-chart-card .card-body {
    height: 280px;
  }
}

/* === DESKTOP (min-width: 768px) === */
@media (min-width: 768px) {
  .dashboard-container {
    flex-direction: row;
  }

  .sidebar {
    position: relative;
    transform: translateX(0);
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
  }

  .mobile-main-menu-toggle {
    display: none;
  }

  .sidebar-overlay {
    display: none !important;
  }

  .main-content {
    flex: 1;
    margin-left: 0;
    padding-top: 0;
  }

  .dashboard-main {
    padding: 2rem;
  }

  .page-header {
    margin-bottom: 3rem;
  }

  .page-header h1 {
    font-size: 2.5rem;
  }

  .page-header p {
    max-width: 700px;
  }

  .stats-overview {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
  }

  .stat-card {
    padding: 1.5rem;
  }

  .stat-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    margin-right: 1.5rem;
  }

  .stat-value {
    font-size: 1.75rem;
  }

  .stat-title {
    font-size: 0.9rem;
  }

  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
  }

  .card-header {
    padding: 1.25rem 1.5rem;
  }

  .card-header h3 {
    font-size: 1.25rem;
  }

  .card-body {
    padding: 1.5rem;
  }

  .progress-chart-card .card-body,
  .accuracy-chart-card .card-body {
    height: 300px;
  }
}

/* === LARGE DESKTOP (min-width: 992px) === */
@media (min-width: 992px) {
  .stats-overview {
    grid-template-columns: repeat(4, 1fr);
  }

  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  }
}

/* === EXTRA LARGE DESKTOP (min-width: 1200px) === */
@media (min-width: 1200px) {
  .dashboard-main {
    padding: 2.5rem;
  }
}

/* === PREMIUM ANIMATIONS === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.dashboard-card {
  animation: fadeIn 0.5s ease forwards;
}

.dashboard-card:nth-child(1) { animation-delay: 0.1s; }
.dashboard-card:nth-child(2) { animation-delay: 0.2s; }
.dashboard-card:nth-child(3) { animation-delay: 0.3s; }
.dashboard-card:nth-child(4) { animation-delay: 0.4s; }

/* === PREMIUM UTILITY CLASSES === */
.text-gold {
  color: var(--accent-color);
  background-color: rgba(212, 175, 55, 0.1);
  font-weight: bold;
}

.bg-dark {
  background: var(--dashboard-bg);
}

.shadow-gold {
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.border-gold {
  border: 1px solid var(--accent-color);
}

/* === LOADING ANIMATION === */
.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: var(--accent-color);
  animation: spin 1s ease-in-out infinite;
  margin: 2rem auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Styles for the new session types card */
.session-types-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.session-type-item {
  display: flex;
  align-items: center;
  background-color: var(--card-bg);
  border-radius: 10px;
  padding: 15px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.session-type-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.session-type-animate {
  animation: rotateCounter 0.8s ease-in-out;
}

@keyframes rotateCounter {
  0% { transform: rotateY(0deg); }
  50% { transform: rotateY(180deg); }
  100% { transform: rotateY(360deg); }
}

.session-type-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  color: white;
  font-size: 1.5rem;
}

.session-type-info {
  flex: 1;
}

.session-type-info h4 {
  margin: 0 0 5px 0;
  font-size: 1.1rem;
}

.session-type-info p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Style for updated counters */
.updated-value {
  animation: pulseHighlight 2s ease;
  font-weight: bold;
}

@keyframes pulseHighlight {
  0% { color: var(--text-secondary); }
  25% { color: var(--accent-color); }
  50% { color: var(--success-color); }
  75% { color: var(--accent-color); }
  100% { color: var(--text-secondary); }
}

/* Styles for the detailed statistics section by session type */
.sessions-stats-tabs {
  width: 100%;
}

.tabs-header {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 15px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-btn {
  background: none;
  border: none;
  padding: 10px 15px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  white-space: nowrap;
  flex-shrink: 0;
}

.tab-btn:hover {
  color: var(--accent-color);
}

.tab-btn.active {
  color: var(--accent-color);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-color);
}

.tabs-content {
  position: relative;
  min-height: 300px;
}

.tab-content {
  display: none;
  animation: fadeIn 0.5s ease forwards;
}

.tab-content.active {
  display: block;
}

/* Enhanced session type details header */
.session-type-details .stat-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.session-type-details .session-type-title h4 {
  margin: 0 0 4px 0;
  color: var(--text-primary);
}

.session-type-details .session-type-title p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Grid for detailed stats cards - Mobile First */
.stats-details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 576px) {
  .stats-details-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (min-width: 768px) {
  .stats-details-grid {
    gap: 14px;
  }
}

/* Detailed stat card styling */
.detail-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: rgba(26, 33, 56, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

@media (min-width: 576px) {
  .detail-stat {
    gap: 12px;
    padding: 14px;
    border-radius: 10px;
  }
}

.detail-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  border-color: rgba(212, 175, 55, 0.25);
}

.detail-stat i {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 175, 55, 0.12);
  color: var(--accent-color);
  font-size: 1rem;
  flex: 0 0 40px;
}

@media (min-width: 576px) {
  .detail-stat i {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
    flex: 0 0 44px;
  }
}

.detail-stat-info span {
  display: block;
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 700;
}

.detail-stat-info p {
  margin: 2px 0 0;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

@media (min-width: 576px) {
  .detail-stat-info span {
    font-size: 1.2rem;
  }

  .detail-stat-info p {
    font-size: 0.85rem;
  }
}

.tab-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 1s infinite linear;
  margin-bottom: 15px;
}

.tab-loading p {
  color: var(--text-secondary);
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 12px 15px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.leaderboard-table th {
  background-color: rgba(212, 175, 55, 0.1);
  color: var(--accent-color);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.leaderboard-table tbody tr:last-child td {
  border-bottom: none;
}

.leaderboard-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.leaderboard-table td {
  color: var(--text-primary);
  font-size: 0.95rem;
}

/* Specific styling for the rank column */
.leaderboard-table td:first-child {
  font-weight: 700;
  color: var(--accent-light);
}

/* Adjust performance column width */
.leaderboard-table th#casino-performance-header,
.leaderboard-table th#flashcards-performance-header,
.leaderboard-table th#auto-performance-header,
.leaderboard-table th#decision-performance-header {
  width: 120px;
}

/* Leaderboard table - Mobile First (card layout) */
.leaderboard-table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.leaderboard-table thead,
.leaderboard-table tbody,
.leaderboard-table th,
.leaderboard-table td,
.leaderboard-table tr {
  display: block;
}

.leaderboard-table thead tr {
  position: absolute;
  top: -9999px;
  left: -9999px;
}

.leaderboard-table tr {
  margin-bottom: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  background: var(--card-bg);
  box-shadow: var(--box-shadow-sm);
}

.leaderboard-table td {
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  padding: 10px 15px 10px 50%;
  text-align: right;
  font-size: 0.875rem;
}

.leaderboard-table td:last-child {
  border-bottom: none;
}

.leaderboard-table td::before {
  content: attr(data-label);
  position: absolute;
  left: 15px;
  width: calc(50% - 30px);
  padding-right: 10px;
  white-space: nowrap;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Set data-label for each column */
.leaderboard-table tbody td:nth-of-type(1)::before { content: "Rank:"; }
.leaderboard-table tbody td:nth-of-type(2)::before { content: "Player:"; }
.leaderboard-table tbody td:nth-of-type(3)::before { content: "Performance:"; }
.leaderboard-table tbody td:nth-of-type(4)::before { content: "Level:"; }
.leaderboard-table tbody td:nth-of-type(5)::before { content: "Best Streak:"; }
.leaderboard-table tbody td:nth-of-type(6)::before { content: "Total Time:"; }
.leaderboard-table tbody td:nth-of-type(7)::before { content: "Total Sessions:"; }
.leaderboard-table tbody td:nth-of-type(8)::before { content: "Total Correct:"; }
.leaderboard-table tbody td:nth-of-type(9)::before { content: "Total Attempts:"; }
.leaderboard-table tbody td:nth-of-type(10)::before { content: "XP:"; }
.leaderboard-table tbody td:nth-of-type(11)::before { content: "Achievements:"; }

/* Desktop table layout */
@media (min-width: 769px) {
  .leaderboard-table {
    display: table;
    width: 100%;
    border-collapse: collapse;
  }

  .leaderboard-table thead,
  .leaderboard-table tbody,
  .leaderboard-table th,
  .leaderboard-table td,
  .leaderboard-table tr {
    display: table-row;
  }

  .leaderboard-table thead tr {
    position: static;
    top: auto;
    left: auto;
  }

  .leaderboard-table tr {
    margin-bottom: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    display: table-row;
  }

  .leaderboard-table td {
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: static;
    padding: 12px 15px;
    text-align: left;
    font-size: 0.95rem;
    display: table-cell;
  }

  .leaderboard-table td::before {
    display: none;
  }
}

/* Styling for the new columns: Total Correct, Total Attempts, Total Sessions */
.leaderboard-table th.total-time-col,
.leaderboard-table td.total-time-col,
.leaderboard-table th.total-sessions-col,
.leaderboard-table td.total-sessions-col,
.leaderboard-table th.total-correct-col,
.leaderboard-table td.total-correct-col,
.leaderboard-table th.total-attempts-col,
.leaderboard-table td.total-attempts-col {
  color: var(--accent-light);
  font-weight: bold;
}

/* Ensure numerical values in these columns are visually distinct */
.leaderboard-table td.total-time-col,
.leaderboard-table td.total-sessions-col,
.leaderboard-table td.total-correct-col,
.leaderboard-table td.total-attempts-col {
  font-size: 1.05rem; /* Slightly larger for emphasis */
  color: var(--accent-color);
}

/* Special styling for ranks */
.leaderboard-table tbody tr:nth-child(1) td:nth-child(1), /* Rank 1 */
.leaderboard-table tbody tr:nth-child(2) td:nth-child(1), /* Rank 2 */
.leaderboard-table tbody tr:nth-child(3) td:nth-child(1) { /* Rank 3 */
  color: gold;
  font-weight: bold;
  font-size: 1.2rem;
}

/* Additional styles for user's own rank row */
.leaderboard-your-rank-container {
  margin-bottom: 20px;
  border: 1px solid var(--accent-color);
  border-radius: var(--border-radius);
  background-color: rgba(212, 175, 55, 0.05);
  padding: 15px;
}

.leaderboard-your-rank-container h4 {
  color: var(--accent-color);
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.leaderboard-your-rank-container #your-rank-position {
  font-weight: bold;
  font-size: 1.3rem;
}

.leaderboard-your-rank-container .leaderboard-table th {
  color: var(--accent-light);
}

.leaderboard-your-rank-container .leaderboard-table td {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.02);
}

/* Search and filter inputs */
#leaderboardSearchInput, #leaderboardPeriodFilter {
  background-color: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 10px 15px;
  border-radius: var(--border-radius);
}

#leaderboardSearchInput::placeholder {
  color: var(--text-secondary);
}

#leaderboardPeriodFilter option {
  background-color: var(--card-bg);
  color: var(--text-primary);
}

/* Ensure table responsiveness */
.leaderboard-table-container {
  overflow-x: auto;
}

/* Leaderboard table base styles - Mobile First */
.leaderboard-table {
  width: 100%;
  min-width: unset;
  border-collapse: collapse;
}

.leaderboard-table th, 
.leaderboard-table td {
  padding: 8px 5px;
  font-size: 0.8rem;
}

.leaderboard-your-rank-container h4 {
  font-size: 1rem;
  margin-bottom: 12px;
}

@media (min-width: 576px) {
  .leaderboard-table th, 
  .leaderboard-table td {
    padding: 10px 8px;
    font-size: 0.85rem;
  }

  .leaderboard-your-rank-container h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
  }
}

@media (min-width: 769px) {
  .leaderboard-table {
    min-width: 800px;
  }

  .leaderboard-table th, 
  .leaderboard-table td {
    padding: 12px 15px;
    font-size: 0.95rem;
  }

  .leaderboard-your-rank-container h4 {
    font-size: 1.2rem;
  }
}

/* Mobile statistics navigation - Mobile First */
.stats-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  background: rgba(26, 33, 56, 0.8);
  margin: -15px -15px 15px;
  padding: 8px 5px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  position: sticky;
  top: 0;
  z-index: 10;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.stats-nav-item {
  padding: 6px 10px;
  margin: 0 2px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.stats-nav-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.stats-nav-item.active {
  color: var(--accent-color);
  background: rgba(212, 175, 55, 0.1);
}

@media (min-width: 576px) {
  .stats-nav {
    padding: 10px;
    flex-wrap: nowrap;
  }
  
  .stats-nav-item {
    padding: 8px 15px;
    font-size: 0.9rem;
    margin: 0 5px;
  }
}

/* Improvements for compact statistics view */
.compact-stats-view {
  /* Existing styles - placeholder for future enhancements */
  display: block;
}

.compact-stats-view .stats-details-grid {
  transition: all 0.3s ease;
}

/* Animation for stats filtering */
@keyframes fadeInStats {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.compact-stats-view .detail-stat {
  animation: fadeInStats 0.3s ease forwards;
}

/* New styles for the personal rank card on dashboard.html - Mobile First */
#personal-rank-card .card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  min-height: 180px;
  text-align: center;
}

.rank-display,
.score-display {
  margin-bottom: 0.75rem;
}

.rank-value,
.score-value {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-color);
  display: block;
  line-height: 1;
  text-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.score-value {
  font-size: 2rem;
  color: var(--accent-light);
  text-shadow: none;
}

.rank-label,
.score-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.5rem;
}

.rank-message {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-top: 1rem;
}

/* Polished personal rank card */
#personal-rank-card .personal-rank-body {
  background: radial-gradient(120% 120% at 10% 10%, rgba(212, 175, 55, 0.08) 0%, rgba(26, 33, 56, 0.6) 60%, rgba(26, 33, 56, 0.9) 100%);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 12px;
}

#personal-rank-card .rank-display,
#personal-rank-card .score-display {
  width: 100%;
}

#personal-rank-card .rank-value {
  font-size: 3rem;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.35);
}

#personal-rank-card .score-value {
  font-size: 2.1rem;
}

@media (min-width: 576px) {
  #personal-rank-card .card-body {
    padding: 2rem;
    min-height: 200px;
  }

  #personal-rank-card .rank-value {
    font-size: 3.5rem;
  }

  #personal-rank-card .score-value {
    font-size: 2.5rem;
  }

  .rank-value,
  .score-value {
    font-size: 3.5rem;
  }

  .score-value {
    font-size: 2.5rem;
  }

  .rank-label,
  .score-label {
    font-size: 0.9rem;
  }

  .rank-message {
    font-size: 1rem;
    margin-top: 1.5rem;
  }
}

@media (min-width: 768px) {
  #personal-rank-card .rank-value {
    font-size: 4rem;
  }

  #personal-rank-card .score-value {
    font-size: 2.8rem;
  }
}

.rank-message a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: bold;
}

.rank-message a:hover {
  text-decoration: underline;
}

/* Adjust dashboard grid for new card - Mobile First */
/* Base mobile styles already set above */

@media (min-width: 768px) {
  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

@media (min-width: 992px) {
  #personal-rank-card, 
  .session-types-card {
    grid-column: 1 / -1; /* Span full width on medium screens */
  }
}

@media (min-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr 1fr; /* Three columns on large screens */
  }

  #personal-rank-card, 
  .session-types-card {
    grid-column: auto; /* Reset to normal column span */
  }
}

/* First-time Tutorial Modal Styles */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 2000; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0, 0, 0, 0.85); /* Black w/ opacity */
  backdrop-filter: blur(8px);
  display: flex; /* Use flexbox for centering */
  align-items: center; /* Center vertically */
  justify-content: center; /* Center horizontally */
  animation: fadeInModal 0.3s ease-out forwards;
  padding: 1rem;
}

.modal-content {
  background: linear-gradient(135deg, rgba(26, 33, 56, 0.98) 0%, rgba(10, 14, 23, 0.98) 100%);
  margin: auto;
  padding: 0;
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 20px;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 212, 255, 0.1);
  position: relative;
  text-align: center;
  animation: slideInModal 0.4s ease-out forwards;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
}

.welcome-modal {
  background: linear-gradient(135deg, rgba(26, 33, 56, 0.98) 0%, rgba(10, 14, 23, 0.98) 100%);
}

/* Welcome Modal Specific Styles */
.welcome-header {
  padding: 2.5rem 2rem 1.5rem;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.08) 0%, rgba(0, 255, 150, 0.05) 100%);
  border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.welcome-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: float 3s ease-in-out infinite;
}

.welcome-title {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #00d4ff 0%, #00ff96 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  line-height: 1.3;
}

.welcome-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
  max-width: 100%;
}

.welcome-modal-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 212, 255, 0.3) transparent;
}

.welcome-modal-scroll::-webkit-scrollbar {
  width: 6px;
}

.welcome-modal-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.welcome-modal-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.3);
  border-radius: 3px;
}

.welcome-modal-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 255, 0.5);
}

.welcome-cta-text {
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 600;
  margin: 1.5rem 0 1rem;
  padding: 0 1.5rem;
}

.welcome-modal-footer {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 2rem;
  background: linear-gradient(180deg, transparent 0%, rgba(10, 14, 23, 0.95) 20%, rgba(10, 14, 23, 0.98) 100%);
  border-top: 1px solid rgba(0, 212, 255, 0.2);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.welcome-btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #00d4ff 0%, #00a5cc 100%);
  color: #0a0e17;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.welcome-btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 30px rgba(0, 212, 255, 0.5);
  background: linear-gradient(135deg, #00e5ff 0%, #00b8e6 100%);
}

.welcome-btn-primary:active {
  transform: translateY(0) scale(1);
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.modal-content h2 {
  font-size: 2.2rem;
  margin-bottom: 20px;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--font-heading);
}

.modal-content p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 15px;
}

.modal-content .close-button {
  color: #ffffff; /* Changed from var(--text-secondary) for better contrast */
  position: absolute;
  top: 10px; /* Adjusted for better spacing */
  right: 15px; /* Adjusted for better spacing */
  font-size: 40px; /* Increased size for mobile tap target */
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal-content .close-button:hover,
.modal-content .close-button:focus {
  color: var(--accent-color);
  text-decoration: none;
  cursor: pointer;
}

.modal-content .btn-primary {
  background: linear-gradient(135deg, #00d4ff, #00a5cc);
  color: #0a0e17;
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  font-size: 1.1rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  margin-top: 20px;
}

.modal-content .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

/* Override for welcome modal - ensure new button style takes precedence */
.welcome-modal .btn-primary {
  display: none; /* Hide old button if it exists */
}

.feature-section {
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 1.5rem;
  text-align: left;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.feature-section:hover {
  border-color: rgba(0, 212, 255, 0.4);
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.15);
  transform: translateY(-2px);
}

.feature-section h3 {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  font-weight: 600;
}

.feature-section h3 i {
  color: #00d4ff;
  margin-right: 0.75rem;
  font-size: 1.3rem;
}

.feature-section ul {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}

.feature-section ul li {
  color: var(--text-secondary);
  margin-bottom: 5px;
  font-size: 0.95rem;
}

.feature-section ul li strong {
  color: var(--accent-light);
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInModal {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes slideUpModal {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Modal adjustments - Mobile First */
.modal {
  padding: 0;
  align-items: flex-end;
}

.modal-content {
  width: 100%;
  max-width: 100%;
  max-height: 100vh;
  border-radius: 20px 20px 0 0;
  margin: 0;
  animation: slideUpModal 0.4s ease-out forwards;
}

.welcome-header {
  padding: 1.75rem 1.25rem 1rem;
}

.welcome-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.welcome-title {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.welcome-subtitle {
  font-size: 0.9rem;
  line-height: 1.6;
}

.feature-section {
  padding: 1rem;
  margin: 1rem 0.75rem;
  border-radius: 10px;
}

.feature-section h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.feature-section h3 i {
  font-size: 1.1rem;
  margin-right: 0.5rem;
}

.feature-section p {
  font-size: 0.9rem;
  line-height: 1.6;
}

.feature-section ul li {
  font-size: 0.85rem;
}

.welcome-cta-text {
  font-size: 0.95rem;
  margin: 1.25rem 0 0.75rem;
  padding: 0 1rem;
}

.welcome-modal-footer {
  padding: 1rem 1.25rem;
}

.welcome-btn-primary {
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  border-radius: 50px;
}

.modal-content .close-button {
  font-size: 40px;
  top: 10px;
  right: 15px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.modal-content .close-button:hover {
  background: rgba(0, 0, 0, 0.5);
}

@media (min-width: 480px) {
  .modal {
    padding: 0.5rem;
  }

  .modal-content {
    max-height: 95vh;
  }

  .welcome-header {
    padding: 2rem 1.5rem 1.25rem;
  }

  .welcome-icon {
    font-size: 3rem;
  }

  .welcome-title {
    font-size: 1.5rem;
  }

  .welcome-subtitle {
    font-size: 0.95rem;
  }

  .feature-section {
    padding: 1.25rem;
    margin: 1.25rem 1rem;
  }

  .welcome-cta-text {
    font-size: 1rem;
  }

  .welcome-modal-footer {
    padding: 1.25rem 1.5rem;
  }

  .welcome-btn-primary {
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
  }
}

@media (min-width: 769px) {
  .modal {
    padding: 1rem;
    align-items: center;
  }

  .modal-content {
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    border-radius: 20px;
    margin: auto;
    animation: slideInModal 0.4s ease-out forwards;
  }
}

/* Tips of the Day Styles */
.tip-notification-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--error-color);
  color: white;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: red;
  font-size: 0;
  animation: pulse 2s infinite;
}

/* Mobile hamburger (+1) notification badge */
@media (min-width: 769px) {
  .mobile-main-menu-toggle {
    display: none; /* Hidden on desktop */
  }
}
.hamburger-notification-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--error-color);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: none; /* shown via JS */
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--dashboard-bg);
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

.tip-modal .modal-content {
  max-width: 600px;
  background: var(--card-bg);
  border: 2px solid var(--accent-color);
  border-radius: 15px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.tip-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 20px 30px 10px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.tip-icon {
  font-size: 2.5rem;
  color: var(--accent-color);
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from { text-shadow: 0 0 10px var(--accent-color); }
  to { text-shadow: 0 0 20px var(--accent-color), 0 0 30px var(--accent-color); }
}

.tip-header h2 {
  margin: 0;
  font-size: 1.8rem;
}

.tip-body {
  padding: 20px 30px;
  line-height: 1.6;
  color: var(--text-primary);
}

.tip-body h3 {
  color: var(--accent-color);
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tip-body p {
  margin-bottom: 15px;
  font-size: 1rem;
}

.tip-body ul {
  margin: 15px 0;
  padding-left: 20px;
}

.tip-body ul li {
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.tip-body strong {
  color: var(--accent-light);
  font-weight: 600;
}

.tip-body a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.tip-body a:hover {
  color: var(--accent-light);
  text-decoration: underline;
}

.tip-footer {
  padding: 15px 30px 25px;
  text-align: center;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.tip-footer .btn {
  padding: 10px 25px;
  font-size: 1rem;
  border-radius: 25px;
  transition: all 0.3s ease;
}

.tip-footer .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

/* Sidebar tips button styling */
.sidebar-nav a#tips-btn {
  position: relative;
  overflow: visible;
}

.sidebar-nav-tips,
.sidebar-nav-tips ul,
.sidebar-nav-tips li {
  overflow: visible;
}

.sidebar-nav a#tips-btn .tip-notification-badge {
  right: 10px;
}

/* Tips count badge — in-flow, never clipped by sidebar overflow */
.tip-count-pill {
  position: static;
  right: auto;
  top: auto;
  flex-shrink: 0;
  margin-left: 0.5rem;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  width: auto;
  background: #d4af37;
  color: #0a0e17;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.7rem;
  line-height: 1;
  font-family: inherit;
  box-shadow: none;
  border: none;
}

.tip-count-pill .count {
  line-height: 1;
}

.tip-count-pill[hidden],
.tip-count-pill[style*="display: none"] {
  display: none !important;
}




/* Tip modal adjustments - Mobile First */
.tip-modal .modal-content {
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.tip-header {
  padding: 15px 20px 10px;
  flex-direction: column;
  gap: 10px;
}

.tip-icon {
  font-size: 2rem;
}

.tip-header h2 {
  font-size: 1.5rem;
}

.tip-body {
  padding: 15px 20px;
}

.tip-footer {
  padding: 10px 20px 20px;
}

@media (min-width: 480px) {
  .tip-modal .modal-content {
    width: 95%;
    margin: 20px;
  }
}

@media (min-width: 769px) {
  .tip-modal .modal-content {
    width: 100%;
    max-width: 600px;
    margin: auto;
  }

  .tip-header {
    flex-direction: row;
    gap: 15px;
    padding: 20px 30px 10px;
  }

  .tip-icon {
    font-size: 2.5rem;
  }

  .tip-header h2 {
    font-size: 1.8rem;
  }

  .tip-body {
    padding: 20px 30px;
  }

  .tip-footer {
    padding: 15px 30px 25px;
  }
}

/* Sidebar Navigation Sections */
.sidebar-nav {
  padding: 0;
  margin: 0;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li {
  margin: 0;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  padding: 0.875rem 1.25rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 0;
  transition: all 0.3s ease;
  position: relative;
}

.sidebar-nav a i {
  margin-right: 0.75rem;
  width: 20px;
  text-align: center;
  font-size: 1.1rem;
}

.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.sidebar-nav .active a,
.sidebar-nav a.active {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.1) 100%);
  color: var(--accent-color);
  border-left: 4px solid var(--accent-color);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.15);
}

.sidebar-nav .active a i,
.sidebar-nav a.active i {
  color: var(--accent-color);
  filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.5));
}

/* Top Navigation Section */
.sidebar-nav-top {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Training Navigation Section */
.sidebar-nav-training {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 0;
  margin: 0.5rem 0;
}

/* Bottom Navigation Section */
.sidebar-nav-bottom {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 0.5rem;
}

/* User Info Section */
.user-info {
  display: flex;
  align-items: center;
  padding: 1.25rem 1.5rem;
  margin: 0.5rem 0;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  color: var(--dashboard-bg);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.user-details {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-status {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Account + upgrade — minimal */
.sidebar .sidebar-account,
#sidebarMenu .sidebar-account {
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar .sidebar-account .user-info,
#sidebarMenu .sidebar-account .user-info {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 1rem 1.25rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 0;
}

.sidebar a.plan-badge-link,
#sidebarMenu a.plan-badge-link {
  text-decoration: none;
  cursor: pointer;
}

.sidebar a.plan-badge-link:hover,
#sidebarMenu a.plan-badge-link:hover {
  opacity: 0.9;
}

.sidebar .plan-badge.trial,
#sidebarMenu .plan-badge.trial {
  background: rgba(184, 194, 204, 0.25);
  color: #e8eef4;
}

.sidebar .plan-badge.base,
#sidebarMenu .plan-badge.base {
  background: var(--gradient-gold, linear-gradient(135deg, #d4af37 0%, #f0e6c2 100%));
  color: #0a0e17;
}

.sidebar .plan-badge.pro,
#sidebarMenu .plan-badge.pro {
  background: rgba(129, 161, 193, 0.35);
  color: #e8eef4;
}

.sidebar .sidebar-upgrade,
#sidebarMenu .sidebar-upgrade {
  padding: 0 1.25rem 1rem;
}

.sidebar .sidebar-upgrade[hidden],
#sidebarMenu .sidebar-upgrade[hidden] {
  display: none !important;
}

.sidebar .sidebar-upgrade-btn,
#sidebarMenu .sidebar-upgrade-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.7rem 1rem;
  text-align: center;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0a0e17;
  background: #d4af37;
  border: 1px solid rgba(212, 175, 55, 0.6);
  border-radius: 8px;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.sidebar .sidebar-upgrade-btn i,
#sidebarMenu .sidebar-upgrade-btn i {
  font-size: 0.85rem;
  color: inherit;
  margin: 0;
  width: auto;
}

.sidebar .sidebar-upgrade-btn:hover,
#sidebarMenu .sidebar-upgrade-btn:hover {
  background: #e0c05a;
  color: #0a0e17;
}

.sidebar .sidebar-upgrade-hint,
#sidebarMenu .sidebar-upgrade-hint {
  margin: 0.5rem 0 0;
  text-align: center;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #8b96a3;
}

.sidebar .sidebar-nav-main,
#sidebarMenu .sidebar-nav-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0.35rem 0;
  margin: 0;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar .sidebar-nav-main a,
#sidebarMenu .sidebar-nav-main a {
  display: flex;
  align-items: center;
}

.sidebar .nav-label,
#sidebarMenu .nav-label {
  flex: 1;
  min-width: 0;
}

.sidebar .nav-pro-pill,
#sidebarMenu .nav-pro-pill {
  margin-left: 0.5rem;
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #d4af37;
  background: transparent;
  border: 1px solid rgba(212, 175, 55, 0.45);
  padding: 0.12rem 0.4rem;
  border-radius: 3px;
  line-height: 1.2;
}

.sidebar .sidebar-nav-tips,
#sidebarMenu .sidebar-nav-tips {
  flex-shrink: 0;
  padding: 0.25rem 0;
  margin: 0;
  border: none;
  opacity: 0.8;
  overflow: visible;
}

.sidebar .sidebar-nav-tips a#tips-btn,
#sidebarMenu .sidebar-nav-tips a#tips-btn {
  display: flex;
  align-items: center;
  overflow: visible;
}

.sidebar .sidebar-nav-bottom,
#sidebarMenu .sidebar-nav-bottom {
  flex-shrink: 0;
  margin-top: auto;
}

.sidebar .sidebar-nav-bottom a.sidebar-upgrade-link,
#sidebarMenu .sidebar-nav-bottom a.sidebar-upgrade-link {
  color: #d4af37;
  font-weight: 600;
}

.sidebar .sidebar-nav-bottom a.sidebar-upgrade-link:hover,
#sidebarMenu .sidebar-nav-bottom a.sidebar-upgrade-link:hover {
  color: #e8d5a3;
  background: rgba(212, 175, 55, 0.06);
}

/* Fake live presence — subtle, app-wide */
.lp-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3ddc84;
  box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.55);
  animation: lpPulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes lpPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.45); }
  50% { box-shadow: 0 0 0 5px rgba(61, 220, 132, 0); }
}

.sidebar .nav-live-count,
#sidebarMenu .nav-live-count {
  margin-left: 0.4rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-width: 1.15rem;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  color: #b8f5d0;
  background: rgba(61, 220, 132, 0.12);
  border: 1px solid rgba(61, 220, 132, 0.28);
}

.sidebar .nav-live-count i,
#sidebarMenu .nav-live-count i {
  font-size: 0.62rem !important;
  margin-right: 0 !important;
  width: auto !important;
  color: #7dffa8 !important;
}

.sidebar-live-summary {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.15rem 1.25rem 0.65rem;
  padding: 0.5rem 0.7rem;
  font-size: 0.78rem;
  color: #a8b2bc;
  background: rgba(61, 220, 132, 0.06);
  border: 1px solid rgba(61, 220, 132, 0.15);
  border-radius: 8px;
}

.sidebar-live-summary > .fa-users {
  color: #7dffa8;
  font-size: 0.85rem;
  width: auto;
  margin: 0;
}

.sidebar-live-summary strong {
  color: #d4af37;
  font-weight: 700;
}

.live-presence-bar {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  margin: 0.45rem auto 0.85rem;
  max-width: 360px;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(26, 33, 56, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #9aa5b0;
  font-size: 0.75rem;
  position: relative;
  z-index: 1;
  text-align: center;
}

@media (max-width: 992px) {
  .live-presence-bar {
    margin-top: 0.45rem;
    margin-left: auto;
    margin-right: auto;
    max-width: min(360px, calc(100% - 3.5rem));
    clear: both;
  }

  .main-content > .live-presence-bar,
  .dashboard-main > .live-presence-bar,
  .training-main > .live-presence-bar {
    margin-top: 0.5rem;
    margin-left: auto;
  }
}

.live-presence-bar .lp-users-icon,
.live-presence-bar .lp-total i {
  display: none;
}

.live-presence-bar .lp-main {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.live-presence-bar .lp-main strong {
  color: #e8eef4;
  font-weight: 650;
  font-size: 0.78rem;
}

.live-presence-bar .lp-label {
  color: #8b96a3;
}

.live-presence-bar .lp-sep {
  opacity: 0.35;
}

.live-presence-bar .lp-total {
  color: #8b96a3;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.live-presence-bar .lp-feed,
.live-presence-bar .lp-people,
.live-presence-bar .lp-event {
  display: none;
}

.mode-card {
  position: relative;
}

.mode-live-count {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #9ad4b0;
}

.podium-live {
  margin: 0.35rem 0 0;
  font-size: 0.65rem;
  color: #7d8a96;
}

/* Conversion unlock + paywall (shared look) */
.conv-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #c8a97e 0%, #d8c29d 50%, #c8a97e 100%);
  background-size: 200% 100%;
  color: #1a1a1a !important;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none !important;
  border: 2px solid rgba(200, 169, 126, 0.35);
  box-shadow: 0 6px 20px rgba(200, 169, 126, 0.35);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.conv-cta-btn i {
  font-size: 0.95rem;
  color: inherit;
  margin: 0;
}

.conv-cta-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(200, 169, 126, 0.5);
  color: #1a1a1a !important;
}

.conv-unlock {
  margin: 1.25rem 0 0.5rem;
  padding: 1.25rem 1.15rem;
  border-radius: 12px;
  background: rgba(26, 33, 56, 0.9);
  border: 1px solid rgba(200, 169, 126, 0.28);
  text-align: center;
}

.conv-unlock-title {
  margin: 0 0 0.55rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #c8a97e;
}

.conv-unlock-body {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #c5ced6;
}

.conv-unlock-price {
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
  color: #8b96a3;
}

.conv-unlock-secondary {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: #8b96a3;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.conv-unlock-secondary:hover {
  color: #c8a97e;
}

.conv-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(5px);
  padding: 1rem;
  box-sizing: border-box;
  animation: convFadeIn 0.3s ease-out;
}

.conv-modal-overlay.is-closing {
  animation: convFadeOut 0.2s ease-out forwards;
}

.conv-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 2rem 1.75rem 1.5rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #1a2138 0%, #12182a 100%);
  border: 1px solid rgba(200, 169, 126, 0.25);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  text-align: center;
  overflow: hidden;
}

.conv-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #c8a97e, #d8c29d, #c8a97e);
}

.conv-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: #777;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}

.conv-modal-close:hover {
  color: #c8a97e;
}

.conv-modal-title {
  margin: 0.35rem 0 0.75rem;
  padding-right: 1.5rem;
  font-size: 1.45rem;
  font-weight: 700;
  color: #c8a97e;
}

.conv-modal-body {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: #e0e0e0;
}

.conv-modal-body b {
  color: #d4af37;
  font-weight: 700;
}

.conv-modal-meta {
  margin: 0.75rem 0 1.15rem;
  font-size: 0.88rem;
  color: #9aa5b0;
}

.conv-modal-meta b {
  color: #c8a97e;
}

.conv-modal-trust {
  margin: 0.7rem 0 0;
  font-size: 0.82rem;
  color: #8b96a3;
}

.conv-modal-dismiss {
  margin-top: 1rem;
  background: none;
  border: none;
  color: #666;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.conv-modal-dismiss:hover {
  color: #999;
}

.first-drill-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  margin: 0 0 1.5rem;
  padding: 1.15rem 1.25rem;
  border-radius: 12px;
  background: rgba(26, 33, 56, 0.85);
  border: 1px solid rgba(200, 169, 126, 0.28);
}

.first-drill-strip h2 {
  margin: 0 0 0.25rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #c8a97e;
  background: none;
  -webkit-text-fill-color: unset;
}

.first-drill-strip p {
  margin: 0;
  font-size: 0.9rem;
  color: #a8b2bc;
}

.first-drill-strip .conv-cta-btn {
  width: auto;
  min-width: 180px;
  padding: 0.85rem 1.4rem;
}

@keyframes convFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes convFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@media (max-width: 600px) {
  .first-drill-strip .conv-cta-btn {
    width: 100%;
  }
}

/* Training Icons - Consistent styling */
.sidebar-nav-training a i {
  width: 20px;
  text-align: center;
  font-size: 1.1rem;
}

/* Live Indicator */
.live-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #28a745;
  border-radius: 50%;
  margin-left: 0.5rem;
  animation: pulse 2s infinite;
  box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
  }
}

/* Logout styling */
.sidebar-nav .logout {
  margin-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 0.5rem;
}

.sidebar-nav .logout a {
  color: var(--error-color);
}

.sidebar-nav .logout a:hover {
  background-color: rgba(220, 53, 69, 0.1);
  color: var(--error-color);
}
}