/* ==========================================================================
   AUROMIND PORTAL - COMPACT, BALANCED CRAZYGAMES-STYLE DESIGN SYSTEM
   Optimized for readability, high density, and clean visual proportions
   ========================================================================== */

:root {
  /* ========================================================================
     THEME 3: ASPIRATION SKY & AZURE (SOOTHING, LIGHT, AND COLORFUL SANCTUARY)
     ======================================================================== */
  --bg-app: #F0F6FF;                    /* Soothing morning sky-mist canvas */
  --bg-sidebar: #E5EEF9;                /* Soft cerulean tinted sidebar */
  --bg-header: rgba(240, 246, 255, 0.92);/* Frosted sky header */
  --bg-card: #FFFFFF;                   /* Cloud white crisp cards */
  --bg-card-hover: #F8FBFF;             /* Luminous light azure hover */
  --bg-surface: #E0EBF7;                /* Subtle interactive surface */
  
  --border-subtle: rgba(2, 132, 199, 0.16);  /* Soft azure hairline border */
  --border-active: #0284C7;                  /* Divine Azure Blue */
  --border-glow: rgba(2, 132, 199, 0.25);
  
  --accent-primary: #0284C7;            /* Divine Azure */
  --accent-gold: #0284C7;               /* Divine Azure for buttons */
  --accent-gold-light: #0284C7;         /* Azure highlight */
  --accent-gold-dark: #0369A1;          /* Deep Azure */
  --accent-emerald: #059669;            /* Jade Emerald Life */
  --accent-cyan: #0284C7;               /* Azure Blue */
  --accent-purple: #7C3AED;             /* Royal Violet */
  
  --text-primary: #0B1E36;              /* Deep midnight navy ink (WCAG AAA contrast) */
  --text-secondary: #415A77;            /* Muted slate blue */
  --text-dim: #778DA9;                  /* Airforce grey */
  
  --sidebar-width: 220px;
  --sidebar-collapsed-width: 68px;
  --header-height: 56px;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-subtle: 0 4px 18px rgba(2, 132, 199, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 12px 32px rgba(2, 132, 199, 0.18), 0 0 16px rgba(56, 189, 248, 0.22);
  
  --transition-fast: 0.15s ease;
  --transition-smooth: 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* SENIOR ACCESSIBILITY MODE */
body.senior-mode {
  --text-primary: #050d18;
  --text-secondary: #1e3a5f;
  --text-dim: #33557a;
  --bg-app: #e8f1fc;
  --bg-card: #ffffff;
  --border-subtle: rgba(2, 132, 199, 0.35);
}
body.senior-mode .btn-open {
  min-height: 44px;
  font-size: 0.96rem;
  font-weight: 800;
}
body.senior-mode .game-usp {
  -webkit-line-clamp: 3;
  font-size: 0.88rem;
}

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

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.app-layout {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* ==========================================================================
   STICKY LEFT SIDEBAR (Compact & Sleek)
   ========================================================================== */
.portal-sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 40;
  transition: width var(--transition-smooth), transform var(--transition-smooth);
}

.sidebar-header {
  height: 64px;
  padding: 0 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
  text-decoration: none;
  color: inherit;
}

.sidebar-logo {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.45));
  flex-shrink: 0;
}

.sidebar-brand-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #D2741C;
  line-height: 1.1;
}

.sidebar-brand-text p {
  font-size: 0.65rem;
  color: #78350F;
  text-transform: none;
  letter-spacing: 0.01em;
  font-weight: 600;
  line-height: 1.25;
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-surface) transparent;
}

.sidebar-scroll::-webkit-scrollbar {
  width: 4px;
}
.sidebar-scroll::-webkit-scrollbar-thumb {
  background: var(--bg-surface);
  border-radius: var(--radius-full);
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: 1px solid transparent;
}

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

.sidebar-nav-item.active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.14), rgba(2, 132, 199, 0.04));
  color: #0284C7;
  border-color: rgba(2, 132, 199, 0.35);
  font-weight: 700;
}

.sidebar-icon {
  font-size: 1rem;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 0.5rem 0.4rem;
}

.sidebar-label {
  font-size: 0.64rem;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.75rem 0.2rem;
}

/* ==========================================================================
   RIGHT MAIN AREA & HEADER
   ========================================================================== */
.portal-main-area {
  flex: 1;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.portal-header {
  height: var(--header-height);
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  gap: 1.25rem;
  z-index: 30;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
}

.menu-toggle-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.header-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.search-input {
  width: 100%;
  height: 38px;
  padding: 0 0.85rem 0 2.5rem;
  background: #FFFFFF;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.04);
}

.search-input:focus {
  outline: none;
  border-color: #0284C7;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18);
}

.search-icon-svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text-dim);
  pointer-events: none;
}

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

.btn-pill-action {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #FFFFFF;
  border: 1.5px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.42rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.04);
}

.btn-pill-action:hover {
  color: #0284C7;
  border-color: rgba(2, 132, 199, 0.4);
  background: #F8FBFF;
}

.btn-pill-action.active {
  background: linear-gradient(135deg, #0284C7, #0369A1);
  color: #FFFFFF;
  border-color: #0284C7;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

.btn-account {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.12), rgba(2, 132, 199, 0.04));
  border: 1.5px solid rgba(2, 132, 199, 0.35);
  color: #0284C7;
  padding: 0.42rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-account:hover {
  background: linear-gradient(135deg, #0284C7, #0369A1);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
}

/* ==========================================================================
   SCROLLABLE DASHBOARD CONTENT
   ========================================================================== */
.portal-content-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.25rem 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-surface) transparent;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.portal-content-scroll::-webkit-scrollbar {
  width: 5px;
}
.portal-content-scroll::-webkit-scrollbar-thumb {
  background: var(--bg-surface);
  border-radius: var(--radius-full);
}

/* ==========================================================================
   SLIM HERO BANNER
   ========================================================================== */
.hero-banner-container {
  width: 100%;
}

.hero-banner {
  background: linear-gradient(135deg, #FFF9F3 0%, #FFF3E6 50%, #FEEBD5 100%);
  border: 1.5px solid rgba(210, 116, 28, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: 0 8px 24px rgba(210, 116, 28, 0.08);
  position: relative;
  overflow: hidden;
}

.hero-banner::after {
  content: '';
  position: absolute;
  right: -5%;
  top: -40%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(210, 116, 28, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  max-width: 720px;
  z-index: 2;
}

.hero-brand-lockup {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.55rem;
}

.hero-brand-title {
  font-size: clamp(1.15rem, 1.8vw, 1.55rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #D2741C;
  line-height: 1.15;
}

.hero-brand-tagline {
  font-size: clamp(1.45rem, 2.3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #4A200B;
  line-height: 1.2;
  margin: 0;
}

.hero-brand-pillars {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #786C65;
  margin-top: 0.15rem;
}

.hero-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(210, 116, 28, 0.12);
  border: 1px solid rgba(210, 116, 28, 0.3);
  color: #D2741C;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.22rem 0.7rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.45rem;
}

.hero-title {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.25;
  margin-bottom: 0.35rem;
  color: #D2741C;
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.48;
  margin-bottom: 0.75rem;
}

.hero-stats-row {
  display: flex;
  gap: 1.4rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 1.15rem;
  font-weight: 800;
  color: #D2741C;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.65rem;
  color: #64748B;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* ==========================================================================
   UNIFORM 4-COLUMN GRIDS ACROSS ALL ROWS
   ========================================================================== */
.section-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #0B1E36;
}

.section-badge-count {
  font-size: 0.72rem;
  color: #0284C7;
  background: #FFFFFF;
  border: 1px solid rgba(2, 132, 199, 0.2);
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(2, 132, 199, 0.06);
}

.games-uniform-grid,
.live-sanctuaries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  width: 100%;
}

/* ==========================================================================
   GAME CARD (Aspiration Sky & Azure Theme)
   ========================================================================== */
.game-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-subtle);
  transition: all var(--transition-smooth);
  position: relative;
  width: 100%;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-active);
  box-shadow: var(--shadow-hover);
}

.card-banner-box {
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 165px;
  max-height: 200px;
  position: relative;
  background: #E2E8F0;
  overflow: hidden;
}

.card-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.35s ease;
}

.game-card:hover .card-banner-img {
  transform: scale(1.05);
}

.banner-gradient-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.35) 0%, transparent 60%);
  pointer-events: none;
}

.card-badges {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  gap: 0.35rem;
  z-index: 5;
}

.pill-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.22rem 0.55rem;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.95);
  color: #0B1E36;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.badge-live-dot {
  background: #059669;
  color: #FFFFFF;
  border: none;
}
.badge-live-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 0 6px #FFFFFF;
}

.badge-upcoming-tag {
  background: #EFF6FF;
  color: #0284C7;
  border: 1px solid rgba(2, 132, 199, 0.3);
}

.badge-feature {
  background: #FFFBEB;
  color: #D97706;
  border: 1px solid rgba(217, 119, 6, 0.3);
}

.card-content {
  padding: 0.95rem 1rem 1.05rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-header-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}

.game-icon-small {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #F0F6FF;
  border: 1.5px solid rgba(2, 132, 199, 0.25);
  padding: 4px;
  object-fit: contain;
  flex-shrink: 0;
}

.card-title-group {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.game-card-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #0B1E36;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-genre-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: #0284C7;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.game-usp {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.48;
  margin-bottom: 1rem;
  min-height: 3.65rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-open {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%);
  color: #FFFFFF;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  min-height: 38px;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
  margin-top: auto;
}

.btn-open:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
  transform: translateY(-1px);
}

.btn-disabled {
  background: #E2E8F0;
  color: #94A3B8;
  cursor: not-allowed;
  border: 1px solid #CBD5E1;
  min-height: 38px;
  box-shadow: none;
  margin-top: auto;
}
.btn-disabled:hover {
  filter: none;
  box-shadow: none;
  transform: none;
}

/* ==========================================================================
   IN-PORTAL GAME THEATER VIEW (SOLUTION A: CONSOLE-STYLE SIDE EDGE TAB)
   ========================================================================== */
body.in-game-mode {
  overflow: hidden !important;
}

body.in-game-mode .portal-header,
body.in-game-mode .portal-sidebar {
  display: none !important;
}

body.in-game-mode .app-layout {
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  overflow: hidden !important;
}

body.in-game-mode .portal-main-area {
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
}

.game-theater-view {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: none; /* activated via JS */
  background: #000000;
  overflow: hidden;
  z-index: 1000;
}

/* SIDE EDGE CONTROLLER (0% Top Overlap & 0% Bottom Truncation) */
.game-edge-controller {
  position: fixed;
  left: 0;
  top: clamp(140px, 35vh, 420px);
  z-index: 1200;
  display: flex;
  align-items: center;
  transform: translateX(-100%); /* content hidden by default */
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.game-edge-controller.open {
  transform: translateX(0);
}

.edge-tab-trigger {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 48px;
  background: rgba(11, 30, 54, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(2, 132, 199, 0.5);
  border-left: none;
  border-radius: 0 10px 10px 0;
  color: #38BDF8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 3px 2px 14px rgba(0, 0, 0, 0.45);
  transition: all var(--transition-fast);
}

.edge-tab-trigger:hover {
  background: rgba(11, 30, 54, 1);
  border-color: #0284C7;
  width: 32px;
}

.edge-tab-trigger:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

/* Enhanced mobile touch target (WCAG 44x44px minimum) */
@media (pointer: coarse), (max-width: 768px) {
  .edge-tab-trigger {
    width: 36px;
    height: 52px;
    touch-action: manipulation;
  }

  .edge-tab-trigger::after {
    content: '';
    position: absolute;
    top: -8px;
    bottom: -8px;
    left: 0;
    right: -14px;
  }
}

.edge-tab-icon {
  font-size: 0.72rem;
  transition: transform 0.25s ease;
}

.game-edge-controller.open .edge-tab-icon {
  transform: rotate(180deg);
}

.edge-drawer-content {
  background: rgba(11, 30, 54, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid rgba(2, 132, 199, 0.35);
  border-left: none;
  border-radius: 0 14px 14px 0;
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
}

.btn-edge-action {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.btn-edge-action:hover {
  background: rgba(2, 132, 199, 0.2);
  color: #38BDF8;
  border-color: #0284C7;
}

.btn-edge-exit {
  background: linear-gradient(135deg, #0284C7, #0369A1);
  color: #FFFFFF;
  border: none;
}

.btn-edge-exit:hover {
  filter: brightness(1.15);
  color: #070a13;
}

/* THEATER IFRAME CONTAINER: TRUE 100% VIEWPORT */
.theater-iframe-container {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  background: #000000;
  box-sizing: border-box;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.theater-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ==========================================================================
   DEDICATED BOTTOM FOOTER
   ========================================================================== */
.portal-bottom-footer {
  margin-top: auto;
  padding-top: 1.8rem;
  border-top: 1.5px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.footer-trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.trust-card {
  background: #FFFFFF;
  border: 1.5px solid rgba(2, 132, 199, 0.16);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.05);
}

.trust-card h4 {
  font-size: 0.88rem;
  color: #0284C7;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.trust-card p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.48;
}

.footer-copyright {
  text-align: center;
  font-size: 0.74rem;
  color: var(--text-dim);
  padding: 0.5rem 0;
}

/* ==========================================================================
   RESPONSIVE QUERIES
   ========================================================================== */
@media (max-width: 960px) {
  :root {
    --sidebar-width: var(--sidebar-collapsed-width);
  }
  .sidebar-brand-text, .sidebar-label, .sidebar-nav-item span:not(.sidebar-icon) {
    display: none;
  }
  .sidebar-header {
    justify-content: center;
    padding: 0;
  }
  .sidebar-nav-item {
    justify-content: center;
    padding: 0.7rem 0;
  }
  .footer-trust-strip {
    grid-template-columns: 1fr;
  }
  /* Tablet Header Pill Iconification (Prevents Wrapping & Squeeze) */
  .btn-pill-action span:not(:first-child) {
    display: none !important;
  }
  .btn-pill-action {
    padding: 0.45rem 0.65rem !important;
    min-width: 38px !important;
    height: 38px !important;
    border-radius: var(--radius-full) !important;
    justify-content: center !important;
  }
  .header-search {
    max-width: 260px !important;
  }
  .portal-header {
    padding: 0 1.25rem !important;
    gap: 0.75rem !important;
  }
}

@media (max-width: 679px) {
  .portal-sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    width: 250px;
  }
  .portal-sidebar.open {
    left: 0;
  }
  .sidebar-brand-text, .sidebar-label, .sidebar-nav-item span:not(.sidebar-icon) {
    display: inline;
  }
  .sidebar-nav-item {
    justify-content: flex-start;
    padding: 0.65rem 0.9rem;
  }
  .menu-toggle-btn {
    display: flex;
  }
  .portal-content-scroll {
    padding: 0.85rem 0.85rem 1.75rem;
  }
  .hero-banner {
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 580px) {
  .games-uniform-grid,
  .live-sanctuaries-grid {
    grid-template-columns: 1fr;
  }
  .game-card {
    max-width: 380px;
    margin: 0 auto;
  }
}

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.open {
  display: flex;
}
.modal-box,
.modal-box-wide,
.modal-box-guide {
  max-height: min(88dvh, 88vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  max-width: 420px;
  width: 100%;
  padding: 1.75rem;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-hover);
}
.modal-close-btn {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.4rem;
  cursor: pointer;
}
.modal-confirm-btn {
  width: 100%;
  background: linear-gradient(135deg, #0284C7, #0369A1);
  color: #FFFFFF;
  padding: 0.65rem;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 800;
  cursor: pointer;
  margin-top: 1.25rem;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

/* WIDE MODAL & SETTINGS COMPONENTS */
.modal-box.modal-box-wide {
  max-width: 520px;
  text-align: left;
}

.modal-header-block {
  text-align: center;
  margin-bottom: 1.25rem;
}

.modal-header-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.6rem;
  display: block;
  filter: drop-shadow(0 0 10px rgba(2, 132, 199, 0.25));
}

.modal-title-main {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.modal-desc-sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.settings-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.95rem;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  gap: 1rem;
}

.settings-row-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.settings-row-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.settings-row-desc {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* TOGGLE SWITCH COMPONENT */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #CBD5E1;
  transition: 0.25s;
  border-radius: 24px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
input:checked + .slider {
  background-color: #0284C7;
}
input:checked + .slider:before {
  transform: translateX(20px);
}

.settings-range-slider {
  width: 120px;
  accent-color: #0284C7;
  cursor: pointer;
}

.btn-settings-action {
  background: #FFFFFF;
  color: #DC2626;
  border: 1px solid rgba(220, 38, 38, 0.3);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-settings-action:hover {
  background: #FEE2E2;
}

/* ABOUT ROADMAP GRID */
.about-roadmap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin: 1.1rem 0;
  text-align: center;
}
.about-roadmap-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.about-roadmap-num {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0284C7;
  line-height: 1.1;
}
.about-roadmap-label {
  font-size: 0.66rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.about-features-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.about-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
  background: var(--bg-surface);
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
}

.about-feature-item strong {
  color: var(--text-primary);
}

/* REDUCED MOTION */
html.reduced-motion *,
html.reduced-motion *::before,
html.reduced-motion *::after {
  animation-duration: 0.001s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001s !important;
}

/* ==========================================================================
   9. SANCTUARY WELCOME GUIDE MODAL (POP-UP & ON-DEMAND)
   ========================================================================== */
.modal-box-guide {
  max-width: 680px;
  text-align: left;
  padding: 1.85rem 2rem;
}

.guide-modal-header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.guide-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #B45309;
  margin-bottom: 0.5rem;
}

.guide-modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}

.guide-modal-lead {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto;
}

.guide-pillars-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.4rem;
}

.guide-pillar-modal-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 0.95rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.guide-pillar-modal-item:hover {
  transform: translateY(-2px);
  border-color: var(--border-active);
}

.guide-pillar-modal-item .pillar-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.guide-pillar-modal-item h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
}

.guide-pillar-modal-item p {
  font-size: 0.76rem;
  line-height: 1.42;
  color: var(--text-secondary);
  margin: 0;
}

.guide-modal-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding-top: 0.25rem;
}

.btn-guide-dismiss-modal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 1.15rem;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-guide-dismiss-modal:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: rgba(2, 132, 199, 0.3);
}

/* SIDEBAR DOCK BADGE */
.sidebar-dock-badge {
  margin-left: auto;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  background: rgba(2, 132, 199, 0.12);
  color: var(--accent-primary);
  border: 1px solid rgba(2, 132, 199, 0.25);
  transition: all 0.2s ease;
}

.sidebar-nav-item.active .sidebar-dock-badge {
  background: var(--accent-primary);
  color: #FFFFFF;
  border-color: var(--accent-primary);
}

/* SENIOR MODE ENHANCEMENTS */
body.senior-mode .guide-modal-title {
  font-size: 1.6rem;
}
body.senior-mode .guide-modal-lead {
  font-size: 1rem;
}
body.senior-mode .guide-pillar-modal-item h4 {
  font-size: 1rem;
}
body.senior-mode .guide-pillar-modal-item p {
  font-size: 0.86rem;
}

/* RESPONSIVE LAYOUT */
@media (max-width: 680px) {
  .modal-box-guide {
    padding: 1.35rem 1.15rem;
  }
  .guide-pillars-modal-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
  .guide-modal-actions {
    flex-direction: column;
    width: 100%;
  }
  .guide-modal-actions .modal-confirm-btn,
  .guide-modal-actions .btn-guide-dismiss-modal {
    width: 100%;
  }
}


/* =========================================================================
   AUROMIND TABLET FULL-PORTRAIT & LANDSCAPE SUITE
   ========================================================================= */

/* 1. Tablet Portrait (600px - 1023px) Header Breathing Room & 2-Col Grid */
@media (orientation: portrait) and (min-width: 600px) and (max-width: 1023px) {
  .portal-header {
    padding: 0.55rem 1.5rem !important;
    gap: 1rem !important;
  }
  .header-search {
    max-width: 320px !important;
  }
  .hero-banner {
    padding: 1.15rem 1.5rem !important;
  }
  .games-uniform-grid,
  .live-sanctuaries-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.15rem !important;
  }
}

/* 2. Tablet Landscape: Compact Hero Ribbon (Games Above the Fold) */
@media (orientation: landscape) and (max-height: 850px) {
  .portal-header {
    height: 48px !important;
    padding: 0.25rem 1.5rem !important;
  }
  .header-search {
    max-width: 280px !important;
  }
  .hero-banner {
    padding: 0.65rem 1.25rem !important;
    margin-bottom: 0.75rem !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  .hero-title,
  .hero-brand-tagline {
    font-size: 1.25rem !important;
    margin: 0 0 0.15rem 0 !important;
  }
  .hero-brand-title {
    font-size: 0.95rem !important;
  }
  .hero-brand-pillars {
    font-size: 0.65rem !important;
  }
  .hero-desc {
    font-size: 0.8rem !important;
    margin: 0 !important;
    line-height: 1.35 !important;
  }
  .hero-stats-row {
    margin-top: 0 !important;
    gap: 0.6rem !important;
  }
  .games-uniform-grid,
  .live-sanctuaries-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important;
    gap: 0.85rem !important;
  }
}

/* ==========================================================================
   10. PLAYER FEEDBACK MODAL & CONTROLS
   ========================================================================== */
.modal-box-feedback {
  max-width: 580px;
  text-align: left;
  padding: 1.75rem 2rem;
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.feedback-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.feedback-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.required-star {
  color: #DC2626;
  font-size: 0.85rem;
}

.optional-tag {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-dim);
}

.sentiment-chips-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.sentiment-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.6rem 0.4rem;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.sentiment-chip span:first-child {
  font-size: 1.25rem;
  line-height: 1;
}

.sentiment-chip:hover {
  border-color: var(--border-active);
  transform: translateY(-1px);
  color: var(--text-primary);
}

.sentiment-chip.active {
  background: #FFFFFF;
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.16);
  font-weight: 700;
}

.feedback-select,
.feedback-input,
.feedback-textarea {
  width: 100%;
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  color: var(--text-primary);
  background: #FFFFFF;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.feedback-select:focus,
.feedback-input:focus,
.feedback-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.feedback-textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.45;
}

.feedback-status-msg {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
}

.feedback-status-msg.success {
  background: rgba(5, 150, 105, 0.12);
  color: #047857;
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.feedback-status-msg.error {
  background: rgba(220, 38, 38, 0.12);
  color: #B91C1C;
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.feedback-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.25rem;
}

.feedback-actions .modal-confirm-btn {
  width: 100%;
}

/* SENIOR MODE */
body.senior-mode .feedback-label {
  font-size: 0.95rem;
}
body.senior-mode .feedback-select,
body.senior-mode .feedback-input,
body.senior-mode .feedback-textarea {
  font-size: 1rem;
  padding: 0.8rem 1rem;
}
body.senior-mode .sentiment-chip {
  padding: 0.8rem 0.5rem;
  font-size: 0.85rem;
}

/* RESPONSIVE */
@media (max-width: 680px) {
  .modal-box-feedback {
    padding: 1.35rem 1.15rem;
  }
  .sentiment-chips-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   ANALYTICS CONSENT BANNER (January 1 Release)
   ========================================================================== */
.analytics-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
  padding: 16px 24px;
  animation: consentBannerSlideUp 0.35s ease-out;
}

@keyframes consentBannerSlideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.consent-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.consent-banner-text {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1 1 500px;
  color: #cbd5e1;
  font-size: 0.88rem;
  line-height: 1.45;
}

.consent-banner-text strong {
  color: #f8fafc;
  display: block;
  margin-bottom: 2px;
  font-size: 0.95rem;
}

.consent-banner-text p {
  margin: 0;
  opacity: 0.85;
}

.consent-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}

.consent-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.consent-btn {
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
}

.consent-btn-accept {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.consent-btn-accept:hover {
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
  transform: translateY(-1px);
}

.consent-btn-decline {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.consent-btn-decline:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.consent-link-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  text-decoration: underline;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 6px 8px;
  font-family: inherit;
}

.consent-link-btn:hover {
  color: #f1f5f9;
}

@media (max-width: 768px) {
  .consent-banner-content {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .consent-banner-actions {
    justify-content: flex-end;
  }
}

/* ==========================================================================
   AMBER STORAGE WARNING BANNER & BACKUP EXPORT (TASK-ID-03)
   ========================================================================== */
.amber-storage-banner {
  background: #fef3c7;
  border-bottom: 1.5px solid #f59e0b;
  color: #92400e;
  padding: 10px 16px;
  font-size: 0.875rem;
  font-family: inherit;
  z-index: 99999;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.amber-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.amber-banner-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.amber-banner-text {
  flex: 1 1 auto;
  font-weight: 500;
  line-height: 1.4;
}

.amber-banner-btn {
  background: #f59e0b;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.amber-banner-btn:hover {
  background: #d97706;
}

.amber-banner-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

