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

/* Prevent horizontal overflow globally */
html {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Theme Variables - Matches Master Dashboard exactly */
:root {
    /* Silver Theme (default) */
    --accent-primary: #e8e8e8;
    --accent-secondary: #b8b8b8;
    --accent-glow: rgba(232, 232, 232, 0.3);
    --accent-glow-hover: rgba(232, 232, 232, 0.1);
    --accent-bg-primary: rgba(232, 232, 232, 0.1);
    --accent-bg-secondary: rgba(232, 232, 232, 0.06);
    --accent-border: rgba(232, 232, 232, 0.22);
    --accent-inset: rgba(232, 232, 232, 0.18);
    --accent-inset-hover: rgba(232, 232, 232, 0.25);
    --particle-glow-1: rgba(232, 232, 232, 0.6);
    --particle-glow-2: rgba(232, 232, 232, 0.4);
    
    /* Fullscreen layout adjustments */
    --fullscreen-top-offset: 80px;  /* Mobile: Adjust this value to fine-tune vertical position */
    --fullscreen-edge-padding: 12px; /* Mobile: Extra padding for curved screen edges */
    --desktop-fullscreen-top-offset: 70px; /* Desktop: Browser chrome offset (URL bar + tabs) */
    
    /* Desktop container width limits - MATCHES MASTER DASHBOARD */
    --desktop-container-max-width: 900px;
}

/* Gold Theme */
[data-theme="gold"] {
    --accent-primary: #d4af37;
    --accent-secondary: #c9a961;
    --accent-glow: rgba(212, 175, 55, 0.3);
    --accent-glow-hover: rgba(212, 175, 55, 0.1);
    --accent-bg-primary: rgba(212, 175, 55, 0.1);
    --accent-bg-secondary: rgba(212, 175, 55, 0.06);
    --accent-border: rgba(212, 175, 55, 0.22);
    --accent-inset: rgba(212, 175, 55, 0.18);
    --accent-inset-hover: rgba(212, 175, 55, 0.25);
    --particle-glow-1: rgba(212, 175, 55, 0.6);
    --particle-glow-2: rgba(212, 175, 55, 0.4);
}

/* Cyan Theme */
[data-theme="cyan"] {
    --accent-primary: #00d9ff;
    --accent-secondary: #00b8d4;
    --accent-glow: rgba(0, 217, 255, 0.3);
    --accent-glow-hover: rgba(0, 217, 255, 0.1);
    --accent-bg-primary: rgba(0, 217, 255, 0.1);
    --accent-bg-secondary: rgba(0, 217, 255, 0.06);
    --accent-border: rgba(0, 217, 255, 0.22);
    --accent-inset: rgba(0, 217, 255, 0.18);
    --accent-inset-hover: rgba(0, 217, 255, 0.25);
    --particle-glow-1: rgba(0, 217, 255, 0.6);
    --particle-glow-2: rgba(0, 217, 255, 0.4);
}

/* Amber Theme */
[data-theme="amber"] {
    --accent-primary: #ffb000;
    --accent-secondary: #ff8c00;
    --accent-glow: rgba(255, 176, 0, 0.3);
    --accent-glow-hover: rgba(255, 176, 0, 0.1);
    --accent-bg-primary: rgba(255, 176, 0, 0.1);
    --accent-bg-secondary: rgba(255, 176, 0, 0.06);
    --accent-border: rgba(255, 176, 0, 0.22);
    --accent-inset: rgba(255, 176, 0, 0.18);
    --accent-inset-hover: rgba(255, 176, 0, 0.25);
    --particle-glow-1: rgba(255, 176, 0, 0.6);
    --particle-glow-2: rgba(255, 176, 0, 0.4);
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #000000;
    background-attachment: fixed;
    min-height: 100vh; /* Changed from height to min-height to match master dashboard */
    padding: 60px 20px; /* Desktop: Increased top padding from 40px to 60px to push content down */
    color: #f5f5f5;
    position: relative;
    overflow-x: hidden; /* Changed from overflow: hidden to allow vertical scroll if needed */
    display: flex;
    flex-direction: column;
    
    /* Prevent mobile browser from responding to touch gestures for chrome UI manipulation */
    /* This prevents swipe-to-show/hide URL bar and other browser UI gestures */
    touch-action: none; /* Disable all default touch behaviors */
    -webkit-user-select: none; /* Prevent text selection on iOS */
    user-select: none;
    overscroll-behavior: none; /* Prevent pull-to-refresh and overscroll effects */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS when needed */
}

/* Fullscreen mode styles - Mobile */
body.is-fullscreen {
    /* Account for browser chrome space + camera cutout + extra breathing room */
    padding-top: calc(env(safe-area-inset-top, 0px) + var(--fullscreen-top-offset));
    padding-left: max(10px, env(safe-area-inset-left, 10px));
    padding-right: max(10px, env(safe-area-inset-right, 10px));
    padding-bottom: max(10px, env(safe-area-inset-bottom, 10px));
}

/* Fake fullscreen fallback for unsupported browsers */
body.fake-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    /* Same padding strategy as fullscreen */
    padding-top: calc(env(safe-area-inset-top, 0px) + var(--fullscreen-top-offset));
    padding-left: max(10px, env(safe-area-inset-left, 10px));
    padding-right: max(10px, env(safe-area-inset-right, 10px));
    padding-bottom: max(10px, env(safe-area-inset-bottom, 10px));
}

/* Desktop fullscreen: Shift down to compensate for lost browser chrome */
@media (min-width: 769px) {
    body.is-fullscreen,
    body.fake-fullscreen {
        /* Browser chrome (URL bar + tabs) is typically 70-80px on desktop */
        padding-top: calc(20px + var(--desktop-fullscreen-top-offset));
        padding-left: 20px;
        padding-right: 20px;
        padding-bottom: 20px;
    }
}

/* Mobile fullscreen with notch/curved screen optimization */
@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        body {
            /* Normal mode: Account for safe areas on mobile with increased top padding */
            /* Mobile browsers need more space because chrome can be up to 56px */
            padding-top: max(80px, env(safe-area-inset-top) + 40px);
            padding-left: max(20px, env(safe-area-inset-left));
            padding-right: max(20px, env(safe-area-inset-right));
            padding-bottom: max(20px, env(safe-area-inset-bottom));
        }
        
        /* In fullscreen, override with more aggressive padding for curved screens */
        body.is-fullscreen,
        body.fake-fullscreen {
            /* Browser chrome space + safe area + breathing room for curved edges */
            padding-top: calc(env(safe-area-inset-top) + var(--fullscreen-top-offset));
            /* Extra horizontal padding for curved screen edges */
            padding-left: calc(env(safe-area-inset-left) + var(--fullscreen-edge-padding));
            padding-right: calc(env(safe-area-inset-right) + var(--fullscreen-edge-padding));
        }
    }
}

/* 3D Starfield Canvas */
/* 3D Starfield Canvas */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    display: block;
    /* Force GPU compositing on separate layer */
    transform: translateZ(0);
    will-change: contents; /* Hint to browser that canvas contents change frequently */
    backface-visibility: hidden;
    /* Allow canvas to capture touch events for particle interaction */
    touch-action: none;
}

#starfield.hidden {
    display: none;
}

.container {
    max-width: var(--desktop-container-max-width);
    margin: 0 auto;
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Prevent touch gestures on container from reaching browser chrome */
    touch-action: none;
    overscroll-behavior: contain; /* Keep overscroll within container */
}

/* Desktop fullscreen: Keep same width, don't expand */
@media (min-width: 769px) {
    body.is-fullscreen .container,
    body.fake-fullscreen .container {
        max-width: var(--desktop-container-max-width);
    }
}

/* Mobile fullscreen: tighter container for curved screens */
@media (max-width: 768px) {
    body.is-fullscreen .container,
    body.fake-fullscreen .container {
        max-width: calc(100vw - 40px);
    }
}

/* Header - Glassmorphism with luxury touches */
.header {
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.5) 0%, rgba(8, 8, 8, 0.4) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: clamp(20px, 5vw, 32px); /* Fluid border radius */
    padding: clamp(16px, 4vw, 32px) clamp(16px, 5vw, 48px); /* Fluid padding */
    margin-bottom: clamp(12px, 3vw, 20px); /* Fluid margin */
    border: 1px solid var(--accent-border);
    flex-shrink: 0;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.8),
        0 0 20px var(--accent-glow-hover),
        inset 0 1px 0 var(--accent-inset),
        8px 8px 16px rgba(0, 0, 0, 0.3),
        -8px -8px 16px rgba(255, 255, 255, 0.008);
    position: relative;
    overflow: hidden;
    transition: background 0.5s ease-in-out, 
                backdrop-filter 0.5s ease-in-out, 
                border 0.5s ease-in-out, 
                box-shadow 0.5s ease-in-out;
}

/* Immersive mode: Fade out header container background and styling */
body.immersive-mode .header {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid transparent;
    box-shadow: none;
}

/* Immersive mode: Hide header elements AND content sections */
body.immersive-mode .header-left,
body.immersive-mode .icon-button:not(#fullscreenButton):not(#settingsButton),
body.immersive-mode .section,
body.immersive-mode .view-toggle-container {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out, visibility 0s linear 0.5s;
}

/* Immersive mode: Buttons hidden by default, shown on interaction */
body.immersive-mode #fullscreenButton,
body.immersive-mode #settingsButton {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out, visibility 0s linear 0.5s;
}

/* When controls are explicitly visible in immersive mode (mouse over zone) */
body.immersive-mode.immersive-controls-visible #fullscreenButton,
body.immersive-mode.immersive-controls-visible #settingsButton {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transition: opacity 0.5s ease-in-out;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.header-left {
    flex: 1;
}

.header h1 {
    font-size: clamp(1.5rem, 6vw, 3rem); /* Fluid: 1.5rem min → 3rem max */
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 50%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 40px var(--accent-glow);
}

.device-name {
    font-size: 0.9rem;
    color: var(--accent-primary);
    opacity: 0.8;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.header-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Icon Buttons */
.icon-button {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-bg-tertiary) 0%, var(--accent-bg-secondary) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--accent-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 var(--accent-inset),
        4px 4px 8px rgba(0, 0, 0, 0.3),
        -4px -4px 8px rgba(255, 255, 255, 0.008);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    opacity: 0.5; /* Dimmed default state */
}

@media (hover: hover) and (pointer: fine) {
    .icon-button:hover {
        box-shadow: 
            0 10px 30px rgba(0, 0, 0, 0.6),
            0 0 18px var(--accent-glow-hover),
            inset 0 1px 0 var(--accent-inset-hover),
            6px 6px 12px rgba(0, 0, 0, 0.4),
            -6px -6px 12px rgba(255, 255, 255, 0.01);
        opacity: 0.7; /* Slightly brighter on hover */
    }
}

.icon-button svg {
    width: 22px;
    height: 22px;
    fill: var(--accent-primary);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (hover: hover) and (pointer: fine) {
    .icon-button:hover svg {
        transform: scale(1.1);
    }
}

.icon-button.active {
    opacity: 1; /* Full brightness when active */
    background: linear-gradient(135deg, var(--accent-bg-primary) 0%, var(--accent-bg-secondary) 100%);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.7),
        0 0 20px var(--accent-glow-hover),
        inset 0 1px 0 var(--accent-inset-hover),
        10px 10px 20px rgba(0, 0, 0, 0.4),
        -10px -10px 20px rgba(255, 255, 255, 0.01);
}

.icon-button.active svg {
    fill: var(--accent-primary);
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.settings-button:hover svg {
    transform: rotate(90deg);
}

/* Overlay for modals */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modal Panel */
.modal-panel {
    background: linear-gradient(135deg, rgba(8, 8, 8, 0.5) 0%, rgba(6, 6, 6, 0.4) 100%);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: 24px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid var(--accent-border);
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.9),
        0 0 40px var(--accent-glow-hover),
        inset 0 1px 0 var(--accent-inset);
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-panel.small {
    max-width: 450px;
}

/* Confirmation Modal Styles */
.confirm-message {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin: 20px 0;
    text-align: center;
}

/* iOS Push Notification Modal Content */
.ios-push-content {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
}

.ios-push-content p {
    margin: 0 0 16px 0;
    font-size: 0.95rem;
}

.ios-push-content p:last-child {
    margin-bottom: 0;
}

.ios-push-content .ios-version-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-bg-primary) 0%, var(--accent-bg-secondary) 100%);
    border: 1px solid var(--accent-border);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin: 0 2px;
}

.ios-push-content .ios-steps-header {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 600;
    color: var(--accent-primary);
    margin: 20px 0 12px 0;
}

.ios-push-content .ios-steps-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
    counter-reset: step-counter;
}

.ios-push-content .ios-steps-list li {
    position: relative;
    padding-left: 36px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    counter-increment: step-counter;
}

.ios-push-content .ios-steps-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--accent-bg-primary) 0%, var(--accent-bg-secondary) 100%);
    border: 1px solid var(--accent-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.ios-push-content .ios-share-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin: 0 2px;
    fill: var(--accent-primary);
}

.ios-push-content .ios-warning {
    background: linear-gradient(135deg, rgba(180, 100, 50, 0.15) 0%, rgba(150, 80, 40, 0.1) 100%);
    border: 1px solid rgba(200, 120, 60, 0.3);
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: 16px;
    font-size: 0.85rem;
    color: rgba(255, 200, 150, 0.9);
}

.ios-push-content .ios-success {
    background: linear-gradient(135deg, rgba(50, 150, 100, 0.15) 0%, rgba(40, 120, 80, 0.1) 100%);
    border: 1px solid rgba(60, 180, 120, 0.3);
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: 16px;
    font-size: 0.85rem;
    color: rgba(150, 255, 200, 0.9);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.modal-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-bg-primary) 0%, var(--accent-bg-secondary) 100%);
    border: 1px solid var(--accent-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--accent-primary);
    font-size: 24px;
    line-height: 1;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: linear-gradient(135deg, var(--accent-bg-secondary) 0%, var(--accent-bg-primary) 100%);
}

/* Settings Modal Specific */
.setting-group {
    margin-bottom: 28px;
}

.setting-label {
    font-size: 0.9rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    margin-bottom: 12px;
    display: block;
}

.toggle-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.toggle-button {
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--accent-bg-secondary) 0%, rgba(0, 0, 0, 0.02) 100%);
    border: 1px solid var(--accent-border);
    border-radius: 12px;
    color: var(--accent-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    opacity: 0.5;
}

.toggle-button:hover {
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    opacity: 0.7;
}

.toggle-button.active {
    opacity: 1;
    background: linear-gradient(135deg, var(--accent-bg-primary) 0%, var(--accent-bg-secondary) 100%);
    border-color: var(--accent-border);
    color: var(--accent-primary);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.7),
        0 0 20px var(--accent-glow-hover),
        inset 0 1px 0 var(--accent-inset-hover),
        10px 10px 20px rgba(0, 0, 0, 0.4),
        -10px -10px 20px rgba(255, 255, 255, 0.01);
}

/* Theme preview buttons - always show their respective colors */
.toggle-button[data-theme="silver"] {
    background: linear-gradient(135deg, rgba(232, 232, 232, 0.1) 0%, rgba(232, 232, 232, 0.06) 100%);
    border-color: rgba(232, 232, 232, 0.22);
    color: #e8e8e8;
}

.toggle-button[data-theme="gold"] {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0.06) 100%);
    border-color: rgba(212, 175, 55, 0.22);
    color: #d4af37;
}

.toggle-button[data-theme="amber"] {
    background: linear-gradient(135deg, rgba(255, 176, 0, 0.1) 0%, rgba(255, 176, 0, 0.06) 100%);
    border-color: rgba(255, 176, 0, 0.22);
    color: #ffb000;
}

.toggle-button[data-theme="cyan"] {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.1) 0%, rgba(0, 217, 255, 0.06) 100%);
    border-color: rgba(0, 217, 255, 0.22);
    color: #00d9ff;
}

/* Active theme button gets current theme's glow */
.toggle-button[data-theme].active {
    opacity: 1;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.7),
        0 0 20px var(--accent-glow-hover),
        inset 0 1px 0 var(--accent-inset-hover),
        10px 10px 20px rgba(0, 0, 0, 0.4),
        -10px -10px 20px rgba(255, 255, 255, 0.01);
}

/* Maintain preview colors even when active */
.toggle-button[data-theme="silver"].active {
    background: linear-gradient(135deg, rgba(232, 232, 232, 0.15) 0%, rgba(232, 232, 232, 0.1) 100%);
    border-color: rgba(232, 232, 232, 0.4);
}

.toggle-button[data-theme="gold"].active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.1) 100%);
    border-color: rgba(212, 175, 55, 0.4);
}

.toggle-button[data-theme="amber"].active {
    background: linear-gradient(135deg, rgba(255, 176, 0, 0.15) 0%, rgba(255, 176, 0, 0.1) 100%);
    border-color: rgba(255, 176, 0, 0.4);
}

.toggle-button[data-theme="cyan"].active {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.15) 0%, rgba(0, 217, 255, 0.1) 100%);
    border-color: rgba(0, 217, 255, 0.4);
}

/* Chart Display Quadrant */
.chart-display-quadrant {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.quadrant-button {
    padding: 12px;
    background: linear-gradient(135deg, var(--accent-bg-secondary) 0%, rgba(0, 0, 0, 0.02) 100%);
    border: 1px solid var(--accent-border);
    border-radius: 12px;
    color: var(--accent-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    opacity: 0.5;
}

.quadrant-button svg {
    width: 24px;
    height: 24px;
    fill: var(--accent-primary);
    transition: all 0.3s ease;
}

.quadrant-button:hover {
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    opacity: 0.7;
}

.quadrant-button.active {
    opacity: 1;
    background: linear-gradient(135deg, var(--accent-bg-primary) 0%, var(--accent-bg-secondary) 100%);
    border-color: var(--accent-border);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.5),
        0 0 12px var(--accent-glow-hover),
        inset 0 1px 0 var(--accent-inset-hover);
}

.quadrant-button.active svg {
    filter: drop-shadow(0 0 2px var(--accent-glow));
}

/* Setting input group */
.setting-input-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.setting-input-group input {
    flex: 1;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--accent-border);
    border-radius: 8px;
    color: var(--accent-primary);
    font-size: 0.9rem;
}

.setting-input-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-glow-hover);
}

/* Range input group for Y-axis settings */
.custom-range-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 28px;
}

.custom-range-grid .setting-group {
    margin-bottom: 0;
}

.range-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.range-input-group input {
    width: 60px;
    flex: 0 0 auto;
    padding: 10px 4px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--accent-border);
    border-radius: 8px;
    color: var(--accent-primary);
    font-size: 0.9rem;
    text-align: center;
}

.range-input-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-glow-hover);
}

.range-separator {
    color: var(--accent-primary);
    font-size: 0.85rem;
    opacity: 0.7;
}

.setting-save-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--accent-bg-primary) 0%, var(--accent-bg-secondary) 100%);
    border: 1px solid var(--accent-border);
    border-radius: 10px;
    color: var(--accent-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.setting-save-btn:hover {
    box-shadow: 0 0 12px var(--accent-glow-hover);
}

.setting-note {
    font-size: 0.75rem;
    color: var(--accent-primary);
    opacity: 0.6;
    margin-top: 8px;
    font-style: italic;
}

/* Admin Mode Toggle Button (same styling as logout button) */
.admin-mode-button {
    display: inline-block;
    padding: 12px 20px;
    margin-top: 8px;
    margin-left: 12px;
    background: linear-gradient(135deg, var(--accent-bg-primary) 0%, var(--accent-bg-secondary) 100%);
    border: 1px solid var(--accent-border);
    border-radius: 12px;
    color: var(--accent-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 var(--accent-inset);
}

.admin-mode-button:hover {
    background: linear-gradient(135deg, var(--accent-bg-secondary) 0%, var(--accent-bg-primary) 100%);
    border-color: var(--accent-border);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.4),
        0 0 18px var(--accent-glow-hover),
        inset 0 1px 0 var(--accent-inset-hover);
}

.admin-mode-button.active {
    background: linear-gradient(135deg, var(--accent-bg-secondary) 0%, var(--accent-bg-primary) 100%);
    border-color: var(--accent-border);
    color: var(--accent-primary);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.4),
        0 0 18px var(--accent-glow-hover),
        inset 0 1px 0 var(--accent-inset-hover);
}

/* Hidden admin button (shown only in admin mode) */
.admin-mode-button.hidden {
    display: none !important;
}

/* Demo Mode Toggle Button (same styling as admin button) */
.demo-mode-button {
    display: inline-block;
    padding: 12px 20px;
    margin-top: 8px;
    margin-left: 12px;
    background: linear-gradient(135deg, var(--accent-bg-primary) 0%, var(--accent-bg-secondary) 100%);
    border: 1px solid var(--accent-border);
    border-radius: 12px;
    color: var(--accent-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 var(--accent-inset);
}

.demo-mode-button:hover {
    background: linear-gradient(135deg, var(--accent-bg-secondary) 0%, var(--accent-bg-primary) 100%);
    border-color: var(--accent-border);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.4),
        0 0 18px var(--accent-glow-hover),
        inset 0 1px 0 var(--accent-inset-hover);
}

.demo-mode-button.active {
    background: linear-gradient(135deg, var(--accent-bg-secondary) 0%, var(--accent-bg-primary) 100%);
    border-color: var(--accent-border);
    color: var(--accent-primary);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.4),
        0 0 18px var(--accent-glow-hover),
        inset 0 1px 0 var(--accent-inset-hover);
}

/* Hidden demo button (shown only in demo mode) */
.demo-mode-button.hidden {
    display: none !important;
}

/* Logout Button */
.logout-button {
    display: inline-block;
    padding: 12px 20px;
    margin-top: 8px;
    background: linear-gradient(135deg, var(--accent-bg-primary) 0%, var(--accent-bg-secondary) 100%);
    border: 1px solid var(--accent-border);
    border-radius: 12px;
    color: var(--accent-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 var(--accent-inset);
}

.logout-button:hover {
    background: linear-gradient(135deg, var(--accent-bg-secondary) 0%, var(--accent-bg-primary) 100%);
    border-color: var(--accent-border);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.4),
        0 0 18px var(--accent-glow-hover),
        inset 0 1px 0 var(--accent-inset-hover);
}

/* Add Threshold Modal Specific Styles */
/* Custom Select Dropdown */
.custom-select {
    position: relative;
    width: 100%;
    user-select: none;
}

.custom-select-trigger {
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--accent-bg-secondary) 0%, rgba(0, 0, 0, 0.02) 100%);
    border: 1px solid var(--accent-border);
    border-radius: 12px;
    color: var(--accent-primary);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 var(--accent-inset);
}

.custom-select-trigger:hover {
    background: linear-gradient(135deg, var(--accent-inset) 0%, var(--accent-bg-secondary) 100%);
    border-color: var(--accent-primary);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 0 12px var(--accent-glow-hover),
        inset 0 1px 0 var(--accent-inset-hover);
}

.custom-select.active .custom-select-trigger {
    border-color: var(--accent-primary);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 0 18px var(--accent-glow),
        inset 0 1px 0 var(--accent-inset-hover);
    background: rgba(0, 0, 0, 0.5);
}

.custom-select-value {
    flex: 1;
    color: var(--accent-primary);
    font-weight: 500;
}

.custom-select-value.placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.custom-select-arrow {
    width: 20px;
    height: 20px;
    fill: var(--accent-primary);
    transition: transform 0.3s ease, opacity 0.3s ease;
    flex-shrink: 0;
    margin-left: 8px;
}

.custom-select.active .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(15, 15, 15, 0.98) 0%, rgba(10, 10, 10, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--accent-border);
    border-radius: 12px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.9),
        0 0 20px var(--accent-glow-hover),
        inset 0 1px 0 var(--accent-inset);
}

.custom-select.active .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select-option {
    padding: 12px 16px;
    color: var(--accent-primary); /* Theme color for all options */
    opacity: 0.7; /* Dimmed when not selected */
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    background: transparent;
}

.custom-select-option:hover {
    background: linear-gradient(135deg, var(--accent-bg-primary) 0%, var(--accent-bg-secondary) 100%);
    color: var(--accent-primary);
    opacity: 1; /* Full brightness on hover */
}

.custom-select-option.selected {
    background: linear-gradient(135deg, var(--accent-bg-secondary) 0%, rgba(0, 0, 0, 0.02) 100%);
    color: var(--accent-primary);
    font-weight: 600;
    opacity: 1; /* Full brightness when selected */
}

.custom-select-option.selected:hover {
    background: linear-gradient(135deg, var(--accent-bg-primary) 0%, var(--accent-bg-secondary) 100%);
}

/* Custom scrollbar for dropdown */
.custom-select-options::-webkit-scrollbar {
    width: 6px;
}

.custom-select-options::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.custom-select-options::-webkit-scrollbar-thumb {
    background: var(--accent-bg-primary);
    border-radius: 3px;
}

.custom-select-options::-webkit-scrollbar-thumb:hover {
    background: var(--accent-bg-secondary);
}

.threshold-value-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.threshold-input {
    flex: 1;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--accent-bg-secondary) 0%, rgba(0, 0, 0, 0.02) 100%);
    border: 1px solid var(--accent-border);
    border-radius: 12px;
    color: var(--accent-primary);
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 var(--accent-inset);
    -moz-appearance: textfield; /* Remove Firefox spinner */
}

/* Remove number input spinner arrows */
.threshold-input::-webkit-outer-spin-button,
.threshold-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.threshold-input::placeholder {
    color: var(--accent-primary);
    opacity: 0.4;
    font-weight: 500;
}

.threshold-input:hover {
    background: linear-gradient(135deg, var(--accent-inset) 0%, var(--accent-bg-secondary) 100%);
    border-color: var(--accent-primary);
}

.threshold-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 0 18px var(--accent-glow),
        inset 0 1px 0 var(--accent-inset-hover);
}

.threshold-input-unit {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-primary);
    min-width: 40px;
    text-align: right;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.modal-btn {
    flex: 1;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--accent-border);
}

.modal-btn.primary {
    background: linear-gradient(135deg, var(--accent-bg-primary) 0%, var(--accent-bg-secondary) 100%);
    color: var(--accent-primary);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 var(--accent-inset);
}

.modal-btn.primary:hover {
    background: linear-gradient(135deg, var(--accent-bg-secondary) 0%, var(--accent-bg-primary) 100%);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.4),
        0 0 18px var(--accent-glow),
        inset 0 1px 0 var(--accent-inset-hover);
    transform: translateY(-2px);
}

.modal-btn.secondary {
    background: linear-gradient(135deg, var(--accent-bg-secondary) 0%, rgba(0, 0, 0, 0.02) 100%);
    color: var(--accent-primary);
    opacity: 0.7;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 var(--accent-inset);
}

.modal-btn.secondary:hover {
    opacity: 1;
    background: linear-gradient(135deg, var(--accent-inset) 0%, var(--accent-bg-secondary) 100%);
    border-color: var(--accent-primary);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 0 12px var(--accent-glow-hover),
        inset 0 1px 0 var(--accent-inset-hover);
}

/* Section - Deep luxury glass */
.section {
    background: linear-gradient(135deg, rgba(8, 8, 8, 0.5) 0%, rgba(6, 6, 6, 0.4) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: clamp(20px, 5vw, 32px); /* Fluid border radius */
    padding: clamp(16px, 4vw, 32px); /* Fluid padding */
    border: 1px solid var(--accent-border);
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.8),
        0 0 20px var(--accent-glow-hover),
        inset 0 1px 0 var(--accent-inset),
        8px 8px 16px rgba(0, 0, 0, 0.3),
        -8px -8px 16px rgba(255, 255, 255, 0.008);
    transition: opacity 1s ease, transform 1s ease;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    min-height: 0;
}

/* View Toggle Container - keeps sections in the same location */
.view-toggle-container {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
}

/* All three togglable sections occupy the same space using grid */
#liveReadingsSection,
#historicalDataSection,
#alertRulesSection {
    grid-area: 1 / 1; /* All sections in the same grid cell */
    /* GPU-accelerated transition - only opacity (no transform to avoid reflow) */
    transition: opacity 0.5s ease-in-out, visibility 0s linear 0s;
    align-self: start; /* Prevent stretching - only take up needed height */
    /* Force GPU compositing layer for smooth transitions with particle effects */
    will-change: opacity;
    transform: translateZ(0); /* Force hardware acceleration */
    backface-visibility: hidden; /* Optimize for GPU rendering */
}

/* Hide historical and alert rules by default until JavaScript initializes */
#historicalDataSection,
#alertRulesSection {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Hidden state - delay visibility change until after fade */
#liveReadingsSection.hidden,
#historicalDataSection.hidden,
#alertRulesSection.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    /* Removed transform to avoid expensive reflow during particle animation */
    transition: opacity 0.5s ease-in-out, visibility 0s linear 0.5s;
}

/* Visible state */
#liveReadingsSection:not(.hidden),
#historicalDataSection:not(.hidden),
#alertRulesSection:not(.hidden) {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    /* No transform needed - keeping elements in same position */
}

/* Override any child element transitions to prevent them from lagging behind parent fade */
#liveReadingsSection .reading-card,
#liveReadingsSection .last-update,
#historicalDataSection .chart-mode-btn,
#historicalDataSection .preset-btn,
#historicalDataSection .input-group input,
#historicalDataSection .chart-stats-compact,
#historicalDataSection .range-controls,
#alertRulesSection .threshold-row,
#alertRulesSection .threshold-list,
#alertRulesSection .thresholds-container,
#alertRulesSection .alert-rules-action-bar,
#alertRulesSection .push-notification-toggle,
#alertRulesSection .add-threshold-unified-btn {
    transition-property: background, border-color, box-shadow, color, fill !important;
    transition-duration: 0.3s !important;
}

/* Ensure these elements don't have opacity/transform transitions that conflict */
#liveReadingsSection .reading-value,
#historicalDataSection .chart-canvas-container,
#historicalDataSection canvas,
#alertRulesSection .threshold-value,
#alertRulesSection .threshold-sensor {
    transition: none !important;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.section-title {
    font-size: clamp(1.2rem, 4vw, 1.75rem); /* Fluid section title */
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 16px); /* Fluid gap */
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

/* Current Readings Cards */
.current-readings {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* 3 columns that can shrink */
    gap: clamp(8px, 2vw, 16px); /* Fluid gap */
    margin-bottom: 16px;
    flex-shrink: 0;
}

.reading-card {
    background: linear-gradient(135deg, var(--accent-bg-secondary) 0%, rgba(0, 0, 0, 0.02) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--accent-border);
    border-radius: clamp(16px, 4vw, 24px); /* Fluid border radius */
    padding: clamp(12px, 3vw, 28px); /* Fluid padding */
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 var(--accent-inset),
        6px 6px 12px rgba(0, 0, 0, 0.3),
        -6px -6px 12px rgba(255, 255, 255, 0.008);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center; /* Center all text within the card */
    min-width: 0; /* Allow cards to shrink below content width */
}

.reading-card:hover {
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.7),
        0 0 20px var(--accent-glow-hover),
        inset 0 1px 0 var(--accent-inset-hover),
        10px 10px 20px rgba(0, 0, 0, 0.4),
        -10px -10px 20px rgba(255, 255, 255, 0.01);
}

.reading-card h3 {
    font-size: 0.9rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    margin-bottom: 16px;
    opacity: 0.8;
}

.reading-display {
    display: flex;
    align-items: baseline;
    gap: 8px;
    justify-content: center; /* Center the reading value and unit */
}

.reading-value {
    font-size: clamp(1.5rem, 8vw, 3rem); /* Fluid: 1.5rem min → 3rem max */
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.reading-unit {
    font-size: 1.2rem;
    color: var(--accent-primary);
    opacity: 0.7;
}

.last-update {
    text-align: center;
    color: var(--accent-primary);
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 12px;
    flex-shrink: 0;
}

/* Chart Mode Toggle - Styled like radio buttons with theme color */
.chart-mode-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    flex-shrink: 0;
    justify-content: center; /* Center buttons on mobile */
}

.chart-mode-btn {
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--accent-bg-secondary) 0%, rgba(0, 0, 0, 0.02) 100%);
    border: 1px solid var(--accent-border);
    border-radius: 10px;
    color: var(--accent-primary);
    font-size: 0.95rem; /* Reduced by 1 from 1.05rem */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.5;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    flex: 0 0 auto; /* Don't stretch - size to content */
    width: auto; /* Override any width set by mobile styles */
}

.chart-mode-btn:hover {
    opacity: 0.7;
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.chart-mode-btn.active {
    opacity: 1;
    background: linear-gradient(135deg, var(--accent-bg-primary) 0%, var(--accent-bg-secondary) 100%);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.5),
        0 0 12px var(--accent-glow-hover),
        inset 0 1px 0 var(--accent-inset-hover);
}

.radio-icon {
    font-size: 12px;
    line-height: 1;
}

/* Charts */
.chart-container {
    margin-bottom: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chart-header {
    margin-bottom: 12px;
    flex-shrink: 0;
    text-align: center; /* Center the chart title */
}

.chart-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 8px;
    text-align: center; /* Center the chart title text */
}

.chart-canvas-container {
    position: relative;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.2) 100%);
    border-radius: 16px;
    padding: clamp(8px, 3vw, 16px); /* Fluid padding */
    border: 1px solid var(--accent-border);
    flex: 1;
    min-height: clamp(200px, 40vw, 300px); /* Fluid min height */
    max-height: 400px;
    display: flex;
    flex-direction: column;
}

canvas {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

#mainChart {
    width: 100% !important;
    height: 100% !important;
}

/* Chart Statistics - styled with theme colors */
.chart-stats-compact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    margin-left: auto;
    margin-right: auto;
    padding: 12px;
    flex-shrink: 0;
    font-size: 0.85rem;
    color: var(--accent-primary);
    background: linear-gradient(135deg, var(--accent-bg-secondary) 0%, rgba(0, 0, 0, 0.02) 100%);
    border-radius: 12px;
    border: 1px solid var(--accent-border);
}

/* Stat rows - for overlay mode (each sensor on its own line) */
.stat-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 12px;
    padding: 6px 0;
    border-bottom: 1px solid var(--accent-border);
    width: 100%;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-row .stat-label {
    font-weight: 700;
    min-width: 65px;
}

.stat-row .stat-value {
    white-space: nowrap;
}

/* Hide labels column when using stat-rows (overlay mode) */
.chart-stats-compact:has(.stat-row) .stat-column.labels {
    display: none;
}

/* Each column is a vertical stack */
.stat-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

/* Labels column - left-aligned text */
.stat-column.labels {
    align-items: flex-end;
}

.stat-label {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    height: 24px;
    display: flex;
    align-items: center;
}

/* Value columns */
.stat-value {
    color: var(--accent-primary);
    white-space: nowrap;
    height: 24px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-value strong {
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 1rem;
}

.stat-compact small {
    color: var(--accent-primary);
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Range Controls */
.range-controls {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--accent-border);
    flex-shrink: 0;
}

.date-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center; /* Center all items horizontally within the column */
}

.input-group label {
    font-size: 0.85rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    text-align: center; /* Center text within label */
    width: 100%; /* Full width to center properly */
}

.input-group input {
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--accent-border);
    border-radius: 8px;
    color: var(--accent-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.3s ease;
    width: fit-content; /* Size to content */
    max-width: 100%; /* Prevent overflow */
    text-align: center; /* Center the date/time text */
}

.input-group input[type="datetime-local"] {
    width: fit-content; /* Size to content for datetime inputs */
    min-width: clamp(160px, 45vw, 200px); /* Fluid min-width: smaller on narrow screens */
    max-width: 100%; /* Never overflow container */
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-glow-hover);
    background: rgba(0, 0, 0, 0.5);
}

.preset-timeframes {
    margin-top: 12px;
    flex-shrink: 0;
}

.preset-timeframes h4 {
    font-size: 0.8rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.preset-btn {
    padding: 8px 12px;
    background: linear-gradient(135deg, var(--accent-bg-secondary) 0%, rgba(0, 0, 0, 0.02) 100%); /* Dimmer default state */
    border: 1px solid var(--accent-border);
    border-radius: 8px;
    color: var(--accent-primary);
    font-size: 0.95rem; /* Reduced by 1 from 1.05rem */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 var(--accent-inset);
    width: fit-content; /* Size to content, not stretched */
    white-space: nowrap; /* Prevent text wrapping */
    opacity: 0.5; /* Dimmed default state */
}

.preset-btn.small {
    padding: 8px 14px; /* Increased padding */
    font-size: 0.95rem; /* Reduced by 1 from 1.05rem */
    width: fit-content; /* Size to content, not stretched */
    align-self: center; /* Center within the input-group */
}

.preset-btn:hover {
    background: linear-gradient(135deg, var(--accent-inset) 0%, var(--accent-bg-secondary) 100%);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 var(--accent-inset-hover);
    opacity: 0.7; /* Slightly brighter on hover */
}

/* Active/selected state for preset timeframe buttons - Matches device selection brightness */
.preset-btn.active {
    opacity: 1; /* Full brightness when active */
    background: linear-gradient(135deg, var(--accent-bg-primary) 0%, var(--accent-bg-secondary) 100%); /* Brighter background */
    border-color: var(--accent-border);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.7),
        0 0 20px var(--accent-glow-hover), /* Added prominent glow */
        inset 0 1px 0 var(--accent-inset-hover),
        10px 10px 20px rgba(0, 0, 0, 0.4),
        -10px -10px 20px rgba(255, 255, 255, 0.01);
}

/* Alert Rules Action Bar */
.alert-rules-action-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* Push Notification Toggle Button */
.push-notification-toggle {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--accent-bg-secondary) 0%, rgba(0, 0, 0, 0.02) 100%); /* Dimmer default */
    border: 1px solid var(--accent-border);
    border-radius: 12px;
    color: var(--accent-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 var(--accent-inset);
    white-space: nowrap;
}

.push-notification-toggle:hover:not(:disabled) {
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 var(--accent-inset-hover);
}

.push-notification-toggle.active {
    background: linear-gradient(135deg, var(--accent-bg-primary) 0%, var(--accent-bg-secondary) 100%); /* Brighter when active */
    border-color: var(--accent-border);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 var(--accent-inset-hover),
        10px 10px 20px rgba(0, 0, 0, 0.4),
        -10px -10px 20px rgba(255, 255, 255, 0.01);
}

.push-notification-toggle:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Add Threshold Unified Button */
.add-threshold-unified-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--accent-bg-primary) 0%, var(--accent-bg-secondary) 100%);
    border: 1px solid var(--accent-border);
    border-radius: 12px;
    color: var(--accent-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 var(--accent-inset);
    white-space: nowrap;
}

.add-threshold-unified-btn:hover {
    background: linear-gradient(135deg, var(--accent-bg-secondary) 0%, var(--accent-bg-primary) 100%);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.4),
        0 0 18px var(--accent-glow-hover),
        inset 0 1px 0 var(--accent-inset-hover);
}

/* Alert Thresholds */
.thresholds-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* 3 columns: Air, Contact, Humidity */
    gap: 20px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.thresholds-column {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.threshold-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    margin-top: 0;
    flex-shrink: 0;
}

.threshold-section-title {
    font-size: 1.1rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.threshold-count {
    font-size: 0.9rem;
    color: var(--accent-primary);
    opacity: 0.7;
}

.threshold-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
    align-items: stretch; /* Make rows fill width */
}

.threshold-row {
    background: linear-gradient(135deg, var(--accent-bg-secondary) 0%, rgba(0, 0, 0, 0.02) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--accent-border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 var(--accent-inset);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%; /* Fill the column */
}

/* Desktop: hover shows highlight */
@media (hover: hover) and (pointer: fine) {
    .threshold-row:hover {
        background: linear-gradient(135deg, var(--accent-bg-primary) 0%, var(--accent-bg-secondary) 100%);
        box-shadow: 
            0 10px 30px rgba(0, 0, 0, 0.6),
            0 0 18px var(--accent-glow-hover),
            inset 0 1px 0 var(--accent-inset-hover);
    }
    
    .threshold-row:hover .threshold-actions {
        opacity: 1;
        pointer-events: all;
    }
}

/* Mobile: selection shows highlight (same as master dashboard device selection) */
@media (max-width: 768px) {
    .threshold-row.selected {
        background: linear-gradient(135deg, var(--accent-bg-primary) 0%, var(--accent-bg-secondary) 100%);
        border-color: var(--accent-border);
        box-shadow: 
            0 20px 60px rgba(0, 0, 0, 0.7),
            0 0 20px var(--accent-glow-hover),
            inset 0 1px 0 var(--accent-inset-hover),
            10px 10px 20px rgba(0, 0, 0, 0.4),
            -10px -10px 20px rgba(255, 255, 255, 0.01);
    }
    
    .threshold-row.selected .threshold-actions {
        opacity: 1;
        pointer-events: all;
    }
}

.threshold-row.editing {
    background: linear-gradient(135deg, var(--accent-bg-primary) 0%, var(--accent-bg-secondary) 100%);
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.7),
        0 0 20px var(--accent-glow-hover),
        inset 0 1px 0 var(--accent-inset-hover);
    position: relative;
    z-index: 10;
}

.threshold-row.editing .threshold-info,
.threshold-row.editing .threshold-actions {
    display: none;
}

.threshold-row.editing .threshold-edit-panel {
    display: flex;
    width: 100%;
}

.threshold-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.threshold-value {
    font-size: 1.1rem;
    color: var(--accent-primary);
    font-weight: 600;
}

.threshold-sensor {
    font-size: 0.85rem;
    color: var(--accent-primary);
    opacity: 0.7;
}

.threshold-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.threshold-edit-panel {
    display: none;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
}

.threshold-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 140px;
}

.threshold-input-label {
    font-size: 0.75rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.threshold-value-with-unit {
    display: flex;
    align-items: center;
    gap: 8px;
}

.threshold-value-input {
    flex: 0 0 auto;
    width: 80px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--accent-border);
    border-radius: 8px;
    color: var(--accent-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    -moz-appearance: textfield;
}

/* Remove number input spinner arrows */
.threshold-value-input::-webkit-outer-spin-button,
.threshold-value-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.threshold-value-input::placeholder {
    color: var(--accent-primary);
    opacity: 0.4;
}

.threshold-value-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-glow-hover);
    background: rgba(0, 0, 0, 0.6);
}

.threshold-unit {
    color: var(--accent-primary);
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 30px;
}

.threshold-sensor-select {
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--accent-border);
    border-radius: 8px;
    color: var(--accent-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.threshold-sensor-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-glow-hover);
}

.threshold-sensor-select option {
    background: #1a1a1a;
    color: var(--accent-primary);
}

.threshold-save-btn, .threshold-cancel-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--accent-bg-primary) 0%, var(--accent-bg-secondary) 100%);
    border: 1px solid var(--accent-border);
    border-radius: 10px;
    color: var(--accent-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.threshold-save-btn:hover, .threshold-cancel-btn:hover {
    background: linear-gradient(135deg, var(--accent-bg-secondary) 0%, var(--accent-bg-primary) 100%);
    box-shadow: 0 0 12px var(--accent-glow-hover);
}

.action-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-bg-primary) 0%, var(--accent-bg-secondary) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--accent-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 var(--accent-inset);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-icon:hover {
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.6),
        0 0 12px var(--accent-glow-hover),
        inset 0 1px 0 var(--accent-inset-hover);
}

.action-icon svg {
    width: 18px;
    height: 18px;
    fill: var(--accent-primary);
}

.action-icon.danger:hover {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.2) 0%, rgba(200, 35, 51, 0.1) 100%);
    border-color: rgba(220, 53, 69, 0.4);
}

.action-icon.danger svg {
    fill: #dc3545;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 30px 12px; /* Increase top padding on mobile to prevent header cutoff */
    }

    .header, .section {
        padding: 24px 16px;
        border-radius: 24px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .header-content {
        gap: 16px;
    }

    .icon-button {
        width: 44px;
        height: 44px;
    }

    .icon-button svg {
        width: 20px;
        height: 20px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    /* Keep toggle-group as 2x2 grid on mobile (for color themes and particle effects) */
    /* Temperature unit and Chart Y-axis already have 2 columns, so they're fine */

    /* Reading cards - reduce padding and font sizes to fit 3 in a row */
    .reading-card {
        padding: 16px 8px;
    }

    .reading-card h3 {
        font-size: 0.65rem;
        margin-bottom: 8px;
    }

    .reading-value {
        font-size: 1.8rem;
    }

    .reading-unit {
        font-size: 0.9rem;
    }

    .chart-mode-toggle {
        flex-wrap: wrap; /* Keep wrapping on mobile */
        justify-content: center; /* Center buttons on mobile */
    }

    .chart-mode-btn {
        width: auto; /* Size to content, not full width */
        flex: 0 0 auto; /* Don't stretch */
    }

    .alert-rules-action-bar {
        flex-direction: row;
        justify-content: flex-end; /* Right-align buttons */
        gap: 12px;
    }

    .push-notification-toggle {
        flex: 0 0 auto; /* Size to content */
        width: auto; /* Don't stretch */
    }

    .add-threshold-unified-btn {
        flex: 0 0 auto; /* Size to content */
        width: auto; /* Don't stretch */
    }

    .thresholds-container {
        grid-template-columns: 1fr 1fr 1fr; /* Keep 3 columns on mobile too */
        gap: 12px; /* Reduce gap on mobile for better fit */
    }

    .threshold-row {
        flex-wrap: wrap;
        min-width: unset; /* Allow smaller size on mobile */
    }

    .threshold-actions {
        margin-left: auto;
    }
}

/* Small phones (iPhone 14 = 390px, iPhone SE = 375px, etc.) */
@media (max-width: 414px) {
    body {
        padding: 20px 8px; /* Tighter padding on small screens */
    }

    /* Ensure container doesn't overflow on small screens */
    .container {
        max-width: calc(100vw - 16px); /* Match body padding: 8px * 2 = 16px */
        width: 100%;
    }

    body.is-fullscreen .container,
    body.fake-fullscreen .container {
        max-width: calc(100vw - 16px); /* Tighter for small screens */
    }

    .header, .section {
        padding: 16px 12px; /* Even more compact */
        border-radius: 20px;
        max-width: 100%; /* Prevent overflow */
        overflow: hidden; /* Clip any overflowing content */
    }

    .header h1 {
        font-size: 1.4rem; /* Force smaller on very small screens */
    }

    /* ========================================
       HEADER: 3-row layout on small phones
       Row 1: Title (Environment Reader)
       Row 2: Device name
       Row 3: Toggle buttons
       ======================================== */
    .header-content {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .header-left {
        width: 100%;
        text-align: center;
    }

    /* Device name can be long - allow wrapping and center */
    #deviceName,
    .device-name {
        word-break: break-word;
        overflow-wrap: break-word;
        text-align: center;
    }

    .header-buttons {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .icon-button {
        width: 40px;
        height: 40px;
    }

    .icon-button svg {
        width: 18px;
        height: 18px;
    }

    .section-title {
        font-size: 1.2rem;
    }

    /* Reading cards - even more compact for small screens */
    .current-readings {
        gap: 6px;
    }

    .reading-card {
        padding: 10px 6px;
        border-radius: 14px;
    }

    .reading-card h3 {
        font-size: 0.55rem;
        letter-spacing: 0.5px;
        margin-bottom: 6px;
    }

    .reading-value {
        font-size: 1.3rem;
    }

    .reading-unit {
        font-size: 0.7rem;
    }

    .reading-display {
        gap: 4px;
    }

    .last-update {
        font-size: 0.75rem;
        margin-top: 8px;
    }

    /* Chart mode buttons */
    .chart-mode-toggle {
        gap: 6px;
    }

    .chart-mode-btn {
        padding: 8px 10px;
        font-size: 0.8rem;
        gap: 4px;
    }

    /* Chart container - keep taller for Y-axis readability */
    .chart-canvas-container {
        padding: 8px;
        min-height: 250px; /* Increased from 180px to fit more Y-axis labels */
    }

    /* ========================================
       STATS: Compact sizing for small screens
       ======================================== */
    .chart-stats-compact {
        padding: 8px;
        gap: 8px;
        font-size: 0.75rem;
    }

    .stat-row {
        gap: 4px 10px;
        padding: 4px 0;
    }

    .stat-row .stat-label {
        font-size: 0.7rem;
        min-width: 50px;
    }

    .stat-row .stat-value {
        font-size: 0.65rem;
    }

    .stat-row .stat-value strong {
        font-size: 0.7rem;
    }

    .stat-label {
        font-size: 0.65rem;
    }

    .stat-value {
        font-size: 0.65rem;
    }

    .stat-value strong {
        font-size: 0.7rem;
    }

    /* Range controls */
    .date-inputs {
        grid-template-columns: 1fr; /* Stack on very small screens */
    }

    .input-group input {
        font-size: 0.8rem;
        padding: 10px 8px;
    }

    .input-group input[type="datetime-local"] {
        min-width: 140px;
    }

    .input-group label {
        font-size: 0.75rem;
    }

    /* Preset buttons */
    .preset-buttons {
        gap: 4px;
    }

    .preset-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .preset-timeframes h4 {
        font-size: 0.7rem;
    }

    /* Thresholds - stack to single column on very small screens */
    .thresholds-container {
        grid-template-columns: 1fr; /* Stack columns vertically */
        gap: 16px;
    }

    .threshold-section-title {
        font-size: 0.95rem;
    }

    .threshold-row {
        padding: 12px;
    }

    .threshold-value {
        font-size: 1rem;
    }

    .threshold-sensor {
        font-size: 0.75rem;
    }

    /* Action bar */
    .alert-rules-action-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .push-notification-toggle,
    .add-threshold-unified-btn {
        width: 100%;
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    /* Modal adjustments */
    .modal-panel {
        padding: 24px 16px;
        width: 95%;
        max-height: 90vh;
    }
}

/* Animation */
@keyframes fadeInLuxury {
    from {
        opacity: 0;
        transform: translateY(40px);
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        backdrop-filter: blur(40px);
    }
}

.header, .section {
    animation: fadeInLuxury 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom scrollbar for modals */
.modal-panel::-webkit-scrollbar {
    width: 8px;
}

.modal-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.modal-panel::-webkit-scrollbar-thumb {
    background: var(--accent-bg-primary);
    border-radius: 4px;
}

.modal-panel::-webkit-scrollbar-thumb:hover {
    background: var(--accent-bg-secondary);
}

/* Mobile Portrait Mode Enforcement */
@media screen and (max-height: 600px) and (orientation: landscape) {
    body > * {
        display: none !important;
    }
    
    body::before {
        content: "Please rotate your device to portrait mode";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #000000;
        color: var(--accent-primary, #e8e8e8);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 99999;
        font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        text-align: center;
        padding: 20px;
        font-size: 1.2rem;
        font-weight: 500;
        background-image: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0) 70%);
    }
}

