/* 
           ========================================
           DESIGN SYSTEM & VARIABLES
           ========================================
        */
:root {
    /* Colors */
    --gdf-blue: #032858;
    --gdf-gold: #f9d783;
    --gdf-white: #ffffff;
    --overlay-dark: rgba(3, 40, 88, 0.95);
    --overlay-mid: rgba(3, 40, 88, 0.7);
    --overlay-clear: rgba(3, 40, 88, 0);
    /* Animation Physics (Controlled by JS) */
    --gust-impact: 1;
    --gust-speed: 1;

    /* Z-Indices */
    --z-particles-back: 5;
    --z-bg: 10;
    --z-particles-mid: 15;
    --z-content: 100;
    --z-particles-front: 200;
    --z-debug: 9999;

    /* Host Controls Optimized for 1080p TV */
    --host-text-size: 1.1;
    --host-max-width: 1400px;
    --inset-v: 60px;
    --inset-h: 80px;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--gdf-blue);
    font-family: 'Montserrat', system-ui, sans-serif;
    color: var(--gdf-white);
    -webkit-font-smoothing: antialiased;
    zoom: 109%;
}

/* Typography Utilities */
.ff-cin-dec {
    font-family: 'Cinzel Decorative', Georgia, serif;
}

.ff-cin {
    font-family: 'Cinzel', Georgia, serif;
}

.ff-mont {
    font-family: 'Montserrat', system-ui, sans-serif;
}

/* 
           ========================================
           BACKGROUND & SWAY LAYERS
           ========================================
        */
.floral-bg {
    position: absolute;
    top: -3%;
    left: -3%;
    right: -3%;
    bottom: -3%;
    background: url('assets/images/flower_border_transparent.svg') center top / cover no-repeat;
    opacity: 0.95;
    z-index: var(--z-bg);
    transition: opacity 0.5s ease;
}

.sway-layer {
    position: absolute;
    z-index: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform-origin: center;
    will-change: transform;
    opacity: 0.85;
    pointer-events: none;
}

/* Specific Sway Positions */
.sway-top-left {
    top: -3%;
    left: 0%;
    width: 18vw;
    height: 18vh;
    min-width: 130px;
    min-height: 130px;
    background-image: url('assets/images/pink-blooms-1.png');
    --static-transform: scaleY(-1) rotate(270deg);
    transform-origin: left top;
    animation: sway-1 calc(12s / var(--gust-speed)) ease-in-out infinite alternate;
}

.sway-top-right {
    top: -2%;
    right: -2%;
    width: 15vw;
    height: 15vh;
    min-width: 120px;
    min-height: 120px;
    background-image: url('assets/images/pink-blooms-with-stem.png');
    --static-transform: rotate(0deg);
    transform-origin: right top;
    animation: sway-2 calc(10s / var(--gust-speed)) ease-in-out infinite alternate;
}

.sway-bottom-left {
    bottom: -1%;
    left: -5%;
    width: 20vw;
    height: 20vh;
    min-width: 150px;
    min-height: 150px;
    transform-origin: left bottom;
    animation: sway-3 calc(14s / var(--gust-speed)) ease-in-out infinite alternate;
}

.sway-bottom-left::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background-image: url('assets/images/leafy-stem.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform: rotate(166deg);
    transform-origin: center;
}

.sway-bottom-right {
    bottom: -2%;
    right: -5%;
    width: 22vw;
    height: 22vh;
    min-width: 160px;
    min-height: 160px;
    background-image: url('assets/images/pink-blooms.png');
    --static-transform: rotate(0deg);
    transform-origin: right bottom;
    animation: sway-4 calc(15s / var(--gust-speed)) ease-in-out infinite alternate;
}

.sway-top-1,
.sway-top-2,
.sway-top-3 {
    top: -2%;
    width: 20vw;
    height: 20vh;
    min-width: 160px;
    min-height: 160px;
    background-image: url('assets/images/pink-blooms-with-stem.png');
    transform-origin: top center;
    --static-transform: rotate(0deg);
}

.sway-top-1 {
    left: 25%;
    animation: sway-top calc(11s / var(--gust-speed)) ease-in-out infinite alternate;
}

.sway-top-2 {
    left: 50%;
    transform: translateX(-50%);
    animation: sway-top calc(13s / var(--gust-speed)) ease-in-out infinite alternate-reverse;
}

.sway-top-3 {
    left: 75%;
    animation: sway-top calc(12s / var(--gust-speed)) ease-in-out infinite alternate;
}

.sway-left-side {
    top: 65%;
    left: -6%;
    transform: translateY(-50%);
    width: 15vw;
    height: 15vh;
    min-width: 153px;
    min-height: 153px;
    background-image: url('assets/images/pink-blooms-2.png');
    transform-origin: left center;
    --static-transform: rotate(0deg);
    animation: sway-side calc(14s / var(--gust-speed)) ease-in-out infinite alternate;
}

.sway-right-side {
    top: 57%;
    right: -5%;
    transform: translateY(-50%);
    width: 15vw;
    height: 15vh;
    min-width: 120px;
    min-height: 120px;
    background-image: url('assets/images/leafy-stem.png');
    transform-origin: right center;
    animation: sway-side calc(12s / var(--gust-speed)) ease-in-out infinite alternate-reverse;
}

/* 
           ========================================
           PARTICLE SYSTEMS
           ========================================
        */
.particle-layer {
    position: absolute;
    top: 0;
    left: -10%;
    width: 120%;
    height: 100%;
    pointer-events: none;
    contain: layout style;
}

#particles-back {
    z-index: var(--z-particles-back);
}

#particles-front {
    z-index: var(--z-particles-front);
}

#particles-mid {
    z-index: var(--z-particles-mid);
}

.petal {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    opacity: 0.85;
    will-change: transform;
}

.petal.is-blurred {
    filter: blur(2px);
    opacity: 0.6;
}

/* 
           ========================================
           CONTENT WRAPPER & COMPONENTS
           ========================================
        */
.content-wrapper {
    position: relative;
    z-index: var(--z-content);
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: var(--inset-v) var(--inset-h);
    /* Controlled by JS sliders */
    box-sizing: border-box;
    background: radial-gradient(ellipse at center, var(--overlay-dark), var(--overlay-mid) 39.92%, var(--overlay-clear) 77.73%);
    transition: opacity 0.5s ease;
    overflow: hidden;
}

body:not(.is-sliding) .content-wrapper {
    transition: opacity 0.5s ease, padding 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Performance: Disable transitions and expensive filters while sliding */
body.is-sliding * {
    transition: none !important;
}

body.is-sliding #debug-panel {
    backdrop-filter: none !important;
    background: rgba(24, 38, 56, 0.95); /* Solid fallback for performance */
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* Spacers will handle the centering */
    width: 100%;
    max-width: 1400px;
}

body:not(.is-sliding) .main-content {
    transition: padding-top 0.8s ease;
}

/* Biased Spring System for dynamic vertical placement */
.main-content::before {
    content: '';
    flex: 1;
    /* Top spring */
}

.main-content::after {
    content: '';
    flex: 2.5;
    /* Bottom spring is stronger, pushing content UP */
}



/* Hide primary UI elements while preserving overlays like QR codes */
.ui-hidden .gdf-logo-banner,
.ui-hidden .event-footer,
.ui-hidden .hosts-container {
    opacity: 0;
    pointer-events: none;
}

/* Banner Styling */
.gdf-logo-banner {
    position: relative;
    z-index: var(--z-logo);
    width: 100%;
    max-width: 380px;
    height: 85px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gdf-white);
    clip-path: polygon(0 0, 100% 0, calc(100% - 30px) 50%, 100% 100%, 0 100%, 30px 50%);
    padding: 0 25px;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.5));
    margin-bottom: 20px;
    flex-shrink: 0;
}

.gdf-logo-banner img {
    width: 85%;
    height: 100%;
    object-fit: contain;
}

/* Hosts List */
.hosts-container {
    --host-text-size: 1.1;
    --host-max-width: 1400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

@media (min-width: 1400px) {
    .hosts-container {
        transform: translateY(67px) scale(1.3);
    }
}

@media (min-width: 1400px) {
    .title-hidden .hosts-container {
        transform: translateY(60px) scale(1.1);
    }
}

/* Use this if you want it to apply ONLY when the title is the ONLY thing hidden: */
/* .title-hidden:not(.logo-hidden):not(.date-hidden):not(.host-hidden) .hosts-container { ... } */

.hosts-title {
    position: relative;
    z-index: var(--z-hosts);
    color: var(--gdf-gold);
    font-size: calc(2.2rem * var(--host-text-size));
    letter-spacing: 4px;
    margin-top: 0;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-weight: 600;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

.hosts-list {
    position: relative;
    z-index: var(--z-hosts);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px 60px;
    /* Slightly wider gap for TV readability */
    max-width: var(--host-max-width);
    margin-bottom: 0;
    /* Handled by spacers now */
    padding: 0 40px;
    pointer-events: none;

}

.hosts-list span {
    font-size: calc(1.5rem * var(--host-text-size));
    font-weight: 600;
    white-space: nowrap;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.93);

}

/* Footer Info */
.event-footer {
    position: relative;
    z-index: var(--z-footer);
    text-align: center;
    width: 100%;
    flex-shrink: 0;
    pointer-events: none;
}


.gdf-annual {
    font-size: 1.6rem;
    letter-spacing: 6px;
    margin-bottom: -5px;
    opacity: 0.95;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

.gdf-spring-soiree {
    font-size: 5.5rem;
    color: var(--gdf-gold);
    line-height: 1;
    margin: 5px 0 0;
    text-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.gdf-fundraiser {
    font-size: 1.8rem;
    letter-spacing: 8px;
    margin-bottom: 0.5rem;
    margin-top: -8px;
    opacity: 0.95;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

.gdf-date-time {
    font-size: 1.3rem;
    letter-spacing: 3px;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    /* Define base for transition */
    max-height: 100px;
    margin-top: 5px;
    opacity: 1;
}

.gdf-annual,
.gdf-spring-soiree,
.gdf-fundraiser {
    max-height: 300px;
    opacity: 1;
}

/* 
           ========================================
           TRANSITIONS & DYNAMIC STATES
           ========================================
        */
.gdf-logo-banner,
.event-footer {
    opacity: 1; /* base state */
}

body:not(.is-sliding) .gdf-logo-banner,
body:not(.is-sliding) .event-footer {
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        margin 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        padding 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hosts-container,
.hosts-title,
.hosts-list,
.hosts-list span {
    will-change: transform, font-size;
}

body:not(.is-sliding) .hosts-container,
body:not(.is-sliding) .hosts-title,
body:not(.is-sliding) .hosts-list,
body:not(.is-sliding) .hosts-list span {
    transition: font-size 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        margin 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.gdf-annual,
.gdf-spring-soiree,
.gdf-fundraiser,
.gdf-date-time {
    will-change: transform, opacity;
}

body:not(.is-sliding) .gdf-annual,
body:not(.is-sliding) .gdf-spring-soiree,
body:not(.is-sliding) .gdf-fundraiser,
body:not(.is-sliding) .gdf-date-time {
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        margin 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hide Date State */
.date-hidden .gdf-date-time {
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    max-height: 0;
    margin: 0;
    pointer-events: none;
    overflow: hidden;
}

.date-hidden .gdf-fundraiser {
    margin-bottom: 60px;
}

/* Lift the bottom slightly less */
.date-hidden .gdf-logo-banner {
    transform: translateY(5vh) scale(1.1);
}

.date-hidden .hosts-container {
    transform: translateY(5.7vh) scale(1);
}

/* More space when footer is smaller */
.date-hidden .hosts-list span {
    font-size: calc(1.7rem * var(--host-text-size));
}

.date-hidden .event-footer {
    transform: translateY(9.9vh) scale(1.1);
}

/* Hide Title State */
.title-hidden .gdf-annual,
.title-hidden .gdf-spring-soiree,
.title-hidden .gdf-fundraiser {
    opacity: 0;
    transform: scale(0.8);
    max-height: 0;
    margin: 0;
    pointer-events: none;
    overflow: hidden;
}

.title-hidden .gdf-logo-banner {
    transform: scale(1.2);
}

.title-hidden .hosts-container {
    transform: translateY(5vh) scale(1.1)
}

.title-hidden .hosts-list span {
    font-size: calc(1.9rem * var(--host-text-size));
}

/* Hide Logo State */
.logo-hidden .gdf-logo-banner {
    opacity: 0;
    transform: scale(0.8) translateY(-40px);
    max-height: 0;
    margin-bottom: 0;
    padding: 0;
    pointer-events: none;
    overflow: hidden;
}

.logo-hidden .hosts-title {
    font-size: calc(2.8rem * var(--host-text-size));
}

.logo-hidden .main-content {
    padding-top: 40px;
}

/* Hide Host State */
.host-hidden .hosts-container {
    opacity: 0;
    transform: scale(0.8);
    max-height: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
    overflow: hidden;
}

.host-hidden .event-footer {
    transform: translateY(-22vh) scale(2.1);
}

.host-hidden .gdf-logo-banner {
    transform: translateY(7vh) scale(2);
}

/* Combined States */
.host-hidden.date-hidden .event-footer {
    transform: translateY(-16vh) scale(2.1);
}

.host-hidden.date-hidden .gdf-logo-banner {
    transform: translateY(7vh) scale(2);
}

.date-hidden.title-hidden .gdf-logo-banner {
    transform: translateY(15rem)scale(2.4);
}

.date-hidden.title-hidden .hosts-list {
    margin-bottom: 0;
}

/* Center everything if no footer at all */
.date-hidden.title-hidden .hosts-list span {
    font-size: calc(2.2rem * var(--host-text-size));
}

.logo-hidden.date-hidden .gdf-fundraiser {
    margin-bottom: 70px;
}

.logo-hidden.date-hidden .hosts-list span {
    font-size: calc(2rem * var(--host-text-size));
}

.logo-hidden.title-hidden .hosts-list span {
    font-size: calc(2.2rem * var(--host-text-size));
}

.logo-hidden.date-hidden.title-hidden .hosts-list span {
    font-size: calc(2.6rem * var(--host-text-size));
}

/* Specific lift for clean state */
.logo-hidden.date-hidden.title-hidden .hosts-list {
    margin-bottom: 10vh;
}

/* QR Codes */
.qr-code-container {
    position: absolute;
    bottom: 40px;
    width: 180px;
    height: 180px;
    background: white;
    padding: 12px;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    z-index: var(--z-content);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-code-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-left {
    left: 40px;
}

.qr-right {
    right: 40px;
}

.qr-hidden {
    opacity: 0;
    transform: translateY(40px) scale(0.8);
    pointer-events: none;
}

/* Adjustments when QR codes are visible on small screens */
@media (max-width: 1400px) {
    .qr-code-container {
        width: 140px;
        height: 140px;
        bottom: 20px;
    }

    .qr-left {
        left: 20px;
    }

    .qr-right {
        right: 20px;
    }
}


/* Disabled Control Styling */
.is-hidden {
    display: none !important;
}

.check-control.disabled {
    opacity: 0.5;
    pointer-events: none;
}


/* 
           ========================================
           DEBUG PANEL & CONTROLS
           ========================================
        */
#debug-panel {
    transform: scale(0.85);
    transform-origin: top right;
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(36, 51, 71, 0.85);
    /* Solid GDF Blue */
    color: #fff;
    padding: 16px;
    border-radius: 16px;
    z-index: var(--z-debug);
    width: 340px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(249, 215, 131, 0.3);
    /* Gold border for visibility */
    backdrop-filter: blur(20px);
    transition: backdrop-filter 0.3s ease, transform 0.3s ease;
}

#debug-panel.is-visible {
    display: block;
}

.debug-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

#debug-panel h3 {
    margin: 0 0 10px;
    font-family: 'Cinzel', serif;
    color: var(--gdf-gold);
    font-size: 1.05rem;
    line-height: 1;
    margin-bottom: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

#debug-panel .stat {
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
}

#debug-panel .stat span {
    color: var(--gdf-gold);
    font-weight: 700;
}

#debug-panel .main-stats {
    display: flex;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-bottom: 5px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#debug-panel .stat-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    flex: 1 1 0;
    min-width: 0;
}

#debug-panel .stat-label {
    font-size: 0.3rem;
    text-transform: uppercase;
    /* letter-spacing: 1px; */
    opacity: 0.8;
    margin-bottom: 4px;
    font-weight: 600;
}

#debug-panel .stat-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #d1d1d1bf;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#debug-panel .stat-unit {
    font-size: 0.6rem;
    opacity: 0.7;
}

#debug-panel .stat--hidden {
    display: none;
}

#debug-panel .fullscreen-only {
    display: none;
}

/* FPS */
.fps-good {
    color: #22c55e;
}

.fps-warn {
    color: #f59e0b;
}

.fps-bad {
    color: #ef4444;
}

/* Sleep */
.stat-value.sleep-good {
    color: #22c55e !important;
}

.stat-value.sleep-bad {
    color: #ef4444 !important;
}

/* Fullscreen inactive */
.is-dimmed {
    color: rgba(255, 255, 255, 0.4);
}

body.is-fullscreen #debug-panel .fullscreen-only {
    display: block;
}

#debug-panel .control {
    margin-top: 8px;
}

#debug-panel label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
    font-size: 0.85rem;
    font-weight: 600;
}

#debug-panel input[type="range"] {
    width: 100%;
    accent-color: var(--gdf-gold);
    height: 10px;
    /* Thicker track for TV visibility */
    background: rgba(255, 255, 255, 0.2);
    /* Light track */
    border-radius: 5px;
    cursor: pointer;
    margin-top: 8px;
}

#debug-panel .btn-group {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

#debug-panel .btn-group--spaced {
    margin-top: 15px;
}

#debug-panel button,
#debug-panel .button {
    flex: 1;
    background: #222;
    color: white;
    border: 1px solid #555;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
}

#debug-panel button:hover,
#debug-panel .button:hover {
    background: #333;
}

#debug-panel button.active,
#debug-panel .button.active {
    background: var(--gdf-gold);
    color: var(--gdf-blue);
    border-color: var(--gdf-gold);
}

#debug-panel .control-row {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

#debug-panel .control-row .control {
    flex: 1;
    margin-top: 0;
}

#debug-panel .check-control {
    display: flex;
    justify-content: flex-start;
    /* Ensure labels are adjacent to checkboxes */
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    margin-top: 6px;
    cursor: pointer;
}

#debug-panel .check-control--indented {
    padding-left: 20px;
}

#debug-panel input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--gdf-gold);
    cursor: pointer;
}

/* Custom Cool Toggle */
.cool-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    color: #fff;
    user-select: none;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.cool-toggle--compact {
    margin: 0;
    flex-shrink: 0;
}

.cool-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.cool-toggle:active {
    transform: scale(0.98);
}

.toggle-switch {
    position: relative;
    width: 38px;
    height: 20px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch .slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: #888;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked+.slider {
    background-color: rgba(249, 215, 131, 0.2);
    border-color: rgba(249, 215, 131, 0.5);
}

.toggle-switch input:checked+.slider:before {
    transform: translateX(18px);
    background-color: var(--gdf-gold);
    box-shadow: 0 0 12px var(--gdf-gold);
}

.toggle-label {
    flex: 1;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.9);
}

#wake-lock-status {
    font-size: 0.55rem;
    color: var(--gdf-gold);
    opacity: 0.6;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    transition: opacity 0.3s;
}

.wake-lock-status-inline {
    margin-left: 4px;
}

.cool-toggle:has(input:checked) #wake-lock-status {
    opacity: 1;
}

/* Keyboard Focus Styling */
.keyboard-focused {
    outline: 2px solid var(--gdf-gold) !important;
    outline-offset: 4px;
    box-shadow: 0 0 15px var(--gdf-gold);
    z-index: 10;
}

#debug-panel .cool-toggle.keyboard-focused {
    background: rgba(249, 215, 131, 0.1) !important;
    border-color: var(--gdf-gold) !important;
    outline: none !important;
    /* Use border and bg instead of outline for cleaner look */
    box-shadow: 0 0 15px rgba(249, 215, 131, 0.2);
}

#debug-panel input[type="range"].keyboard-focused {
    background: rgba(212, 175, 55, 0.3) !important;
}

#debug-panel button.keyboard-focused {
    background: #444 !important;
    border-color: var(--gdf-gold) !important;
}

#debug-panel .check-control.keyboard-focused {
    background: rgba(212, 175, 55, 0.1);
    border-radius: 4px;
    outline-offset: 2px;
}

details.advanced-controls summary.keyboard-focused {
    background: rgba(249, 215, 131, 0.15) !important;
    border-color: var(--gdf-gold) !important;
    box-shadow: 0 0 15px rgba(249, 215, 131, 0.2);
    color: #fff;
}

/* Advanced Section Styling */
details.advanced-controls {
    margin-top: 5px;
    padding-top: 5px;
}

details.advanced-controls summary {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gdf-gold);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    outline: none;
}

details.advanced-controls summary::-webkit-details-marker {
    display: none;
}

details.advanced-controls summary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

details.advanced-controls summary::after {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 2px solid var(--gdf-gold);
    border-bottom: 2px solid var(--gdf-gold);
    transform: rotate(45deg);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-right: 4px;
    margin-top: -2px;
}

.panel-section {
    margin-top: 15px;
    /* border-top: 1px solid rgba(255,255,255,0.1); */
    /* padding-top: 15px; */
}

.panel-section--tight {
    padding-top: 10px;
}

.button--warning {
    background: rgba(255, 100, 100, 0.1) !important;
    border-color: rgba(255, 100, 100, 0.3) !important;
    color: #ff9999 !important;
}

.button--primary {
    background: rgba(249, 215, 131, 0.1) !important;
    border-color: var(--gdf-gold) !important;
    color: var(--gdf-gold) !important;
    font-weight: 600;
}

.button--secondary {
    background: #444 !important;
    border: none !important;
}

.button--solid-gold {
    background: var(--gdf-gold) !important;
    color: var(--gdf-blue) !important;
    border: none !important;
}

.button--full {
    width: 100%;
    padding: 10px !important;
    border-radius: 8px !important;
}

.status-note {
    margin-top: 10px;
    font-size: 9px;
    color: #666;
    text-align: center;
}

.add-host-form {
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(249, 215, 131, 0.2);
}

#debug-panel.is-adding-host details.advanced-controls {
    display: none;
}

#debug-panel.is-adding-host #host-management-section {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.form-label {
    display: block !important;
    margin-bottom: 8px !important;
    font-size: 0.7rem !important;
    color: var(--gdf-gold) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.text-input {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 12px;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 6px;
    background: #111;
    color: #fff;
    font-family: 'Montserrat', system-ui, sans-serif;
}

.added-hosts-list {
    margin-top: 10px;
    font-size: 0.8rem;
}

.added-hosts-title {
    margin-bottom: 5px;
    font-size: 0.7rem;
    text-transform: uppercase;
    opacity: 0.6;
}

.added-host-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
}

.added-host-name {
    overflow: hidden;
    margin-right: 15px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wake-lock-video {
    position: fixed;
    top: -10px;
    left: -10px;
    width: 1px;
    height: 1px;
    opacity: 0.01;
    pointer-events: none;
}

details[open].advanced-controls summary {
    background: rgba(249, 215, 131, 0.1);
    border-color: rgba(249, 215, 131, 0.3);
    margin-bottom: 12px;
    color: #fff;
}

details[open].advanced-controls summary::after {
    transform: rotate(-135deg);
    margin-top: 4px;
}

/* Hide host-management controls that compete with the appearance editor */
details[open].advanced-controls~div button#btn-show-add-host,
details[open].advanced-controls~div #added-hosts-list {
    display: none;
}

.btn-remove-host {
    background: rgba(255, 107, 107, 0.15);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: #ff8e8e;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    font-family: 'Montserrat', sans-serif;
}

.btn-remove-host:hover,
.btn-remove-host.keyboard-focused {
    background: rgba(255, 107, 107, 0.3);
    border-color: #ff6b6b;
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}

/* Pause States */
.paused .petal,
.paused .sway-layer,
.paused .floral-bg {
    animation-play-state: paused !important;
    transition: none !important;
}

/* 
           ========================================
           ANIMATION KEYFRAMES (SWAY)
           ========================================
        */
@keyframes sway-side {
    0% {
        transform: translateY(-50%) var(--static-transform) rotate(-3deg) scale(1);
    }

    100% {
        transform: translateY(-50%) var(--static-transform) rotate(calc(4deg * var(--gust-impact))) scale(1.03);
    }
}

@keyframes sway-top {
    0% {
        transform: var(--static-transform) rotate(-2deg) scale(1);
    }

    100% {
        transform: var(--static-transform) rotate(calc(3deg * var(--gust-impact))) scale(1.02);
    }
}

@keyframes sway-1 {
    0% {
        transform: var(--static-transform) rotate(0deg) scale(1);
    }

    100% {
        transform: var(--static-transform) rotate(calc(4deg * var(--gust-impact))) scale(1.05);
    }
}

@keyframes sway-2 {
    0% {
        transform: var(--static-transform) rotate(0deg) scale(1);
    }

    100% {
        transform: var(--static-transform) rotate(calc(-5deg * var(--gust-impact))) scale(1.05);
    }
}

@keyframes sway-3 {
    0% {
        transform: rotate(0deg) scale(1);
    }

    100% {
        transform: rotate(calc(5deg * var(--gust-impact))) scale(1.03);
    }
}

@keyframes sway-4 {
    0% {
        transform: var(--static-transform) rotate(0deg) scale(1);
    }

    100% {
        transform: var(--static-transform) rotate(calc(-4deg * var(--gust-impact))) scale(1.04);
    }
}

/* 
           ========================================
           RESPONSIVE BREAKPOINTS
           ========================================
        */
@media (max-width: 1200px) {
    .hosts-list span {
        font-size: calc(1.3rem * var(--host-text-size));
    }

    .gdf-spring-soiree {
        font-size: 4.5rem;
    }
}

@media (max-width: 900px) {
    .hosts-list span {
        font-size: calc(1.1rem * var(--host-text-size));
    }

    .gdf-spring-soiree {
        font-size: 3.2rem;
    }

    .hosts-title {
        font-size: calc(1.6rem * var(--host-text-size));
    }

    .gdf-logo-banner {
        max-width: 280px;
        height: 65px;
    }

    .hosts-list {
        gap: 12px 25px;
        padding: 0 20px;
    }

    .gdf-annual {
        font-size: 1.2rem;
    }

    .gdf-fundraiser {
        font-size: 1.4rem;
        letter-spacing: 4px;
    }
}