/* Lumio Base - Minimalist Fullscreen Timer/Stopwatch */

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

html,
body {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

body {
    background-color: #000;
    color: #fff;
    font-family: 'Orbitron', 'Courier New', monospace;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    user-select: none;
    cursor: default;
    /* Restored cursor for visibility */
    -webkit-tap-highlight-color: transparent;
    /* Remove mobile tap highlight */
}

/* Control Box - Top Right */
.control-box {
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.25rem;
    padding: 0.25rem 0.35rem;
    background: rgba(15, 15, 20, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    opacity: 0.85;
}

.control-box:hover {
    opacity: 1;
    background: rgba(20, 20, 25, 0.85);
    border-color: rgba(255, 255, 255, 0.15);
}

.control-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.control-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.control-btn:active {
    transform: scale(0.92);
}

.control-btn svg {
    width: 17px;
    height: 17px;
}

/* Navigation Box - Top Left */
.nav-box {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    display: flex;
    gap: 0.25rem;
    padding: 0.25rem 0.35rem;
    background: rgba(15, 15, 20, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    opacity: 0.85;
}

.nav-box:hover {
    opacity: 1;
    background: rgba(20, 20, 25, 0.85);
    border-color: rgba(255, 255, 255, 0.15);
}

.nav-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    border-radius: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.nav-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.nav-btn:active {
    transform: scale(0.92);
}

.nav-btn svg {
    width: 17px;
    height: 17px;
}

/* Mode Indicator Box - Top Left (Beside Nav Box) */
.mode-indicator-box {
    position: fixed;
    top: 0.75rem;
    left: 10.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.5rem;
    background: rgba(15, 15, 20, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    opacity: 0.85;
    height: 40px;
}

.mode-indicator-box:hover {
    opacity: 1;
    background: rgba(20, 20, 25, 0.85);
    border-color: rgba(255, 255, 255, 0.15);
}

.mode-icon-item {
    display: none;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
}

.mode-icon-item svg {
    width: 18px;
    height: 18px;
    filter: drop-shadow(0 0 8px currentColor);
}

/* Mode-Specific Colors and Visibility */
.mode-indicator-box[data-mode="stopwatch"] .mode-icon-item.stopwatch {
    display: flex;
    color: #4ade80;
    /* Greenhouse Green */
}

.mode-indicator-box[data-mode="timer"] .mode-icon-item.timer {
    display: flex;
    color: #60a5fa;
    /* Sky Blue */
}

.mode-indicator-box[data-mode="pomodoro"] .mode-icon-item.pomodoro {
    display: flex;
    color: #f87171;
    /* Tomato Red */
}

/* Timer Display - Center */
.timer-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    cursor: pointer;
    user-select: none;
}

.digit-group {
    font-size: clamp(10vw, 18vw, 22vw);
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    transition: color 0.2s ease, text-shadow 0.2s ease;
    padding: 0 0.5vw;
}

.digit-group.active {
    color: #00ffff;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.5),
        0 0 60px rgba(0, 255, 255, 0.3);
    background: rgba(0, 255, 255, 0.1);
    border-bottom: 4px solid #00ffff;
    border-radius: 12px;
}

.colon {
    font-size: clamp(8vw, 14vw, 18vw);
    font-weight: 700;
    color: #444;
    /* Animation controlled by settings - do not add default animation */
}

/* When running, colons stay solid */
body.running .colon {
    animation: none;
    opacity: 1;
    color: #666;
}

/* Pomodoro Mode State Colors */
.timer-display.pomodoro-work .digit-group {
    color: #ff4757;
    text-shadow: 0 0 30px rgba(255, 71, 87, 0.5),
        0 0 60px rgba(255, 71, 87, 0.3);
}

.timer-display.pomodoro-work .colon {
    color: #ff4757;
}

.timer-display.pomodoro-break .digit-group {
    color: #2ecc71;
    text-shadow: 0 0 30px rgba(46, 204, 113, 0.5),
        0 0 60px rgba(46, 204, 113, 0.3);
}

.timer-display.pomodoro-break .colon {
    color: #2ecc71;
}

.timer-display.pomodoro-long-break .digit-group {
    color: #3498db;
    text-shadow: 0 0 30px rgba(52, 152, 219, 0.5),
        0 0 60px rgba(52, 152, 219, 0.3);
}

.timer-display.pomodoro-long-break .colon {
    color: #3498db;
}

/* Toast Container Override for Dark Theme */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .digit-group {
        font-size: clamp(12vw, 16vw, 20vw);
    }

    .colon {
        font-size: clamp(10vw, 12vw, 16vw);
    }

    .keyboard-hints {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        max-width: 90%;
    }

    .mode-indicator {
        top: 1rem;
        left: 1rem;
    }

    .back-button {
        top: 1rem;
        right: 1rem;
    }
}

@media (max-width: 800px) {
    .digit-group {
        font-size: 14vw;
        padding: 0 0.5vw;
    }

    .colon {
        font-size: 11vw;
    }

    .keyboard-hints {
        bottom: 0.5rem;
        gap: 0.5rem;
    }

    .hint {
        font-size: 0.6rem;
        gap: 0.25rem;
    }

    .status-indicator {
        bottom: 25%;
    }
}

/* Specific Kiosk Optimization (480x320) */
@media (max-width: 800px) and (max-height: 480px) {
    .mode-indicator {
        top: 10px;
        left: 10px;
    }

    .mode-text {
        font-size: 0.7rem;
    }

    .mode-hint {
        font-size: 0.55rem;
    }

    .back-button {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        border-radius: 6px;
    }

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

    .digit-group {
        font-size: 18vw;
        padding: 0 0.2vw;
    }

    .colon {
        font-size: 14vw;
    }

    .status-indicator {
        bottom: 12%;
        gap: 0.5rem;
    }

    .status-text {
        font-size: 0.7rem;
    }
}

/* ============================================
   BACKGROUND MODAL
   ============================================ */

.bg-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bg-modal.active {
    display: flex;
    opacity: 1;
}

.bg-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bg-modal-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.bg-modal-close {
    width: 32px;
    height: 32px;
    background: rgba(255, 100, 100, 0.2);
    border: none;
    border-radius: 8px;
    color: #ff6b6b;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.settings-modal-close {
    width: 32px;
    height: 32px;
    background: rgba(255, 100, 100, 0.2);
    border: none;
    border-radius: 8px;
    color: #ff6b6b;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.settings-modal-close:hover,
.settings-modal-close:active {
    background: rgba(255, 100, 100, 0.4);
    color: #ff4444;
}

.bg-modal-close:hover,
.bg-modal-close:active {
    background: rgba(255, 100, 100, 0.4);
    color: #ff4444;
}

.bg-modal-close svg {
    width: 22px;
    height: 22px;
}

/* Modal content - scrollable area */
.bg-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    min-height: 0;
}

/* Section styling */
.bg-section {
    margin-bottom: 1rem;
}

.bg-section-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    margin: 0 0 0.5rem 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bg-grid::-webkit-scrollbar,
.bg-modal-content::-webkit-scrollbar,
.ambient-grid::-webkit-scrollbar,
.settings-modal-body::-webkit-scrollbar,
.profile-modal-content::-webkit-scrollbar {
    display: none;
}

.bg-grid,
.bg-modal-content,
.ambient-grid,
.settings-modal-body,
.profile-modal-content {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.bg-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: min-content;
    gap: 0.75rem;
    padding: 1rem;
    overflow-y: auto;
    min-height: 0;
}

.bg-tile {
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    background-size: cover;
    background-position: center;
    position: relative;
}

.bg-tile:hover {
    transform: scale(1.02);
    border-color: rgba(255, 255, 255, 0.4);
}

.bg-tile.selected {
    border-color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.bg-tile.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.bg-tile.none-bg {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

/* Focused tile for keyboard navigation */
.bg-tile.focused {
    border-color: #ffff00;
    box-shadow: 0 0 15px rgba(255, 255, 0, 0.5);
    transform: scale(1.02);
}

/* Body background when image is applied */
body.has-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body.has-bg::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: -1;
}

/* Video background for live wallpapers */
.bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    display: none;
}

/* Overlay for video background (darkens it) */
body:has(.bg-video[style*="display: block"])::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.15);
    z-index: -1;
}

/* Live tile styling */
.bg-tile.live-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.live-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.live-icon {
    position: absolute;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
    z-index: 1;
}

.bg-tile.live-tile:hover .live-icon {
    opacity: 0;
    transform: scale(0.5);
}

/* Kiosk-specific modal optimizations (480x320) */
@media (max-width: 800px) and (max-height: 480px) {
    .bg-modal-header {
        padding: 0.5rem 1rem;
    }

    .bg-modal-title {
        font-size: 0.9rem;
    }

    .bg-modal-close {
        width: 32px;
        height: 32px;
    }

    .bg-modal-close svg {
        width: 18px;
        height: 18px;
    }

    .bg-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .bg-tile {
        border-radius: 8px;
        border-width: 2px;
    }

    .bg-tile.selected::after {
        font-size: 1.5rem;
    }

    .bg-tile.none-bg {
        font-size: 0.6rem;
    }
}

/* ============================================
   SOLID COLOR PICKER
   ============================================ */

.bg-solid-section {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 1rem;
}

.bg-solid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0.5rem;
}

/* Toggle Switch - Touch Friendly */
.bg-solid-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

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

.bg-solid-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 28px;
    transition: 0.3s;
}

.bg-solid-slider::before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
}

.bg-solid-toggle input:checked+.bg-solid-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-solid-toggle input:checked+.bg-solid-slider::before {
    transform: translateX(22px);
}

/* Color Picker Container */
.bg-solid-picker {
    margin-top: 1rem;
    padding: 0 0.5rem;
}

/* Horizontal Color Slider - Rainbow Gradient */
.bg-color-slider {
    width: 100%;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(to right,
            hsl(0, 100%, 50%),
            hsl(30, 100%, 50%),
            hsl(60, 100%, 50%),
            hsl(90, 100%, 50%),
            hsl(120, 100%, 50%),
            hsl(150, 100%, 50%),
            hsl(180, 100%, 50%),
            hsl(210, 100%, 50%),
            hsl(240, 100%, 50%),
            hsl(270, 100%, 50%),
            hsl(300, 100%, 50%),
            hsl(330, 100%, 50%),
            hsl(360, 100%, 50%));
    position: relative;
    cursor: pointer;
    touch-action: none;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Slider Thumb */
.bg-color-thumb {
    position: absolute;
    top: -4px;
    width: 8px;
    height: 48px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    transform: translateX(-50%);
}

/* Color Preview */
.bg-color-preview {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin: 1rem auto 0;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    background: #000;
}

/* Kiosk optimizations for solid color picker */
@media (max-width: 800px) and (max-height: 480px) {
    .bg-solid-header {
        padding: 0 0.25rem;
    }

    .bg-solid-toggle {
        width: 44px;
        height: 24px;
    }

    .bg-solid-slider::before {
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
    }

    .bg-solid-toggle input:checked+.bg-solid-slider::before {
        transform: translateX(20px);
    }

    .bg-solid-picker {
        margin-top: 0.5rem;
    }

    .bg-color-slider {
        height: 36px;
    }

    .bg-color-thumb {
        height: 44px;
        top: -4px;
    }

    .bg-color-preview {
        width: 40px;
        height: 40px;
        margin: 0.5rem auto 0;
    }
}

/* ============================================
   AMBIENT SOUNDS MODAL - Sophisticated Redesign
   ============================================ */

.ambient-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 2000;
    display: none;
    flex-direction: column;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.ambient-modal.active {
    display: flex;
}

.ambient-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.ambient-modal-title {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.03em;
    margin: 0;
}

.ambient-modal-close {
    width: 32px;
    height: 32px;
    background: rgba(255, 100, 100, 0.2);
    border: none;
    border-radius: 8px;
    color: #ff6b6b;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.ambient-modal-close:hover,
.ambient-modal-close:active {
    background: rgba(255, 100, 100, 0.4);
    color: #ff4444;
}

.ambient-modal-close svg {
    width: 18px;
    height: 18px;
}

/* Grid */
.ambient-grid {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Two columns like before */
    gap: 1rem;
    /* Increased gap */
    align-content: start;
}

.ambient-group {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    /* Fallback */
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 150px;
    /* Fixed height for scrolling */
    display: flex;
    flex-direction: column;
}

/* Background Image Overlay with Low Opacity */
.ambient-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.25;
    /* Low opacity as requested */
    z-index: 0;
    transition: transform 0.3s ease;
}

.ambient-group:hover::before {
    transform: scale(1.05);
    /* Subtle zoom on hover */
}

/* Specific Backgrounds */
.ambient-group[data-category="Weather"]::before {
    background-image: url('../assets/ambient-bg/weather.webp');
}

.ambient-group[data-category="Nature"]::before {
    background-image: url('../assets/ambient-bg/nature.webp');
}

.ambient-group[data-category="Lifestyle"]::before {
    background-image: url('../assets/ambient-bg/lifestyle.webp');
}

.ambient-group[data-category="Interior"]::before {
    background-image: url('../assets/ambient-bg/interior.webp');
}

.ambient-group[data-category="Focus"]::before {
    background-image: url('../assets/ambient-bg/focus.webp');
}

.ambient-group[data-category="Niche"]::before {
    background-image: url('../assets/ambient-bg/niche.webp');
}

.ambient-category {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.5rem 0 0.75rem;
    position: relative;
    z-index: 1;
    /* Above background */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.5rem;
    flex-shrink: 0;
    /* Keep header visible */
}

.ambient-items-container {
    position: relative;
    z-index: 1;
    /* Above background */
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.25rem;
    /* Space for scrollbar */
}

/* Custom Scrollbar for Ambient Items */
.ambient-items-container::-webkit-scrollbar {
    width: 4px;
    display: block;
    /* Force display inside card */
}

.ambient-items-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.ambient-items-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.ambient-items-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.ambient-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0;
}

.ambient-emoji {
    font-size: 1.1rem;
    width: 1.5rem;
    text-align: center;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
}

.ambient-name {
    width: 80px;
    flex-shrink: 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    font-weight: 500;
}

.ambient-slider {
    flex: 1;
    min-width: 60px;
    max-width: 150px;
    height: 3px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    outline: none;
}

.ambient-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
}

/* Saved Mixes Section */
.ambient-saved-mixes {
    display: none;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    max-height: 60px;
    overflow-y: hidden;
}

.ambient-saved-mixes.active {
    display: block;
}

.ambient-mix-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
}

.ambient-mix-item {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    height: 32px;
    display: flex;
    overflow: hidden;
    transition: all 0.2s ease;
}

.ambient-mix-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.mix-load-area {
    flex: 1;
    background: none;
    border: none;
    padding: 0 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.7rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mix-delete-btn {
    width: 20px;
    background: none;
    border: none;
    color: rgba(255, 80, 80, 0.4);
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.mix-delete-btn:hover {
    color: rgba(255, 80, 80, 1);
    background: rgba(255, 80, 80, 0.1);
}

.ambient-empty-mixes {
    grid-column: 1 / -1;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
    padding: 0.25rem;
    font-style: italic;
}

/* Footer */
.ambient-modal-footer {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ambient-master-volume {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.ambient-master-volume input {
    flex: 1;
    height: 3px;
}

.ambient-controls {
    display: flex;
    gap: 0.4rem;
}

.ambient-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
}

.ambient-btn.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.ambient-btn-reset {
    color: #ff8080;
}

/* Sub-modal (Naming Dialog) */
.ambient-sub-modal {
    position: fixed;
    inset: 0;
    z-index: 2100;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
}

.ambient-sub-modal.active {
    display: flex;
}

.ambient-sub-content {
    background: #1a1f26;
    padding: 1.5rem;
    border-radius: 12px;
    width: 80%;
    max-width: 260px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ambient-sub-content h3 {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}

.ambient-sub-content input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.6rem;
    border-radius: 6px;
    color: #fff;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 0.85rem;
}

.ambient-sub-buttons {
    display: flex;
    gap: 0.5rem;
}

.ambient-sub-buttons button {
    flex: 1;
    padding: 0.6rem;
    border-radius: 6px;
    border: none;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.ambient-sub-buttons button.primary {
    background: #fff;
    color: #000;
}

/* Kiosk Optimizations */
@media (max-width: 800px) and (max-height: 480px) {
    .ambient-modal-header {
        padding: 0.3rem 0.75rem;
    }

    .ambient-grid {
        padding: 0.2rem 0.75rem;
    }

    .ambient-category {
        padding: 0.5rem 0 0.25rem;
        font-size: 0.6rem;
    }

    .ambient-item {
        gap: 0.5rem;
    }

    .ambient-emoji {
        font-size: 1rem;
    }

    .ambient-name {
        font-size: 0.75rem;
        width: 70px;
    }

    .ambient-slider {
        flex: 1;
        min-width: 50px;
        max-width: 100px;
    }
}

/* ============================================
   PROFILE BUTTON & MODAL (Kiosk Optimized)
   ============================================ */

/* Profile picture inside control button */
#user-profile-container .user-profile-pic {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

#user-profile-container .btn-tooltip {
    display: none;
}

/* Profile Modal Overrides for Kiosk */
@media (max-width: 800px) and (max-height: 480px) {
    .profile-modal-overlay {
        padding: 1rem;
    }

    .profile-modal-overlay {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background-color: rgba(0, 0, 0, 0.5) !important;
    }

    .profile-modal-content {
        max-width: 340px !important;
        max-height: 95vh !important;
        overflow-y: auto !important;
        background: rgba(26, 31, 38, 0.7) !important;
        backdrop-filter: blur(6px) !important;
        -webkit-backdrop-filter: blur(6px) !important;
        border-radius: 12px;
        padding: 1rem;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, sans-serif !important;
    }

    .profile-modal-content::-webkit-scrollbar {
        display: none !important;
    }

    .profile-modal-body {
        padding: 12px !important;
    }

    .profile-modal-header {
        padding: 10px 1rem !important;
    }

    .profile-modal-header h3 {
        font-size: 0.9rem !important;
        margin: 0 !important;
    }

    .profile-avatar-img {
        width: 48px;
        height: 48px;
    }

    .profile-name {
        font-size: 0.9rem;
    }

    .profile-email {
        font-size: 0.75rem;
    }

    .profile-focus-id {
        font-size: 0.7rem;
    }

    .focus-id-input {
        font-size: 0.7rem;
        padding: 0.3rem;
    }

    .profile-sign-out-btn,
    .profile-sign-in-btn {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }

    .sign-in-icon svg {
        width: 32px;
        height: 32px;
    }

    .profile-sign-in h4 {
        font-size: 0.9rem;
    }

    .profile-sign-in p {
        font-size: 0.75rem;
    }
}

/* Colon Blink Animation */
.colon-blink {
    animation: colonBlink 1s step-end infinite;
}

@keyframes colonBlink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* ============================================
   SETTINGS MODAL (Full-screen, Kiosk Optimized)
   ============================================ */

.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98);
    z-index: 2000;
    display: none;
    flex-direction: column;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.settings-modal.active {
    display: flex;
}

.settings-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.settings-modal-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
}

.settings-modal-close {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-modal-close svg {
    width: 18px;
    height: 18px;
}

.settings-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.settings-section {
    margin-bottom: 2rem;
}

.settings-rows-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 2rem;
}

.settings-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-badge-experimental {
    font-size: 0.55rem;
    font-weight: 600;
    color: rgba(255, 200, 50, 0.9);
    background: rgba(255, 200, 50, 0.15);
    border: 1px solid rgba(255, 200, 50, 0.3);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.settings-row label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-right: 1rem;
}

/* Settings Row with Icon and Hint (Health Reminders) */
.settings-section-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin: -0.5rem 0 1rem 0;
}

.settings-row-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-row-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    flex-shrink: 0;
}

.settings-row-info label {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.settings-row-hint {
    display: block;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
    margin-top: 2px;
}

.settings-select {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    color: #fff;
    font-size: 0.8rem;
    min-width: 140px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 16px;
    padding-right: 2rem;
}

.settings-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.12);
}

.settings-select option {
    background: #1a1f26;
    color: #fff;
}

.settings-color-picker {
    width: 60px;
    height: 32px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 2px;
    cursor: pointer;
    appearance: none;
}

.settings-color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.settings-color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.settings-color-picker:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Toggle Switch Styles */
.settings-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

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

.settings-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked+.settings-slider {
    background-color: #4285f4;
}

input:focus+.settings-slider {
    box-shadow: 0 0 1px #4285f4;
}

input:checked+.settings-slider:before {
    transform: translateX(24px);
}

.settings-slider.round {
    border-radius: 34px;
}

.settings-slider.round:before {
    border-radius: 50%;
}

/* Kiosk Optimizations (800x480) */
@media (max-width: 800px) and (max-height: 480px) {
    .settings-modal-header {
        padding: 0.3rem 0.75rem;
    }

    .settings-modal-title {
        font-size: 0.8rem;
    }

    .settings-modal-body {
        padding: 0.5rem 0.75rem;
    }

    .settings-section-title {
        font-size: 0.6rem;
    }

    .settings-row {
        padding: 0.4rem 0;
    }

    .settings-row label {
        font-size: 0.75rem;
    }

    .settings-select {
        min-width: 120px;
        padding: 0.4rem 0.5rem;
        font-size: 0.7rem;
    }
}

/* ============================================
   POMODORO STATE COLORS
   ============================================ */

/* Work state - Red */
.timer-display.pomodoro-work .digit-group,
.timer-display.pomodoro-work .colon {
    color: #ff5252 !important;
    text-shadow: 0 0 30px rgba(255, 82, 82, 0.5),
        0 0 60px rgba(255, 82, 82, 0.3);
}

/* Short break state - Green */
.timer-display.pomodoro-break .digit-group,
.timer-display.pomodoro-break .colon {
    color: #4caf50 !important;
    text-shadow: 0 0 30px rgba(76, 175, 80, 0.5),
        0 0 60px rgba(76, 175, 80, 0.3);
}

/* Long break state - Blue */
.timer-display.pomodoro-long-break .digit-group,
.timer-display.pomodoro-long-break .colon {
    color: #2196f3 !important;
    text-shadow: 0 0 30px rgba(33, 150, 243, 0.5),
        0 0 60px rgba(33, 150, 243, 0.3);
}

/* ============================================
   POMODORO MODAL (Cycle Complete Dialog)
   ============================================ */

.pomodoro-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(10px);
}

.pomodoro-modal-content {
    background: linear-gradient(145deg, rgba(30, 30, 35, 0.98), rgba(20, 20, 25, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem 2.5rem;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.pomodoro-modal-content h2 {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    color: #4caf50;
    margin-bottom: 0.5rem;
}

.pomodoro-modal-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.pomodoro-modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.pomodoro-modal .btn-primary,
.pomodoro-modal .btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.pomodoro-modal .btn-primary {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    color: white;
}

.pomodoro-modal .btn-primary:hover {
    background: linear-gradient(135deg, #66bb6a, #388e3c);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.pomodoro-modal .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pomodoro-modal .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Kiosk optimizations for Pomodoro modal */
@media (max-width: 800px) and (max-height: 480px) {
    .pomodoro-modal-content {
        padding: 1.25rem 1.5rem;
        max-width: 90%;
    }

    .pomodoro-modal-content h2 {
        font-size: 1.1rem;
    }

    .pomodoro-modal-content p {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .pomodoro-modal .btn-primary,
    .pomodoro-modal .btn-secondary {
        padding: 0.6rem 1rem;
        font-size: 0.75rem;
    }
}

/* ============================================
   BREAK MODAL STYLES
   ============================================ */

.break-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(10px);
}

.break-modal-content {
    position: relative;
    background: linear-gradient(145deg, rgba(30, 30, 35, 0.98), rgba(20, 20, 25, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    max-width: 380px;
    min-width: 320px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
}

.break-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.break-modal-close:hover,
.break-modal-close:active {
    background: rgba(255, 100, 100, 0.3);
    border-color: rgba(255, 100, 100, 0.4);
    color: #ff6b6b;
}

.break-modal-close svg {
    width: 14px;
    height: 14px;
}

.break-modal-content h2 {
    font-size: 1.4rem;
    margin: 0 0 0.5rem 0;
    color: #fff;
    font-weight: 600;
    padding-right: 30px;
}

.break-modal-subtitle {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.break-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 1rem 0;
}

.break-btn-primary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.break-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.break-btn-secondary {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 82, 82, 0.15);
    border: 1px solid rgba(255, 82, 82, 0.4);
    border-radius: 8px;
    color: #ff5252;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.break-btn-secondary:hover {
    background: rgba(255, 82, 82, 0.25);
    border-color: rgba(255, 82, 82, 0.6);
}

#break-duration-input {
    width: 50px;
    padding: 0.35rem 0.5rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: white;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
}

#break-duration-input:focus {
    outline: none;
    border-color: rgba(76, 175, 80, 0.6);
}

.key-hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    font-family: monospace;
}

.break-countdown {
    padding: 1rem 0;
}

.break-timer {
    font-family: 'Orbitron', monospace;
    font-size: 3.5rem;
    font-weight: 700;
    color: #4caf50;
    text-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
    margin: 1rem 0;
}

.break-timer-message {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

/* Kiosk optimizations for Break Modal */
@media (max-width: 800px) and (max-height: 480px) {
    .break-modal-content {
        padding: 1.25rem 1.5rem;
        max-width: 90%;
    }

    .break-modal-content h2 {
        font-size: 1.1rem;
    }

    .break-timer {
        font-size: 2.5rem;
    }

    .break-btn-primary,
    .break-btn-secondary {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}