/* Style for the display view */
#display-view {
    font-family: 'Inter', sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-f, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';

    /* REMOVED: background-image is now set by JS */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* NEW: Add transition for smooth background changes */
    transition: background-image 1s ease-in-out;

    /* NEW: Add a subtle overlay to help text stand out */
    position: relative;
    color: white; /* Ensure text is white for contrast */

    /* NEW: For 3D transitions */
    perspective: 1000px;
    overflow: hidden; /* UPDATED: This now correctly stops the display from scrolling */
}

/* NEW: Overlay style */
#display-view::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3); /* Dark overlay */
    z-index: 1;
}


.park-icon-display,
.park-hours-display,
.ride-name-display,
.wait-time-container,
.countdown-timer,
/* NEW: Add welcome screen elements */
.welcome-resort-icon-display,
.welcome-message-display,
.welcome-countdown-timer,
.trending-graph-container {
    position: absolute;
    z-index: 3; /* Above parent containers and overlay */
    transition: top 0.3s ease, left 0.3s ease, bottom 0.3s ease, width 0.3s ease, height 0.3s ease, opacity 0.5s ease, transform 0.3s ease;

    /* NEW: Define CSS variables for default transform (will be overridden by JS) */
    --layout-scale: 1.0;
    --layout-translate-x: 0%;
}

/* NEW: Add welcome screen container */
#welcome-screen-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2; /* Below editable elements, above overlay */
    display: none; /* Hidden by default */
}


/* --- NEW: Hamburger Settings Button Styles --- */
.hamburger-menu-btn {
    position: absolute;
    /* REMOVED: top and left are now handled by pos-- classes */
    /* top: 1rem; */
    /* left: 1rem; */
    width: 44px;
    height: 44px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    z-index: 10;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: top 0.3s ease, left 0.3s ease, bottom 0.3s ease, right 0.3s ease; /* NEW: Add transition */
}


.hamburger-line {
    width: 20px;
    height: 2px;
    background-color: white;
    margin: 2px 0;
    transition: all 0.3s ease;
}

/* --- FIX: Added Hamburger Position Overrides --- */
.hamburger-menu-btn.pos--top-left {
    top: 1rem;
    left: 1rem;
    bottom: auto;
    right: auto;
}
.hamburger-menu-btn.pos--top-right {
    top: 1rem;
    left: auto;
    bottom: auto;
    right: 1rem;
}
.hamburger-menu-btn.pos--bottom-left {
    top: auto;
    left: 1rem;
    bottom: 1rem;
    right: auto;
}
.hamburger-menu-btn.pos--bottom-right {
    top: auto;
    left: auto;
    bottom: 1rem;
    right: 1rem;
}
.hamburger-menu-btn.pos--none {
    display: none;
}

/* Add responsive padding for larger screens */
@media (min-width: 640px) {
    .hamburger-menu-btn.pos--top-left {
        top: 1.5rem;
        left: 1.5rem;
    }
    .hamburger-menu-btn.pos--top-right {
        top: 1.5rem;
        right: 1.5rem;
    }
    .hamburger-menu-btn.pos--bottom-left {
        bottom: 1.5rem;
        left: 1.5rem;
    }
    .hamburger-menu-btn.pos--bottom-right {
        bottom: 1.5rem;
        right: 1.5rem;
    }
}
/* --- End Fix --- */


/* UPDATED: Wait Time Container (styled by CLASS) */
.wait-time-container {
    /* position: absolute; */ /* Already set above */
    min-height: 150px; /* Give it space */
    display: flex;
    flex-direction: column; /* Child elements stack vertically */
    align-items: center;
    justify-content: center;
    /* NEW: Add perspective for child flip */
    perspective: 300px;
}

.wait-time-sign-wrapper {
    display: flex; /* Hidden by default, shown by JS */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    padding: 1rem 2.5rem;
    width: auto;
    max-width: 95%;
    min-width: 180px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border: 4px solid #374151; /* Default border */
    transition: all 0.3s ease;
}

.wait-time-number {
    font-size: clamp(5rem, 25vw, 20rem);
    line-height: 1;
    font-weight: 800;
}

.wait-time-label {
    font-size: clamp(1.5rem, 7vw, 3rem);
    font-weight: 600;
    color: #9ca3af;
    margin-top: -0.5rem;
    letter-spacing: 0.1em;
}

/* NEW: Trend Arrow Styles */
.trend-arrow {
    font-size: clamp(2rem, 8vw, 6rem);
    font-weight: 900;
    line-height: 1;
    margin-bottom: -0.5rem;
    transition: all 0.3s ease;
}

.trend-up {
    color: #ef4444; /* Red for increasing wait */
}

.trend-down {
    color: #10b981; /* Green for decreasing wait */
}
/* END TREND */

.wait-time-status-display {
    display: none; /* Hidden by default, shown by JS */
    font-size: clamp(2.5rem, 12vw, 6rem);
    line-height: 1.1;
    font-weight: 700;
    text-transform: uppercase;
    color: #f59e0b;
}

.ride-name-display,
.welcome-message-display {
    font-size: clamp(1.5rem, 6vw, 4rem);
    line-height: 1.1;
    font-weight: 600;
    width: auto;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    background-color: transparent;
    border: none;
    padding: 0.5rem 1rem;
    text-transform: none;
    letter-spacing: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Specific overrides for STANDARD style */
.display-style--standard .wait-time-sign-wrapper {
    background-color: #1f2937;
    border-color: #374151;
}



.park-icon-display,
.welcome-resort-icon-display {
    /* position: absolute; */ /* Already set above */
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

/* NEW: Added .welcome-resort-icon-display img */
.park-icon-display img,
.welcome-resort-icon-display img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* UPDATED: Class selector */
.park-hours-display {
    /* position: absolute; */ /* Already set above */
    font-size: clamp(0.875rem, 2.5vw, 1.5rem); /* Responsive font size */
    font-weight: 500;
    color: #d1d5db; /* gray-300 */
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    white-space: nowrap; /* Prevent ugly wrapping */
}


/* --- Responsive Layout for Small Screens (PORTRAIT) --- */
@media (max-width: 500px) {

    .display-style--standard .ride-name-display,
    .display-style--standard .welcome-message-display {
        font-size: clamp(1.25rem, 5vw, 1.75rem); /* Adjusted for 500px */
        margin-bottom: 0.5rem; /* Tighter spacing */
    }
    .display-style--standard .wait-time-number {
        font-size: clamp(3rem, 18vw, 6rem); /* Adjusted for 500px */
    }
    .display-style--standard .wait-time-label {
        font-size: clamp(1rem, 4vw, 1.5rem); /* Adjusted for 500px */
    }
    .display-style--standard .wait-time-status-display {
        font-size: clamp(1.75rem, 10vw, 3rem); /* Adjusted for 500px */
    }
    .display-style--standard .wait-time-sign-wrapper {
        min-width: 150px;
        padding: 0.75rem 1rem;
    }

    .park-hours-display {
        font-size: 0.75rem; /* Smaller on mobile */
        margin-top: 0.5rem;
    }
}

@media (max-height: 500px) {

    .display-style--standard .ride-name-display,
    .display-style--standard .welcome-message-display {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    .display-style--standard .wait-time-number {
        font-size: 4rem;
    }
    .display-style--standard .wait-time-label {
        font-size: 1rem;
    }
    .display-style--standard .wait-time-status-display {
        font-size: 2.5rem;
    }
    .display-style--standard .wait-time-sign-wrapper {
        min-width: 150px;
        padding: 0.5rem 1rem;
    }

    /* Shrink fonts and padding for landscape phones (Traditional) */
    /* STYLES REMOVED */

    /* Universal short screen */
    .park-hours-display {
        font-size: 0.875rem; /* Smaller on landscape */
        margin-top: 0.5rem;
    }
}


/* 1. Fade */
@keyframes fade-out { 100% { opacity: 0; } }
@keyframes fade-in { 0% { opacity: 0; } }
.transition-out-fade { animation: fade-out 0.5s ease-out forwards; }
.transition-in-fade { animation: fade-in 0.5s ease-in forwards; }

/* 2. Slide Left */
@keyframes slide-out-left { 100% { transform: scale(var(--layout-scale)) translateX(calc(-100% + var(--layout-translate-x))); opacity: 0; } }
@keyframes slide-in-left { 0% { transform: scale(var(--layout-scale)) translateX(calc(100% + var(--layout-translate-x))); opacity: 0; } }
.transition-out-slide-left { animation: slide-out-left 0.5s ease-out forwards; }
.transition-in-slide-left { animation: slide-in-left 0.5s ease-in forwards; }

/* 3. Slide Right */
@keyframes slide-out-right { 100% { transform: scale(var(--layout-scale)) translateX(calc(100% + var(--layout-translate-x))); opacity: 0; } }
@keyframes slide-in-right { 0% { transform: scale(var(--layout-scale)) translateX(calc(-100% + var(--layout-translate-x))); opacity: 0; } }
.transition-out-slide-right { animation: slide-out-right 0.5s ease-out forwards; }
.transition-in-slide-right { animation: slide-in-right 0.5s ease-in forwards; }

/* 4. Slide Up */
@keyframes slide-out-up { 100% { transform: scale(var(--layout-scale)) translate(var(--layout-translate-x), -100%); opacity: 0; } }
@keyframes slide-in-up { 0% { transform: scale(var(--layout-scale)) translate(var(--layout-translate-x), 100%); opacity: 0; } }
.transition-out-slide-up { animation: slide-out-up 0.5s ease-out forwards; }
.transition-in-slide-up { animation: slide-in-up 0.5s ease-in forwards; }

/* 5. Slide Down */
@keyframes slide-out-down { 100% { transform: scale(var(--layout-scale)) translate(var(--layout-translate-x), 100%); opacity: 0; } }
@keyframes slide-in-down { 0% { transform: scale(var(--layout-scale)) translate(var(--layout-translate-x), -100%); opacity: 0; } }
.transition-out-slide-down { animation: slide-out-down 0.5s ease-out forwards; }
.transition-in-slide-down { animation: slide-in-down 0.5s ease-in forwards; }

/* 6. Zoom In */
@keyframes zoom-in-out { 100% { transform: scale(calc(var(--layout-scale) * 2)) translateX(var(--layout-translate-x)); opacity: 0; } }
@keyframes zoom-in-in { 0% { transform: scale(calc(var(--layout-scale) * 0.5)) translateX(var(--layout-translate-x)); opacity: 0; } }
.transition-out-zoom-in { animation: zoom-in-out 0.4s ease-out forwards; }
.transition-in-zoom-in { animation: zoom-in-in 0.4s ease-in forwards; }

/* 7. Zoom Out */
@keyframes zoom-out-out { 100% { transform: scale(calc(var(--layout-scale) * 0.5)) translateX(var(--layout-translate-x)); opacity: 0; } }
@keyframes zoom-out-in { 0% { transform: scale(calc(var(--layout-scale) * 2)) translateX(var(--layout-translate-x)); opacity: 0; } }
.transition-out-zoom-out { animation: zoom-out-out 0.4s ease-out forwards; }
.transition-in-zoom-out { animation: zoom-out-in 0.4s ease-in forwards; }

/* 8. Flip X */
@keyframes flip-x-out { 100% { transform: scale(var(--layout-scale)) translateX(var(--layout-translate-x)) rotateY(90deg); opacity: 0; } }
@keyframes flip-x-in { 0% { transform: scale(var(--layout-scale)) translateX(var(--layout-translate-x)) rotateY(-90deg); opacity: 0; } }
.transition-out-flip-x { animation: flip-x-out 0.4s ease-in forwards; }
.transition-in-flip-x { animation: flip-x-in 0.4s ease-out forwards; }

/* 9. Flip Y */
@keyframes flip-y-out { 100% { transform: scale(var(--layout-scale)) translateX(var(--layout-translate-x)) rotateX(90deg); opacity: 0; } }
@keyframes flip-y-in { 0% { transform: scale(var(--layout-scale)) translateX(var(--layout-translate-x)) rotateX(-90deg); opacity: 0; } }
.transition-out-flip-y { animation: flip-y-out 0.4s ease-in forwards; }
.transition-in-flip-y { animation: flip-y-in 0.4s ease-out forwards; }

/* 10. Rotate */
@keyframes rotate-out { 100% { transform: scale(0) translateX(var(--layout-translate-x)) rotate(360deg); opacity: 0; } }
@keyframes rotate-in { 0% { transform: scale(0) translateX(var(--layout-translate-x)) rotate(-360deg); opacity: 0; } }
.transition-out-rotate { animation: rotate-out 0.4s ease-in-out forwards; }
.transition-in-rotate { animation: rotate-in 0.4s ease-out forwards; }


.transition-out-fade #welcome-screen-container,
.transition-in-fade #welcome-screen-container {
    animation: none; /* The container doesn't fade, its children do */
}

.transition-out-slide-left #welcome-screen-container,
.transition-in-slide-left #welcome-screen-container,
.transition-out-slide-right #welcome-screen-container,
.transition-in-slide-right #welcome-screen-container,
.transition-out-slide-up #welcome-screen-container,
.transition-in-slide-up #welcome-screen-container,
.transition-out-slide-down #welcome-screen-container,
.transition-in-slide-down #welcome-screen-container,
.transition-out-zoom-in #welcome-screen-container,
.transition-in-zoom-in #welcome-screen-container,
.transition-out-zoom-out #welcome-screen-container,
.transition-in-zoom-out #welcome-screen-container,
.transition-out-flip-x #welcome-screen-container,
.transition-in-flip-x #welcome-screen-container,
.transition-out-flip-y #welcome-screen-container,
.transition-in-flip-y #welcome-screen-container,
.transition-out-rotate #welcome-screen-container,
.transition-in-rotate #welcome-screen-container {
    animation: none; /* Container doesn't animate, children do */
}


@keyframes flip-vertical-update-anim {
    0% { transform: rotateX(0deg); }
    50% { transform: rotateX(90deg); opacity: 0.5; }
    100% { transform: rotateX(0deg); }
}
.flip-vertical-update {
    /* Apply animation to the direct children (sign and wrapper) */
    & > .wait-time-sign-wrapper,
    & > .wait-time-status-display {
        animation: flip-vertical-update-anim 0.5s ease-in-out forwards;
    }
}

.countdown-timer,
.welcome-countdown-timer {
    /* position: absolute; */ /* Already set above */
    z-index: 5;
    /* UPDATED: Thinner/Wider design */
    padding: 0.25rem 1rem; /* Thinner padding */
    border-radius: 1.5rem; /* Rounded all corners */
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);

    clip-path: none; /* REMOVED clip-path */


}

.countdown-timer.countdown-pos--top,
.welcome-countdown-timer.countdown-pos--top {
    border-radius: 1.5rem;
}
/* NEW: Added .welcome-countdown-timer */
.countdown-timer.countdown-pos--bottom,
.welcome-countdown-timer.countdown-pos--bottom {
    border-radius: 1.5rem;
}

.countdown-flex-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
}

.countdown-title {
    display: block;
    /* width: 100%; */ /* REMOVED: No longer full width */
    text-align: right; /* Align to the right */
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    flex-shrink: 0; /* Don't let title shrink */
}
.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    width: 100%; /* Grid takes remaining space */
    min-width: 200px; /* Give grid some minimum space */
}
.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.countdown-number {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    line-height: 1;
}
.countdown-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    line-height: 1;
    margin-top: 0.1rem; /* Tighter margin */
}

.countdown-timer.display-style--standard,
.welcome-countdown-timer.display-style--standard {
    background-color: #1f2937; /* gray-800 */
    border: 2px solid #374151; /* gray-700 */
}
/* NEW: Added .welcome-countdown-timer */
.countdown-timer.display-style--standard.countdown-pos--top,
.welcome-countdown-timer.display-style--standard.countdown-pos--top {
    border-top: 2px solid #374151; /* Restore border */
    border-radius: 1.5rem;
}
/* NEW: Added .welcome-countdown-timer */
.countdown-timer.display-style--standard.countdown-pos--bottom,
.welcome-countdown-timer.display-style--standard.countdown-pos--bottom {
    border-bottom: 2px solid #374151; /* Restore border */
    border-radius: 1.5rem;
}
.display-style--standard .countdown-title {
    font-size: clamp(0.7rem, 1.5vw, 1rem); /* Shrunk */
    color: #9ca3af; /* gray-400 */
    letter-spacing: 0.05em;
    /* margin-bottom: 0.5rem; */ /* REMOVED */
}
.display-style--standard .countdown-number {
    font-size: clamp(1.5rem, 4vw, 2.5rem); /* Shrunk */
    color: white;
}
.display-style--standard .countdown-label {
    font-size: clamp(0.65rem, 1.25vw, 0.8rem); /* Shrunk */
    color: #9ca3af;
    text-transform: uppercase;
}

#music-panel-container {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    left: auto;
    width: 320px; /* Back to original width */
    height: 100%; /* Full height */
    z-index: 20;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: -5px 0 15px rgba(0,0,0,0.3);
}

#music-panel-container.is-open {
    transform: translateX(0);
}

#music-panel-handle {
    position: absolute;
    top: 50%;
    bottom: auto;
    left: -40px;
    transform: translateY(-50%);
    width: 40px;
    height: 80px;
    background-color: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-right: none;
    border-radius: 10px 0 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
}

#music-panel-handle:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

#music-panel-content {
    width: 100%;
    height: 100%;
    background-color: #111; /* Fallback */
}

#music-panel-iframe {
    width: 100%; /* Fit container */
    height: 100%; /* Fit container */
    border: none;
    transform: none; /* REMOVED scaling */
    transform-origin: 0 0;
}

#display-view.edit-mode-active .hamburger-menu-btn,
#display-view.edit-mode-active #music-panel-handle {
    display: none; /* Hide UI controls */
}

#display-view.edit-mode-active .countdown-timer.hidden,
#display-view.edit-mode-active .welcome-countdown-timer.hidden { /* NEW */
    display: block ; /* Force show countdown timer for editing */
    opacity: 0.7;
}

#edit-element-modal {
    color: #1f2937; /* text-gray-800 */
}
#edit-element-modal.dark {
    color: #f3f4f6; /* text-gray-100 */
}
#edit-element-modal #edit-element-close-btn {
    font-size: 2rem;
    line-height: 1;
    font-weight: bold;
    padding: 0 0.5rem;
}
/* FIXED: Add specific styles for slider value labels */
#edit-element-modal label {
    color: #374151; /* gray-700 for light mode label text */
}
#edit-element-modal.dark label {
    color: #d1d5db; /* gray-300 for dark mode label text */
}
#edit-element-modal label span {
    font-weight: bold;
    color: #3b82f6; /* blue-500 */
    padding-left: 0.5rem;
}
#edit-element-modal.dark label span {
    color: #60a5fa; /* blue-400 */
}


/* NEW: Slider styles */
.edit-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    background: #4b5563; /* gray-600 */
    outline: none;
    opacity: 0.7;
    -webkit-transition: .2s;
    transition: opacity .2s;
    border-radius: 5px;
}
.edit-slider:hover {
    opacity: 1;
}
.edit-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #3b82f6; /* blue-500 */
    cursor: pointer;
    border-radius: 50%;
}
.edit-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #3b82f6; /* blue-500 */
    cursor: pointer;
    border-radius: 50%;
}

/* NEW: Edit Mode Bar Sliding */
#edit-mode-bar {
    transition: transform 0.3s ease-in-out;
}
#edit-mode-bar.is-hidden {
    transform: translateY(120%); /* Slide down just past 100% */
}


/* ==========================================================================
   ALTERNATIVE THEMES (Premium Styles)
   ========================================================================== */

/* --- 1. TRADITIONAL THEME --- */
.display-style--traditional,
.display-style--traditional * {
    font-family: 'Cinzel', 'Georgia', serif !important;
}

#display-view.display-style--traditional .wait-time-sign-wrapper,
#wizard-preview-display.display-style--traditional .wait-time-sign-wrapper,
#display-view.display-style--traditional .welcome-message-display,
#wizard-preview-display.display-style--traditional .welcome-message-display {
    background: linear-gradient(135deg, #450a0a 0%, #7f1d1d 100%) !important; /* Deep Burgundy */
    border: 4px solid #fbbf24 !important; /* Gold Border */
    border-radius: 12px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(251, 191, 36, 0.3) !important;
    padding: 1.5rem 2.5rem !important;
}

.display-style--traditional .wait-time-number {
    color: #fef3c7 !important; /* Cream */
    text-shadow: 3px 3px 0px #7c2d12 !important;
    font-weight: 700 !important;
}

.display-style--traditional .wait-time-label,
.display-style--traditional .ride-name-display {
    color: #fbbf24 !important; /* Gold */
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    font-weight: 700 !important;
}

#display-view.display-style--traditional .countdown-timer,
#wizard-preview-display.display-style--traditional .countdown-timer,
#display-view.display-style--traditional .welcome-countdown-timer,
#wizard-preview-display.display-style--traditional .welcome-countdown-timer {
    background-color: #450a0a !important;
    border: 2px solid #fbbf24 !important;
    color: #fef3c7 !important;
}

/* --- 2. MODERN THEME --- */
.display-style--modern,
.display-style--modern * {
    font-family: 'Outfit', 'Inter', 'Segoe UI', sans-serif !important;
}

#display-view.display-style--modern .wait-time-sign-wrapper,
#wizard-preview-display.display-style--modern .wait-time-sign-wrapper,
#display-view.display-style--modern .welcome-message-display,
#wizard-preview-display.display-style--modern .welcome-message-display {
    background: rgba(15, 23, 42, 0.7) !important; /* Dark Slate Glass */
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 4px !important; /* Slightly rounded sharp corners */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

.display-style--modern .wait-time-number {
    font-weight: 200 !important; /* Thin for modern look */
    color: #38bdf8 !important; /* Sky Blue */
    letter-spacing: -0.02em !important;
}

.display-style--modern .wait-time-label {
    color: #94a3b8 !important;
    font-weight: 300 !important;
    text-transform: uppercase !important;
}

.display-style--modern .ride-name-display {
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    background: linear-gradient(to right, #ffffff, #38bdf8) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

#display-view.display-style--modern .countdown-timer,
#wizard-preview-display.display-style--modern .countdown-timer,
#display-view.display-style--modern .welcome-countdown-timer,
#wizard-preview-display.display-style--modern .welcome-countdown-timer {
    background: rgba(15, 23, 42, 0.9) !important;
    border-radius: 0 !important;
    border-left: 6px solid #38bdf8 !important;
}

/* --- 3. RUSTIC THEME --- */
.display-style--rustic,
.display-style--rustic * {
    font-family: 'Vollkorn', 'Palatino', serif !important;
}

#display-view.display-style--rustic .wait-time-sign-wrapper,
#wizard-preview-display.display-style--rustic .wait-time-sign-wrapper,
#display-view.display-style--rustic .welcome-message-display,
#wizard-preview-display.display-style--rustic .welcome-message-display {
    background: radial-gradient(circle, #78716c 0%, #44403c 100%) !important; /* Stone/Leather */
    border: 10px solid #292524 !important;
    border-radius: 60px !important; /* Oval/Pill shape */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6) !important;
}

.display-style--rustic .wait-time-number {
    color: #e7e5e4 !important; /* Warm Gray */
    font-weight: 700 !important;
}

.display-style--rustic .wait-time-label {
    color: #a8a29e !important;
    font-style: italic !important;
}

.display-style--rustic .ride-name-display {
    color: #f5f5f4 !important;
    font-style: italic !important;
    font-weight: 600 !important;
}

#display-view.display-style--rustic .countdown-timer,
#wizard-preview-display.display-style--rustic .countdown-timer,
#display-view.display-style--rustic .welcome-countdown-timer,
#wizard-preview-display.display-style--rustic .welcome-countdown-timer {
    background-color: #44403c !important;
    border-radius: 30px !important;
    border: 3px solid #292524 !important;
}

/* --- 4. MINIMALISTIC THEME --- */
.display-style--minimalistic,
.display-style--minimalistic * {
    font-family: 'Inter', 'System UI', sans-serif !important;
}

#display-view.display-style--minimalistic .wait-time-sign-wrapper,
#wizard-preview-display.display-style--minimalistic .wait-time-sign-wrapper,
#display-view.display-style--minimalistic .welcome-message-display,
#wizard-preview-display.display-style--minimalistic .welcome-message-display {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
}

.display-style--minimalistic .wait-time-number {
    font-weight: 900 !important;
    font-size: clamp(8rem, 35vw, 30rem) !important;
    letter-spacing: -0.06em !important;
    color: #ffffff !important;
    opacity: 1 !important;
}

.display-style--minimalistic .wait-time-label {
    font-weight: 300 !important;
    letter-spacing: 0.3em !important;
    color: rgba(255, 255, 255, 0.6) !important;
}

.display-style--minimalistic .ride-name-display {
    font-weight: 200 !important;
    letter-spacing: 0.25em !important;
    text-transform: uppercase !important;
    opacity: 0.9 !important;
    font-size: clamp(1.25rem, 5vw, 3rem) !important;
}

#display-view.display-style--minimalistic .countdown-timer,
#wizard-preview-display.display-style--minimalistic .countdown-timer,
#display-view.display-style--minimalistic .welcome-countdown-timer,
#wizard-preview-display.display-style--minimalistic .welcome-countdown-timer {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 0 !important;
}

/* --- TRENDING GRAPH STYLES --- */
.trending-graph-container {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.trending-graph-container.hidden {
    display: none !important;
}

.trending-graph-title {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.trending-sparkline-svg {
    width: 100%;
    height: 100%;
    min-height: 40px;
    filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.5));
}

.trending-sparkline-path {
    fill: none;
    stroke: #38bdf8; /* Default sky blue */
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.5s ease;
}

.trending-sparkline-area {
    fill: url(#trending-gradient);
    opacity: 0.2;
    transition: all 0.5s ease;
}

.trending-graph-label {
    position: absolute;
    bottom: 2px;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
}

.trending-graph-label.label-start { left: 8px; }
.trending-graph-label.label-end { right: 8px; }

/* Theme Overrides for Graph */
.display-style--traditional .trending-graph-container {
    background: rgba(69, 10, 10, 0.6);
    border: 2px solid #fbbf24;
    color: #fbbf24;
}
.display-style--traditional .trending-sparkline-path {
    stroke: #fbbf24;
}

.display-style--rustic .trending-graph-container {
    background: rgba(68, 64, 60, 0.6);
    border: 2px solid #292524;
    color: #e7e5e4;
}
.display-style--rustic .trending-sparkline-path {
    stroke: #e7e5e4;
}


/* =========================================
   GRID LAYOUT OVERLAY
   ========================================= */
#grid-overlay {
    display: grid;
    gap: 2px;
    background: rgba(0, 0, 0, 0.15);
}
#grid-overlay[data-cols="1"] { grid-template-columns: 1fr; }
#grid-overlay[data-cols="2"] { grid-template-columns: 1fr 1fr; }
#grid-overlay[data-cols="3"] { grid-template-columns: 1fr 1fr 1fr; }
#grid-overlay[data-cols="4"] { grid-template-columns: 1fr 1fr 1fr 1fr; }
#grid-overlay[data-cols="5"] { grid-template-columns: 1fr 1fr 1fr 1fr 1fr; }

.grid-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 0.5rem;
    transition: opacity 0.4s ease;
}
.grid-cell.fading-out { opacity: 0; }
.grid-cell.fading-in  { opacity: 1; }
.grid-cell .gc-ride-name {
    font-size: clamp(0.6rem, 1.5vw, 1.1rem);
    font-weight: 700;
    color: #fff;
    text-align: center;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.grid-cell .gc-wait-number {
    font-size: clamp(1.4rem, 4vw, 3.5rem);
    font-weight: 900;
    line-height: 1;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}
.grid-cell .gc-wait-label {
    font-size: clamp(0.5rem, 1.2vw, 0.85rem);
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
.grid-cell .gc-status {
    font-size: clamp(0.6rem, 1.3vw, 1rem);
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.grid-cell .gc-park-icon {
    width: clamp(20px, 4vw, 48px);
    height: clamp(20px, 4vw, 48px);
    object-fit: contain;
    margin-bottom: 0.2rem;
    opacity: 0.85;
}
.grid-cell .gc-trend-arrow { font-size: clamp(0.6rem, 1.4vw, 1rem); margin-left: 0.2rem; }
.grid-cell .gc-trend-arrow.trend-up   { color: #4ade80; }
.grid-cell .gc-trend-arrow.trend-down { color: #f87171; }
.grid-cell .text-green-400  { color: #4ade80; }
.grid-cell .text-yellow-400 { color: #facc15; }
.grid-cell .text-red-500    { color: #ef4444; }

/* =========================================
   GRID CELL INNER - theme selector overrides
   Allow theme selectors to match inside .grid-cell-inner
   The inner div carries the display-style--* class directly.
   ========================================= */
.grid-cell {
    background: transparent;
    position: relative;
    overflow: hidden;
}
.grid-cell-inner {
    /* inner wrapper that carries theme classes and is CSS-scaled */
    box-sizing: border-box;
}

/* =========================================
   GRID INNER - ensure wait-time-sign-wrapper 
   background/border applies when class is on inner div
   ========================================= */
.grid-cell-inner.display-style--traditional .wait-time-sign-wrapper,
.grid-cell-inner.display-style--traditional .welcome-message-display {
    background: linear-gradient(135deg, #450a0a 0%, #7f1d1d 100%) !important;
    border: 4px solid #fbbf24 !important;
    border-radius: 12px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(251, 191, 36, 0.3) !important;
    padding: 1.5rem 2.5rem !important;
}
.grid-cell-inner.display-style--modern .wait-time-sign-wrapper,
.grid-cell-inner.display-style--modern .welcome-message-display {
    background: rgba(15, 23, 42, 0.7) !important;
    backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 4px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}
.grid-cell-inner.display-style--rustic .wait-time-sign-wrapper,
.grid-cell-inner.display-style--rustic .welcome-message-display {
    background: radial-gradient(circle, #78716c 0%, #44403c 100%) !important;
    border: 10px solid #292524 !important;
    border-radius: 60px !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6) !important;
}
.grid-cell-inner.display-style--minimalistic .wait-time-sign-wrapper {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
