/* INDEX CORE WEB PORTAL - PLATFORM THEME ATMOSPHERES */

:root {
  --platform-bg: #12101a;
  --platform-card-bg: #151320;
  --platform-border: #1c1a2e;
  --platform-accent: var(--accent-pink);
}

/* Lighter, Crisp PlayStation Light Navy Blue Atmosphere (#162a56) */
body.theme-playstation {
  background-color: #132448 !important;
  --platform-bg: #132448;
  --platform-card-bg: #1a305e;
  --platform-border: #26478a;
  --platform-accent: #38bdf8;
}

body.theme-playstation .leaderboard-header,
body.theme-playstation .portal-settings-sidebar,
body.theme-playstation #detail-sidebar-tracker-card {
  background-color: #1a305e !important;
  border-color: #26478a !important;
}

/* PlayStation Generation Sub-Themes */
body.theme-ps5 {
  background-color: #0f1c3a !important;
  --platform-bg: #0f1c3a;
  --platform-card-bg: #162954;
  --platform-border: #234080;
  --platform-accent: #38bdf8; /* PS5 Electric Cyan/White */
}

body.theme-ps4 {
  background-color: #0b1836 !important;
  --platform-bg: #0b1836;
  --platform-card-bg: #122450;
  --platform-border: #1d397c;
  --platform-accent: #2563eb; /* PS4 Royal Deep Blue */
}

body.theme-ps3 {
  background-color: #14161d !important;
  --platform-bg: #14161d;
  --platform-card-bg: #1f222e;
  --platform-border: #33384a;
  --platform-accent: #f59e0b; /* PS3 Glossy Amber / Red */
}

body.theme-ps2 {
  background-color: #161233 !important;
  --platform-bg: #161233;
  --platform-card-bg: #231d4f;
  --platform-border: #382f7c;
  --platform-accent: #8b5cf6; /* PS2 Electric Indigo / Purple */
}

body.theme-ps1 {
  background-color: #181d26 !important;
  --platform-bg: #181d26;
  --platform-card-bg: #252d3b;
  --platform-border: #3a475c;
  --platform-accent: #10b981; /* PS1 Classic Tri-Color Slate */
}

body.theme-psp, body.theme-psvita {
  background-color: #1c142b !important;
  --platform-bg: #1c142b;
  --platform-card-bg: #2b1f42;
  --platform-border: #443169;
  --platform-accent: #ec4899; /* PSP / PS Vita OLED Pink-Magenta */
}

/* Distinct Xbox Emerald Green Atmosphere */
body.theme-xbox {
  background-color: #062012 !important;
  --platform-bg: #062012;
  --platform-card-bg: #0b341d;
  --platform-border: #155e37;
  --platform-accent: #107c41;
}

body.theme-xbox .leaderboard-header,
body.theme-xbox .portal-settings-sidebar,
body.theme-xbox #detail-sidebar-tracker-card {
  background-color: #0b341d !important;
  border-color: #155e37 !important;
}

/* Distinct Nintendo Ruby Red Atmosphere */
body.theme-nintendo {
  background-color: #260a0d !important;
  --platform-bg: #260a0d;
  --platform-card-bg: #3d1015;
  --platform-border: #631a22;
  --platform-accent: #e60012;
}

body.theme-nintendo .leaderboard-header,
body.theme-nintendo .portal-settings-sidebar,
body.theme-nintendo #detail-sidebar-tracker-card {
  background-color: #3d1015 !important;
  border-color: #631a22 !important;
}

/* Distinct Steam Charcoal & Valve Cyan Atmosphere */
body.theme-steam {
  background-color: #171a21 !important;
  --platform-bg: #171a21;
  --platform-card-bg: #1b2838;
  --platform-border: #2a475e;
  --platform-accent: #66c0f4;
}

body.theme-steam .leaderboard-header,
body.theme-steam .portal-settings-sidebar,
body.theme-steam #detail-sidebar-tracker-card {
  background-color: #1b2838 !important;
  border-color: #2a475e !important;
}

/* Mobile Violet Atmosphere */
body.theme-mobile {
  background-color: #1a0c2e !important;
  --platform-bg: #1a0c2e;
  --platform-card-bg: #2a144a;
  --platform-border: #442177;
  --platform-accent: #a855f7;
}

body.theme-mobile .leaderboard-header,
body.theme-mobile .portal-settings-sidebar,
body.theme-mobile #detail-sidebar-tracker-card {
  background-color: #2a144a !important;
  border-color: #442177 !important;
}

/* Dropdown Sub-Menu Styling - Seamless hover bridge */
.focus-dropdown-wrapper {
  position: relative;
  display: inline-block;
  padding-bottom: 8px; /* Invisible bridge to prevent dropdown from closing */
  margin-bottom: -8px;
}

.focus-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0;
  background: #151320;
  border: 1px solid #232033;
  border-radius: 10px;
  padding: 8px 0;
  min-width: 210px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
  z-index: 1000;
}

.focus-dropdown-wrapper:hover .focus-dropdown-menu,
.focus-dropdown-menu.show {
  display: flex;
  flex-direction: column;
}

.focus-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.focus-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.focus-dropdown-item.active {
  color: #ffffff;
  font-weight: bold;
  background: rgba(255, 255, 255, 0.12);
}
