/* --- CORE SYSTEM & ARCADE CONFIG --- */
:root {
    --gold: #ffbe0b;
    --gold-glow: rgba(255, 190, 11, 0.6);
    --gold-light: #ffbe0b;
    --gold-dark: #cc9600;
    --bg: #09090b;
    --text: #ffffff;
    --border: rgba(255, 190, 11, 0.25);
    --card-bg: #18181b;
    --success: #06d6a0;
    --error: #ef476f;
    --warning: #ffd166;
    --font-main: 'Orbitron', 'JetBrainsMono-ExtraBold', sans-serif;
}

* {
    font-family: var(--font-main), sans-serif !important;
    box-sizing: border-box;
    font-weight: var(--font-weight, 400) !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-stroke: var(--text-stroke, 0px);
}

body,
html {
    margin: 0;
    padding: 0;
    height: 100vh;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
}

.btn-random {
    --expanded-width: 190px;
}

.btn-reset-url {
    --expanded-width: 160px;
}

.btn-settings {
    --expanded-width: 185px;
}

.btn-reboot {
    --expanded-width: 150px;
}

.btn-mute {
    --expanded-width: 120px;
    height: 38px !important;
}

.btn-unmute {
    --expanded-width: 140px;
    height: 38px !important;
}

.btn-cloak {
    --expanded-width: 155px;
}

.btn-expand {
    --expanded-width: 180px;
}

.btn-close {
    --expanded-width: 175px;
}

.btn-mini-close {
    --expanded-width: 130px;
    height: 38px !important;
}

.master-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* --- HEADER & CONTROLS LAYOUT --- */
.header {
    padding: 20px 40px;
    background: #0f0f11;
    border-bottom: 4px solid #1c1c21;
    display: flex;
    justify-content: center;
    align-items: center;
}

.controls-area {
    padding: 20px 40px;
    background: rgba(15, 15, 17, 0.6);
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
}

/* --- BLOOKET PRESENCE BADGE MASTER RESET --- */
.live-counter-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--gold) !important;
    box-shadow: 0 5px 0 var(--gold-dark) !important;
    padding: 0 16px;
    height: 44px;
    border-radius: 14px;
    white-space: nowrap;
    /* FIX: Changed from 'width: 240px' to allow expansion while keeping a baseline minimum size */
    min-width: 180px;
    width: auto;
    overflow: hidden;
    margin-left: auto;
}

/* FIX: Removed 'color: #000000 !important' so it doesn't duplicate the text layer against JS styles */
.live-counter-box>span {
    display: inline-flex !important;
    align-items: center !important;
    vertical-align: middle !important;
    height: 100% !important;
}

/* Pulsing dot aligned organically via flex-alignment mechanics */
.pulse-dot {
    width: 10px;
    height: 10px;
    background-color: #000000 !important;
    /* Switched to white to match your blooket style text shadow theme */
    border-radius: 50%;
    flex-shrink: 0;
    animation: livePulse 2s infinite ease-in-out !important;
}

@keyframes livePulse {
    0% {
        transform: scale(0.9);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.15);
        opacity: 1;
    }

    100% {
        transform: scale(0.9);
        opacity: 0.5;
    }
}

#search-input {
    flex: 1;
    min-width: 250px;
    background: #18181b;
    color: #fff;
    border: 3px solid #27272a;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    outline: none;
    transition: transform 0.1s, border-color 0.2s;
}

#search-input:focus {
    border-color: var(--gold);
    transform: scale(1.01);
}

/* --- LOGO ENGINE STYLING --- */
.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.logo-main {
    font-size: 2rem;
    color: #ffffff;
    text-shadow: 0 4px 0 rgba(0, 0, 0, 0.4);
}


.logo-deity-box {
    background: var(--gold);
    color: #000000;
    padding: 4px 12px;
    border-radius: 8px;
    box-shadow: 0 4px 0 var(--gold-dark);
}

.blook-btn .icon-svg {
    background-color: #000000;
    transition: transform 0.2s ease;
}

.blook-btn .btn-label {
    opacity: 0;
    width: 0;
    overflow: hidden;
    margin-left: 0;
    transform: translateX(-10px);
    transition: opacity 0.2s ease, width 0.2s ease, transform 0.2s ease, margin-left 0.2s ease;
}

.blook-btn {
    position: relative;
    top: -3.5px;
}

/* --- THE PREMIUM BLOOK-STYLE 3D BUTTONS --- */
.blook-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Variable width: defaults to 50px if --expanded-width isn't declared */
    width: 50px;
    height: 48px;
    padding: 0;
    border-radius: 14px;
    font-size: 13px;
    cursor: pointer;
    border: none;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    background: var(--gold);
    color: #000000;
    box-shadow: 0 5px 0 var(--gold-dark);
    transition:
        width 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.15),
        padding 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.15),
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

/* Variant Button Bases */
.btn-white {
    background: #ffffff;
    color: #000000;
    box-shadow: 0 5px 0 #d4d4d8;
}

.btn-white:hover {
    background: var(--gold);
    color: #000000;
    box-shadow: 0 5px 0 var(--gold-dark);
}

.btn-white:hover .icon-svg {
    background-color: #000000;
}

.btn-exit {
    background: var(--error) !important;
    color: #ffffff !important;
    box-shadow: 0 5px 0 #b91c1c !important;
}

.btn-exit:hover {
    box-shadow: 0 9px 0 #b91c1c !important;
}

.btn-exit:active,
.btn-exit:hover:active {
    /* Instantly drops the button, matching the gold button mechanics */
    transform: translateY(4px) !important;
    box-shadow: 0 1px 0 transparent !important;
}

/* Mechanical Press Interactions */
.blook-btn:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 transparent;
}

.blook-btn:active,
.blook-btn:hover:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 transparent;
}

/* --- HOVER STATES: STRETCH UP & EXPAND WIDE --- */
.blook-btn:hover {
    width: var(--expanded-width, 190px);
    padding: 0 20px;
    transform: translateY(-4px);
    box-shadow: 0 9px 0 var(--gold-dark);
}

.blook-btn:hover .btn-label {
    opacity: 1;
    width: auto;
    margin-left: 10px;
    transform: translateX(0);
}

.btn-static {
    width: 100% !important;
    padding: 0 20px !important;
}

.btn-static .btn-label {
    opacity: 1 !important;
    width: auto !important;
    margin-left: 10px !important;
    /* Locked-in gap when static */
    transform: translateX(0) !important;
}

:root {
  --gold: #ffd700; /* Fallback if --gold isn't defined elsewhere in Divine */
  --bg-dark: #0f0f11;
  --border-dark: #222226;
}

/* Pinned Divine Footer */
.divine-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--bg-dark);
  color: #ffffff;
  text-align: center;
  padding: 12px 0;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  border-top: 1px solid var(--border-dark);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

/* Contact Link Styling using --gold */
.divine-footer .owner-contact {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.divine-footer .owner-contact:hover {
  opacity: 0.85;
  filter: drop-shadow(0 0 4px var(--gold));
  text-decoration: underline;
}

/* Prevent Divine page content from hiding under fixed footer */
body {
  padding-bottom: 50px;
}

/* --- GRID INTERFACES & GAME CARDS --- */
.grid-container {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 30px;
    align-content: flex-start;
}

.grid-container::-webkit-scrollbar {
    width: 8px;
}

.grid-container::-webkit-scrollbar-thumb {
    background: #27272a;
    border-radius: 10px;
}

.grid-container::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

.game-container {
    /* Adding padding-top to prevent clipping during the hover translation */
    padding-top: 50px !important;
}

.game-card {
    background: var(--card-bg);
    border: 3px solid #27272a;
    border-radius: 18px;
    padding: 24px;
    padding-top: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    position: relative;
    /* Neutral State: matching the standard button thickness */
    box-shadow: 0 5px 0 #121214;
    transform: translateY(0);
    transition:
        transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.15),
        box-shadow 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.15),
        border-color 0.2s ease;
}

.slider-container {
    padding: 10px 0;
    width: 100%;
}

input[type=range] {
    width: 100%;
    cursor: pointer;
    accent-color: var(--gold);
    background: transparent;
}

.weight-label {
    display: flex;
    justify-content: space-between;
    color: var(--gold);
    font-family: var(--font-main);
    font-size: 0.8rem;
    margin-bottom: 5px;
}

/* Track styling */
#font-weight-slider {
    -webkit-appearance: none;
    background: #222;
    /* Dark track */
    height: 6px;
    border-radius: 3px;
    border: 1px solid var(--gold);
}

/* Thumb (the circle) styling */
#font-weight-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
    box-shadow: 0 0 10px var(--gold-glow);
    border: 2px solid #000;
}

.muted-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    /* Comfortable padding for an individual item */
    margin-bottom: 20px;

    border: 3px solid var(--gold);
    border-radius: 18px;
    background: rgba(255, 215, 0, 0.03);
    /* Faded gold bg */

    font-family: 'Orbitron', sans-serif;
    color: #fff;
    font-size: 12px;
}

.c-dropdown {
    position: relative;
    top: -3.5px;
}

/* Update your options viewport container class */
#neon-options,
#card-bg-options,
#card-text-options,
#font-options,
.c-dropdown-menu {
    /* Swap with your exact dropdown panel container selector */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 240px;
    overflow-y: auto;
    overflow-x: hidden;
    /* Ensure it floats safely above your main dashboard components */
    z-index: 1000;
}

.game-card:hover {
    border-color: var(--gold);
    transform: translateY(-12px);
    box-shadow: 0 14px 0 var(--gold-dark), 0 0 20px var(--gold-glow);
}

.game-card:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 transparent;
}

.game-card:active,
.game-card:hover:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 transparent;
}

.game-name {
    font-size: 18px;
    color: var(--text);
    margin-top: 5px;
    line-height: 1.2;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- CUSTOM ARCADE DROPDOWNS --- */
.c-dropdown {
    position: relative;
    /* Configurable variables: Default layout width is 260px if an override isn't stated */
    --dropdown-width: 260px;
    width: var(--dropdown-width);
    margin-bottom: 5px;
}

#rating-dropdown {
    --dropdown-width: 165px;
}

/* --- FULL PANELS WIDTH OVERRIDE --- */
#font-dropdown,
#neon-dropdown,
#text-dropdown,
#cloak-type-dropdown {
    width: 100% !important;
    --dropdown-width: 100% !important;
}

.c-dropdown-selected:hover,
.c-dropdown-option:hover {
    transform: translateY(-4px);
}

.c-dropdown-selected:hover {
    box-shadow: 0 9px 0 var(--gold-dark);
}

.c-dropdown-option:hover {
    background: #3f3f46;
    box-shadow: 0 8px 0 #09090b;
}

.c-dropdown-selected {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 48px;
    padding: 0 20px;
    border-radius: 14px;
    font-size: 13px;
    cursor: pointer;
    border: none;
    user-select: none;
    white-space: nowrap;
    box-sizing: border-box;
    background: var(--gold);
    color: #000000;
    box-shadow: 0 5px 0 var(--gold-dark);
    transition:
        transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.15),
        box-shadow 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.15);
}

.c-dropdown-selected::after {
    content: '▼';
    font-size: 11px;
    color: #000000;
    display: inline-block;
    margin-left: 12px;
    transform-origin: center;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.c-dropdown-selected:active,
.c-dropdown-selected:hover:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 transparent !important;
}

.c-dropdown-option.selected {
    background: var(--gold) !important;
    color: #000000 !important;
    box-shadow: 0 4px 0 var(--gold-dark) !important;
}

.c-dropdown-options {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 100%;
    box-sizing: border-box;
    background: #18181b;
    border: 3px solid #27272a;
    border-radius: 16px;
    padding: 12px;
    z-index: 9999;
    display: none;
    flex-direction: column;
    gap: 12px;
    /* FIXED: Restricts viewport height to exactly 5 options max (44px item + 12px gap) */
    max-height: calc((44px * 5) + (12px * 4) + 24px);
    overflow-y: auto;
    /* Custom arcade scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: var(--gold-dark) #18181b;
}

.c-dropdown.open {
    z-index: 99999 !important;
}

.c-dropdown.open .c-dropdown-selected::after {
    transform: rotate(-180deg);
}

.c-dropdown-options::-webkit-scrollbar {
    width: 6px;
}

.c-dropdown-options::-webkit-scrollbar-track {
    background: #18181b;
    border-radius: 10px;
}

.c-dropdown-options::-webkit-scrollbar-thumb {
    background: var(--gold-dark);
    border-radius: 10px;
}

/* CHANGE THIS: */
.c-dropdown.open .c-dropdown-options {
    display: block !important;
    /* Changed from flex to block to stabilize rendering anchor points */
}

/* ADD THIS (To keep the 12px vertical spacing between your elements since flex gap is gone): */
.c-dropdown-options .c-option {
    margin-bottom: 12px;
}

.c-dropdown-options .c-option:last-child {
    margin-bottom: 0;
}

.c-dropdown-option {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    user-select: none;
    /* Clean dark baseline style split from the main header trigger */
    background: #27272a;
    color: #ffffff;
    box-shadow: 0 4px 0 #121214;
    transition:
        transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.15),
        box-shadow 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.15),
        background-color 0.2s ease;
}

.c-option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 44px;
    padding: 0 16px;
    box-sizing: border-box;
    flex-shrink: 0;
    border-radius: 12px;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    background: #27272a;
    color: #ffffff;
    box-shadow: 0 4px 0 #121214;
    /* Bouncy physical translation transitions */
    transition:
        transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.15),
        box-shadow 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.15),
        background-color 0.2s ease,
        color 0.2s ease;
}

.c-option:hover {
    background: rgba(255, 190, 11, 0.15);
    color: #fff;
}

.c-option.selected {
    background: var(--gold) !important;
    color: #000000 !important;
    box-shadow: 0 4px 0 var(--gold-dark) !important;
    border-radius: 22px !important;
    /* Fully rounds out the option pills */
}

.c-option.shrinking {
    animation: shrink-out 0.2s forwards;
    pointer-events: none;
}

.shrinking {
    animation: shrinkOut 0.2s forwards;
    pointer-events: none;
}

@keyframes shrinkOut {
    to {
        opacity: 0;
        transform: scaleY(0);
        height: 0;
        margin: 0;
        padding: 0;
    }
}

@keyframes shrink-out {
    to {
        transform: scale(0);
        opacity: 0;
        height: 0;
        margin: 0;
        padding: 0;
        border: 0;
    }
}

.c-option.selected .chk-svg {
    background-color: #000000 !important;
}

.chk-svg {
    width: 18px;
    height: 18px;
    background-color: #000000;
    border-radius: 50%;
    /* Rounded sub-indicator asset tracking */
    -webkit-mask-size: 70%;
    mask-size: 70%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    margin-left: auto;
}

/* --- STAR RATING LAYOUTS --- */
.star-rating {
    margin-top: 10px;
    color: #3f3f46;
    font-size: 18px;
}

.star-rating .star {
    margin: 0 2px;
    transition: transform 0.1s, color 0.1s;
    display: inline-block;
}

.star-rating .star:hover {
    transform: scale(1.2);
}

.star-rating .filled {
    color: var(--gold);
    text-shadow: 0 0 8px var(--gold-glow);
}

/* --- THEATER STREAM VIEWPORT --- */
#theater {
    position: fixed;
    inset: 0;
    background: #000000;
    z-index: 8000;
    display: none;
    flex-direction: column;
}

#theater.active {
    display: flex;
}

.theater-head {
    background: #0f0f11;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid #1c1c21;
}

.theater-ops {
    display: flex;
    gap: 12px;
}

.theater-body {
    flex: 1;
    position: relative;
    background: #050505;
}

#game-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}

/* --- STREAM LOADING & SPLASH PROGRESSION --- */
#splash {
    position: fixed;
    inset: 0;
    background: #09090b;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s cubic-bezier(0.7, 0, 0.3, 1);
}

#splash.hidden {
    transform: translateY(-100%);
}

.splash-logo-pos {
    transform: scale(1.4);
    margin-bottom: 40px;
}

.loader-ui {
    position: absolute;
    inset: 0;
    background: #09090b;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

/* Kinetic Arc Progress Bars */
.bar-container {
    width: 320px;
    height: 30px;
    background: #212124;
    border-radius: 20px;
    border: 3px solid #27272a;
    position: relative;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--gold);
    box-shadow: 0 0 10px var(--gold-glow);
    width: 0%;
}

.kinetic-slide {
    position: absolute;
    inset: 0;
    width: 30% !important;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: sweep 1.5s infinite linear;
}

/* --- REGULAR MOBILE STAR SCALE (For Main Filter view) --- */
@media (max-width: 768px) {
    .star-rating .star {
        font-size: 32px !important;
        /* Forces the structural size bigger on mobile viewports */
        padding: 4px 6px;
    }
}

.game-card .icon-svg {
    position: absolute;
    top: 12px;
    left: 14px;
}

.card-dropdown-anchor {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
}

/* --- THE MINI BLOOKET DROPDOWN ENGINE --- */
.mini-blook-drop {
    position: relative;
    display: inline-block;
}

.mini-drop-trigger {
    height: 28px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 10px;
    background: var(--gold) !important;
    color: #000000 !important;
    box-shadow: 0 3px 0 var(--gold-dark) !important;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.mini-arrow {
    font-size: 8px;
    display: inline-block;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

/* Dynamic Hover Action */
.mini-drop-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #121214;
}

/* Mechanical Press Down Sequence */
.mini-drop-trigger:active,
.mini-blook-drop.open .mini-drop-trigger {
    transform: translateY(2px);
    box-shadow: 0 0px 0 transparent !important;
}

.mini-blook-drop.open .mini-arrow {
    transform: rotate(-180deg);
}

/* Sub Options Drop List Placement */
.mini-drop-options {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 100px;
    background: #1c1c1e;
    border: 2px solid #27272a;
    border-radius: 10px;
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 6px;
    z-index: 500;
}

/* Toggle Visibility Hooks */
.mini-blook-drop.open .mini-drop-options {
    display: flex;
}

.mini-opt {
    padding: 6px 10px;
    font-size: 10px;
    color: #a1a1aa;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, color 0.15s;
}

.game-card:has(.mini-blook-drop.open) {
    transform: none !important;
    box-shadow: 0 5px 0 var(--gold-dark) !important;
    z-index: 999999 !important
}

.mini-opt:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

/* Highlight style when displaying matching current assigned ratings */
.mini-opt.active {
    background: var(--gold) !important;
    color: #000000 !important;
}

@media (max-width: 768px) {
    .star-rating {
        display: flex;
        justify-content: center;
        gap: 8px;
        /* Gives space between larger stars to avoid misclicks */
        margin-top: 8px;
        padding: 4px 0;
    }

    .star-rating .star {
        font-size: 26px;
        /* Noticeably scales up the visual size */
        padding: 6px 8px;
        /* Expands the bounding touch area for human fingers */
        cursor: pointer;
        display: inline-block;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
        /* Removes the ugly blue mobile flash box */
    }
}

@keyframes sweep {
    0% {
        transform: translateX(-150%);
    }

    100% {
        transform: translateX(350%);
    }
}

.byte-counter {
    font-size: 15px;
    color: var(--gold);
    opacity: 0.7;
    margin-top: 25px; 
}

/* --- OVERLAYS: CALIBRATION SIDEBAR --- */
#settings-panel {
    position: fixed;
    right: -460px;
    top: 0;
    bottom: 0;
    width: 430px;
    background: #0f0f11;
    border-left: 4px solid #1c1c21;
    z-index: 9000;
    padding: 40px;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
}

#settings-panel.open {
    right: 0;
}

.setting-item {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.setting-label {
    font-size: 15px;
    color: var(--gold);
}

.danger-zone-box {
    margin-top: 60px;
    border: 3px solid var(--error);
    padding: 35px 25px;
    /* Increased top/bottom padding for vertical clearance */
    border-radius: 18px;
    background: rgba(239, 71, 111, 0.03);
    display: flex;
    flex-direction: column;
    gap: 20px;
    /* Gives the stretch-up hover animation breathing room */
}

.danger-zone-label {
    font-size: 14px;
    color: var(--error);
    letter-spacing: 1px;
    text-align: center;
}

.modal-active-overlay {
    pointer-events: none;
}

#system-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 15000;
    pointer-events: auto;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#system-modal.modal-show .modal-content {
    animation: modalPopIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

#system-modal.modal-hide .modal-content {
    animation: modalPopOut 0.2s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
}

.modal-content {
    background: #18181b;
    border: 4px solid #27272a;
    border-radius: 24px;
    width: 100%;
    max-width: 480px;
    padding: 30px;
    box-shadow: 0 12px 0 #09090b;
    animation: modalPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPopIn {
    from {
        transform: scale(0.85) translateY(20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes modalPopOut {
    from {
        transform: scale(1) translateY(0);
        opacity: 1;
    }

    to {
        transform: scale(0.85) translateY(20px);
        opacity: 0;
    }
}

.modal-header {
    font-size: 18px;
    color: var(--gold);
    margin-bottom: 15px;
    text-align: center;
}

.modal-btn-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* Perfectly gaps the SVG from your custom text */
}

.modal-icon {
    display: inline-block;
    width: 18px;
    /* Sized slightly smaller than text height for balance */
    height: 18px;
    background-color: currentColor;
    /* Automatically matches text colors and hover states */
}

#confirm-yes:hover .modal-btn-icon {
    background-color: #fff;
    transform: scale(1.05);
}

#confirm-no:hover .modal-btn-icon {
    background-color: #ff4444;
    /* Alert color fallback or replace with your accent */
    transform: scale(1.05);
}

.icon-check {
    -webkit-mask: url('https://cdn.jsdelivr.net/gh/pixonetwork/galactic-lite-assets/icon/check.svg') no-repeat center / contain;
    mask: url('https://cdn.jsdelivr.net/gh/pixonetwork/galactic-lite-assets/icon/check.svg') no-repeat center / contain;
}

#website-panic-cloak {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2147483647;
    display: none;
    background: #ffffff;
    overflow: hidden;
    transform: translateZ(9999px);
    pointer-events: all;
}

#panic-cloak-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.icon-terminate {
    -webkit-mask: url('https://cdn.jsdelivr.net/gh/pixonetwork/galactic-lite-assets/icon/terminate.svg') no-repeat center / contain;
    mask: url('https://cdn.jsdelivr.net/gh/pixonetwork/galactic-lite-assets/icon/terminate.svg') no-repeat center / contain;
}

.modal-body label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    margin-top: 15px;
    transition: color 0.2s ease;
}

.modal-body label:hover {
    color: #fff !important;
}

.modal-body input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--gold);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    display: inline-grid;
    place-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.modal-body input[type="checkbox"]:checked {
    background: var(--gold);
    box-shadow: 0 0 8px var(--gold-glow);
}

.modal-body input[type="checkbox"]::before {
    content: "";
    width: 12px;
    height: 12px;
    transform: scale(0);
    transition: transform 0.15s ease-in-out;
    background-color: #000;
    /* Dark checkmark inside filled gold box */
    -webkit-mask: url('https://cdn.jsdelivr.net/gh/pixonetwork/galactic-lite-assets/icon/check.svg') no-repeat center;
    mask: url('https://cdn.jsdelivr.net/gh/pixonetwork/galactic-lite-assets/icon/check.svg') no-repeat center;
}

.modal-body input[type="checkbox"]:checked::before {
    transform: scale(1);
}

.modal-body {
    font-size: 13px;
    color: #a1a1aa;
    line-height: 1.6;
    margin-bottom: 30px;
    text-align: center;
}

/* --- ICON ENGINE CONNECTOR --- */
.icon-svg {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: #000000;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    flex-shrink: 0;
}

.btn-exit .icon-svg {
    background-color: #ffffff !important;
}