/* ============================================
   LOFI POMODORO — COMPLETE STYLES
   ============================================ */

:root {
    --amber: #f4a636;
    --amber-glow: rgba(244, 166, 54, 0.6);
    --warm-light: rgba(255, 200, 100, 0.3);
    --glass-bg: rgba(15, 12, 25, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: 24px;
    --accent: #e8a849;
    --accent-2: #ff6b6b;
    --green: #4ade80;
    --green-glow: rgba(74, 222, 128, 0.5);
    --text: #f0ece4;
    --text-dim: rgba(240, 236, 228, 0.5);
    --text-muted: rgba(240, 236, 228, 0.3);
    --panel-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    --surface: rgba(255, 255, 255, 0.04);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --surface-active: rgba(255, 255, 255, 0.12);
    --danger: #ff4757;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    background: #0a0812;
    cursor: default;
    color: var(--text);
}

/* ============================================
   INTRO SCREEN
   ============================================ */

#intro-screen {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: radial-gradient(ellipse at center, #1a1425 0%, #0a0812 60%, #050310 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

#intro-screen.fade-out {
    opacity: 0;
    transform: scale(1.05);
    pointer-events: none;
}

#intro-screen.gone {
    display: none;
}

#intro-particles {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(1px 1px at 20% 30%, rgba(255,220,160,0.4), transparent),
        radial-gradient(1px 1px at 40% 70%, rgba(255,220,160,0.3), transparent),
        radial-gradient(1px 1px at 60% 20%, rgba(255,220,160,0.3), transparent),
        radial-gradient(1px 1px at 80% 60%, rgba(255,220,160,0.2), transparent),
        radial-gradient(1.5px 1.5px at 15% 80%, rgba(255,220,160,0.35), transparent),
        radial-gradient(1px 1px at 75% 45%, rgba(255,220,160,0.25), transparent),
        radial-gradient(1px 1px at 50% 90%, rgba(255,220,160,0.3), transparent),
        radial-gradient(1.5px 1.5px at 90% 15%, rgba(255,220,160,0.2), transparent);
    animation: introParticlesDrift 20s linear infinite;
}

@keyframes introParticlesDrift {
    0% { transform: translateY(0); }
    100% { transform: translateY(-20px); }
}

#intro-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    z-index: 1;
}

#hourglass-wrapper {
    position: relative;
    width: 140px;
    height: 240px;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: hourglassFloat 4s ease-in-out infinite;
}

#hourglass-wrapper:hover {
    transform: scale(1.08);
}

@keyframes hourglassFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

#hourglass-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px rgba(244, 166, 54, 0.2));
}

.sand-stream {
    animation: sandFlow 1.2s ease-in-out infinite;
}

@keyframes sandFlow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.2; }
}

#hourglass-glow {
    position: absolute;
    inset: -40px;
    background: radial-gradient(ellipse at center, rgba(244, 166, 54, 0.15) 0%, transparent 70%);
    animation: glowPulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* Hourglass flip animation */
#hourglass-wrapper.flipping {
    animation: hourglassFlip 2.5s cubic-bezier(0.45, 0, 0.15, 1) forwards;
}

@keyframes hourglassFlip {
    0% { transform: rotateX(0deg) scale(1); }
    50% { transform: rotateX(90deg) scale(1.1); }
    100% { transform: rotateX(180deg) scale(1.2); filter: drop-shadow(0 0 40px rgba(244, 166, 54, 0.5)); }
}

#intro-text {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--amber);
    opacity: 0.7;
    animation: textPulse 2.5s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.9; }
}

#intro-subtitle {
    font-family: 'Orbitron', monospace;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 6px;
    text-transform: uppercase;
    opacity: 0.3;
}

/* ============================================
   BACKGROUND LAYERS
   ============================================ */

#bg-container {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

#bg-image-layer {
    position: absolute;
    inset: -20px;
    width: calc(100% + 40px);
    height: calc(100% + 40px);
    background: url('Cozy Study Corner.png') center center / cover no-repeat;
    animation: bgBreathe 10s ease-in-out infinite;
    will-change: transform;
    transition: opacity 1.5s ease;
}

@keyframes bgBreathe {
    0%, 100% { transform: scale(1) translate(0, 0); }
    33% { transform: scale(1.01) translate(-2px, -1px); }
    66% { transform: scale(1.015) translate(1px, -2px); }
}

#bg-video-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    transition: opacity 1.5s ease;
}

#bg-video-layer.active {
    display: block;
}

#bg-youtube-layer {
    position: absolute;
    inset: 0;
    display: none;
    overflow: hidden;
    transition: opacity 1.5s ease;
}

#bg-youtube-layer.active {
    display: block;
}

#bg-youtube-layer iframe {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 177.78vh !important;
    height: 100vh !important;
    min-width: 100vw !important;
    min-height: 56.25vw !important;
    transform: translate(-50%, -50%) !important;
    border: none !important;
    pointer-events: none;
}

#bg-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

/* ============================================
   PARTICLES & VIGNETTE
   ============================================ */

#particle-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

#vignette {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(5, 3, 15, 0.5) 100%);
    pointer-events: none;
    z-index: 3;
}

/* ============================================
   TIMER WIDGET — POSITIONABLE
   ============================================ */

#timer-widget {
    position: fixed;
    z-index: 50;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

#timer-widget.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9) translateY(20px);
}

/* Position system */
#timer-widget[data-position="top-left"] { top: 4%; left: 4%; }
#timer-widget[data-position="top-center"] { top: 4%; left: 50%; transform: translateX(-50%); }
#timer-widget[data-position="top-right"] { top: 4%; right: 4%; }
#timer-widget[data-position="center-left"] { top: 50%; left: 4%; transform: translateY(-50%); }
#timer-widget[data-position="center-center"] { top: 50%; left: 50%; transform: translate(-50%, -50%); }
#timer-widget[data-position="center-right"] { top: 50%; right: 4%; transform: translateY(-50%); }
#timer-widget[data-position="bottom-left"] { bottom: 4%; left: 4%; }
#timer-widget[data-position="bottom-center"] { bottom: 4%; left: 50%; transform: translateX(-50%); }
#timer-widget[data-position="bottom-right"] { bottom: 4%; right: 4%; }

#timer-widget.hidden[data-position="top-center"],
#timer-widget.hidden[data-position="center-center"],
#timer-widget.hidden[data-position="bottom-center"] {
    transform: translateX(-50%) scale(0.9);
}
#timer-widget.hidden[data-position="center-left"],
#timer-widget.hidden[data-position="center-right"] {
    transform: translateY(-50%) scale(0.9);
}

/* Size system */
#timer-widget[data-size="small"] .timer-glass { transform: scale(0.75); }
#timer-widget[data-size="medium"] .timer-glass { transform: scale(1); }
#timer-widget[data-size="large"] .timer-glass { transform: scale(1.2); }

.timer-glass {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 36px 46px;
    min-width: 320px;
    text-align: center;
    box-shadow: var(--panel-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform-origin: center center;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Timer Mode Label */
#timer-mode-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
    text-shadow: 0 0 20px var(--amber-glow);
}

/* Timer Display */
#timer-display {
    font-family: 'Orbitron', monospace;
    font-size: 4.5rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
    margin: 14px 0;
    position: relative;
    z-index: 2;
    text-shadow: 0 0 30px rgba(244, 166, 54, 0.3);
}

.timer-colon {
    animation: colonBlink 1s step-end infinite;
    margin: 0 4px;
}

@keyframes colonBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Progress Ring */
#timer-progress-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    width: 200px;
    height: 200px;
    z-index: 1;
    opacity: 0.35;
    pointer-events: none;
}

#timer-progress-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 3;
}

.progress-fg {
    fill: none;
    stroke: var(--accent);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 565.48;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
    filter: drop-shadow(0 0 6px var(--amber-glow));
}

/* Timer Controls */
#timer-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 18px;
    position: relative;
    z-index: 5;
}

.control-btn {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.control-btn:hover {
    background: var(--surface-hover);
    border-color: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

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

.control-btn.primary {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent), #d4903a);
    border: none;
    box-shadow: 0 4px 20px rgba(244, 166, 54, 0.3);
}

.control-btn.primary:hover {
    box-shadow: 0 6px 30px rgba(244, 166, 54, 0.5);
    transform: scale(1.12);
}

/* Session Info */
#session-info {
    margin-top: 20px;
    position: relative;
    z-index: 5;
}

#session-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 6px;
}

.session-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.3s;
}

.session-dot.completed {
    background: var(--accent);
    box-shadow: 0 0 8px var(--amber-glow);
}

.session-dot.current {
    background: var(--accent);
    animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 4px var(--amber-glow); }
    50% { transform: scale(1.3); box-shadow: 0 0 12px var(--amber-glow); }
}

#session-count {
    font-size: 0.68rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}

/* Mode Switcher */
#mode-switcher {
    display: flex;
    gap: 4px;
    margin-top: 18px;
    background: var(--surface);
    border-radius: 12px;
    padding: 4px;
    position: relative;
    z-index: 5;
}

.mode-btn {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 0.5px;
}

.mode-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.mode-btn.active {
    color: var(--text);
    background: var(--surface-active);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ============================================
   BREAK MODE OVERRIDES
   ============================================ */

body.break-mode .progress-fg {
    stroke: var(--green);
    filter: drop-shadow(0 0 6px var(--green-glow));
}

body.break-mode #timer-mode-label {
    color: var(--green);
    text-shadow: 0 0 20px var(--green-glow);
}

body.break-mode .control-btn.primary {
    background: linear-gradient(135deg, var(--green), #22c55e);
    box-shadow: 0 4px 20px rgba(74, 222, 128, 0.3);
}

body.break-mode .session-dot.current {
    background: var(--green);
    box-shadow: 0 0 8px var(--green-glow);
}

/* ============================================
   SETTINGS BUTTON
   ============================================ */

#settings-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 60;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#settings-btn:hover {
    color: var(--text);
    background: rgba(30, 25, 50, 0.8);
    transform: scale(1.1) rotate(30deg);
    border-color: rgba(255, 255, 255, 0.15);
}

/* ============================================
   SETTINGS MODAL
   ============================================ */

#settings-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease;
}

#settings-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.settings-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.settings-container {
    position: relative;
    background: rgba(18, 14, 28, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    width: 680px;
    max-width: 92vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    animation: settingsSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

@keyframes settingsSlideIn {
    from { transform: translateY(30px) scale(0.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

#settings-close {
    position: absolute;
    top: 16px;
    right: 20px;
    z-index: 5;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 18px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

#settings-close:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.settings-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 340px;
}

/* Settings Navigation */
.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 24px 16px;
    min-width: 160px;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.nav-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    border-radius: 24px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.nav-btn:hover {
    color: var(--text);
    background: var(--surface);
}

.nav-btn.active {
    color: var(--text);
    background: var(--surface-active);
    border-color: rgba(255, 255, 255, 0.06);
}

/* Settings Content */
.settings-content {
    flex: 1;
    padding: 28px 32px;
    overflow-y: auto;
}

.settings-content::-webkit-scrollbar {
    width: 4px;
}
.settings-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: tabFadeIn 0.3s ease;
}

@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Timer Inputs */
.timer-inputs-row {
    display: flex;
    gap: 20px;
    margin-bottom: 28px;
}

.timer-input-group {
    flex: 1;
}

.timer-input-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.timer-input-group input[type="number"] {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    text-align: center;
    outline: none;
    transition: border-color 0.2s;
}

.timer-input-group input[type="number"]:focus {
    border-color: var(--accent);
}

.input-unit {
    display: block;
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 4px;
    text-align: center;
}

/* Toggle Switch */
.setting-row {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text);
    user-select: none;
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-switch {
    position: relative;
    width: 42px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    flex-shrink: 0;
    transition: background 0.3s;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: var(--text-dim);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toggle-label input:checked + .toggle-switch {
    background: var(--accent);
}

.toggle-label input:checked + .toggle-switch::after {
    left: 21px;
    background: #fff;
}

/* Background Section */
.bg-section {
    margin-bottom: 28px;
}

.bg-section h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text);
}

.bg-options {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bg-option-card {
    display: flex;
    gap: 14px;
    align-items: center;
}

.bg-preview {
    width: 100px;
    height: 60px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

.bg-preview-placeholder {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.bg-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-btn:hover {
    background: var(--surface-hover);
    border-color: rgba(255, 255, 255, 0.15);
}

.reset-bg-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.reset-bg-btn:hover {
    color: var(--accent);
}

.bg-youtube-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bg-youtube-section label {
    font-size: 0.78rem;
    color: var(--text-dim);
    font-weight: 500;
}

.youtube-input-row {
    display: flex;
    gap: 8px;
}

.youtube-input-row input[type="url"] {
    flex: 1;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    outline: none;
    transition: border-color 0.2s;
}

.youtube-input-row input:focus {
    border-color: var(--accent);
}

.youtube-input-row input::placeholder {
    color: var(--text-muted);
}

.apply-btn {
    width: 100%;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s;
}

.apply-btn:hover {
    background: #f0b856;
    transform: translateY(-1px);
}

/* YouTube Time Row */
.yt-time-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.yt-time-row label {
    font-weight: 500;
    white-space: nowrap;
}

.time-input {
    width: 52px;
    padding: 5px 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    outline: none;
    transition: border-color 0.2s;
}

.time-input:focus {
    border-color: var(--accent);
}

/* Layout Section */
.layout-section {
    margin-bottom: 30px;
}

.layout-section h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.layout-hint {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.position-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: 156px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.pos-cell {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: var(--surface);
    border: 2px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.pos-cell:hover {
    background: var(--surface-hover);
    border-color: rgba(255, 255, 255, 0.15);
}

.pos-cell.active {
    background: rgba(232, 168, 73, 0.2);
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(232, 168, 73, 0.2);
}

.pos-cell.active::after {
    content: '';
    position: absolute;
    inset: 30%;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--amber-glow);
}

/* Size Slider */
.size-slider-container {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
}

.size-label {
    font-size: 0.72rem;
    color: var(--text-dim);
    min-width: 40px;
}

#timer-size-slider {
    flex: 1;
    max-width: 200px;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
}

#timer-size-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(244, 166, 54, 0.3);
    transition: transform 0.2s;
}

#timer-size-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

#size-value-label {
    font-size: 0.78rem;
    color: var(--accent);
    font-weight: 600;
    margin-top: 10px;
}

/* General Actions */
.general-actions {
    margin-top: 28px;
}

.danger-btn {
    padding: 10px 24px;
    background: transparent;
    border: 1px solid var(--danger);
    border-radius: 10px;
    color: var(--danger);
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.danger-btn:hover {
    background: rgba(255, 71, 87, 0.1);
}

/* Settings Footer */
.settings-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer-btn {
    padding: 10px 28px;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.footer-btn.cancel {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-dim);
}

.footer-btn.cancel:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text);
}

.footer-btn.save {
    background: var(--text);
    color: #1a1a1a;
}

.footer-btn.save:hover {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.15);
}

/* ============================================
   SIDE PANEL (Stats, Notes, Todo)
   ============================================ */

.panel-toggle-btn {
    position: fixed;
    top: 20px;
    right: 80px;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--glass-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text-dim);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.panel-toggle-btn:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

#side-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 92vw;
    height: 100%;
    z-index: 150;
    background: rgba(18, 14, 28, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

#side-panel.hidden {
    transform: translateX(100%);
    pointer-events: none;
}

.side-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.side-panel-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

#panel-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 18px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

#panel-close:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.side-panel-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.panel-tab {
    flex: 1;
    padding: 8px 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-dim);
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.panel-tab:hover {
    color: var(--text);
    background: var(--surface);
}

.panel-tab.active {
    color: var(--text);
    background: var(--surface-active);
}

.side-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.panel-page {
    display: none;
}

.panel-page.active {
    display: block;
    animation: tabFadeIn 0.25s ease;
}

/* Stats */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
}

.stat-card .stat-value {
    display: block;
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-size: 0.68rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.82rem;
}

.stat-row .stat-label {
    color: var(--text-dim);
}

.stat-row .stat-value {
    color: var(--text);
    font-weight: 600;
}

.panel-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 10px;
}

/* Garden */
.garden-header {
    margin-bottom: 12px;
}

.garden-header h3 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    color: var(--text);
}

.garden-container {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 8px;
    padding: 14px;
    background: rgba(12, 10, 20, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    min-height: 250px;
    max-height: 400px;
    overflow-y: auto;
}

.plant-item {
    font-size: 1.8rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: plantGrow 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform: scale(0);
    opacity: 0;
}

@keyframes plantGrow {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Notes */
.notes-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

.notes-select {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.75rem;
    outline: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}

.notes-select:focus, .notes-select:hover {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.1);
}

.notes-select option {
    background: #1a1425;
    color: var(--text);
}

#notes-content {
    width: 100%;
    min-height: 180px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

#notes-content:focus {
    border-color: var(--accent);
}

#notes-content::placeholder {
    color: var(--text-muted);
}

/* Todo */
.todo-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

#todo-input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
}

#todo-input:focus {
    border-color: var(--accent);
}

#todo-input::placeholder {
    color: var(--text-muted);
}

#todo-add {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent);
    border: none;
    color: #1a1a1a;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

#todo-add:hover {
    background: #f0b856;
    transform: scale(1.05);
}

#todo-list {
    list-style: none;
}

#todo-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 6px;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    font-size: 0.85rem;
    color: var(--text);
    transition: opacity 0.2s;
}

#todo-list li.done {
    opacity: 0.6;
}

#todo-list li.done .todo-text {
    text-decoration: line-through;
    color: var(--text-dim);
}

#todo-list .todo-check {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

#todo-list li.done .todo-check {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

.todo-text {
    flex: 1;
    word-break: break-word;
}

.todo-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
    line-height: 1;
    transition: color 0.2s;
}

.todo-delete:hover {
    color: var(--danger);
}

/* ============================================
   VIDEO CONTROL BAR
   ============================================ */

.video-control-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 18px 10px 14px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: opacity 0.35s, transform 0.35s;
}

.video-control-bar.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(20px);
}

.video-bar-drag {
    color: var(--text-muted);
    font-size: 0.7rem;
    letter-spacing: -2px;
    cursor: grab;
    user-select: none;
}

.video-bar-drag:active {
    cursor: grabbing;
}

.video-bar-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: 500;
    min-width: 90px;
}

.video-bar-volume {
    display: flex;
    align-items: center;
    gap: 8px;
}

#video-mute-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

#video-mute-btn:hover {
    color: var(--text);
    background: var(--surface-hover);
}

#video-volume-slider {
    width: 90px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    outline: none;
}

#video-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 0 6px rgba(244, 166, 54, 0.4);
    transition: transform 0.2s;
}

#video-volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.video-play-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

#video-play-pause-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

#video-play-pause-btn:hover {
    color: var(--text);
    background: var(--surface-hover);
}

.video-seek-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

#video-seek-min {
    width: 46px;
    padding: 4px 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.75rem;
    text-align: center;
    outline: none;
}

#video-seek-min:focus {
    border-color: var(--accent);
}

#video-seek-btn {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

#video-seek-btn:hover {
    background: var(--surface-hover);
    border-color: var(--accent);
}

.widget-minimize {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.widget-minimize:hover {
    color: var(--text);
    background: var(--surface-hover);
}

#timer-minimize-btn {
    position: absolute;
    top: 10px;
    right: 14px;
}

/* Collapsed States */
#timer-widget.collapsed .timer-glass {
    padding: 12px 20px;
    min-width: auto;
    border-radius: 30px;
    cursor: pointer;
    background: rgba(15, 12, 25, 0.8);
}

#timer-widget.collapsed #timer-mode-label,
#timer-widget.collapsed #timer-progress-ring,
#timer-widget.collapsed #timer-controls,
#timer-widget.collapsed #session-info,
#timer-widget.collapsed #mode-switcher,
#timer-widget.collapsed #timer-minimize-btn {
    display: none;
}

#timer-widget.collapsed #timer-display {
    font-size: 1.5rem;
    margin: 0;
    text-shadow: none;
}

#video-control-bar.collapsed {
    padding: 10px;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    justify-content: center;
    cursor: pointer;
    background: rgba(15, 12, 25, 0.8);
}

#video-control-bar.collapsed > *:not(#video-restore-icon) {
    display: none;
}

#video-control-bar.collapsed #video-restore-icon {
    display: block;
    color: var(--text);
}

#video-bar-close {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-dim);
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

#video-bar-close:hover {
    background: rgba(255, 71, 87, 0.2);
    border-color: var(--danger);
    color: var(--danger);
}

/* ============================================
   NOTIFICATION FLASH
   ============================================ */

#notification-flash {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, rgba(244, 166, 54, 0.15), transparent 70%);
    z-index: 300;
    pointer-events: none;
    animation: notifFlash 0.5s ease-out;
}

#notification-flash.hidden {
    display: none;
}

@keyframes notifFlash {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    #timer-display {
        font-size: 3.2rem;
    }

    .timer-glass {
        padding: 28px 28px;
        min-width: 280px;
        border-radius: 22px;
    }

    .settings-container {
        width: 95vw;
        max-height: 90vh;
    }

    .settings-body {
        flex-direction: column;
    }

    .settings-nav {
        flex-direction: row;
        min-width: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
        padding: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-btn {
        padding: 8px 14px;
        font-size: 0.78rem;
        white-space: nowrap;
    }

    .settings-content {
        padding: 20px;
    }

    .timer-inputs-row {
        flex-direction: column;
        gap: 14px;
    }

    .timer-input-group input[type="number"] {
        font-size: 1.1rem;
    }

    #hourglass-wrapper {
        width: 110px;
        height: 190px;
    }

    #intro-subtitle {
        font-size: 1.2rem;
        letter-spacing: 4px;
    }

    #settings-btn {
        bottom: 16px;
        right: 16px;
        width: 42px;
        height: 42px;
    }
}

/* ============================================
   AUTH SCREEN
   ============================================ */

#auth-screen {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: radial-gradient(ellipse at center, #1a1425 0%, #0a0812 60%, #050310 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

#auth-screen.fade-out {
    opacity: 0;
    transform: scale(1.04);
    pointer-events: none;
}

#auth-screen.gone {
    display: none;
}

#auth-particles {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(1px 1px at 20% 30%, rgba(255,220,160,0.4), transparent),
        radial-gradient(1px 1px at 40% 70%, rgba(255,220,160,0.3), transparent),
        radial-gradient(1px 1px at 60% 20%, rgba(255,220,160,0.3), transparent),
        radial-gradient(1px 1px at 80% 60%, rgba(255,220,160,0.2), transparent),
        radial-gradient(1.5px 1.5px at 15% 80%, rgba(255,220,160,0.35), transparent),
        radial-gradient(1px 1px at 75% 45%, rgba(255,220,160,0.25), transparent),
        radial-gradient(1px 1px at 50% 90%, rgba(255,220,160,0.3), transparent),
        radial-gradient(1.5px 1.5px at 90% 15%, rgba(255,220,160,0.2), transparent);
    animation: introParticlesDrift 20s linear infinite;
    pointer-events: none;
}

#auth-card {
    position: relative;
    z-index: 1;
    background: rgba(15, 12, 25, 0.82);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 26px;
    padding: 42px 46px;
    width: 420px;
    max-width: 93vw;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(244, 166, 54, 0.06);
    animation: authCardIn 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authCardIn {
    from { opacity: 0; transform: translateY(28px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

#auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    margin-bottom: 30px;
}

#auth-logo span {
    font-family: 'Orbitron', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 4px;
    text-transform: uppercase;
}

#auth-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 13px;
    padding: 4px;
    margin-bottom: 26px;
    gap: 4px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-dim);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
}

.auth-tab:hover {
    color: var(--text);
}

.auth-tab.active {
    background: rgba(244, 166, 54, 0.14);
    color: var(--amber);
    box-shadow: 0 0 0 1px rgba(244, 166, 54, 0.22);
}

.auth-form {
    display: none;
    flex-direction: column;
    gap: 16px;
}

.auth-form.active {
    display: flex;
    animation: tabFadeIn 0.25s ease;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.auth-field label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-dim);
    letter-spacing: 0.4px;
}

.auth-field input {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.auth-field input:focus {
    border-color: rgba(244, 166, 54, 0.55);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 3px rgba(244, 166, 54, 0.08);
}

.auth-field input::placeholder {
    color: var(--text-muted);
}

.auth-error {
    min-height: 16px;
    font-size: 0.77rem;
    color: #ff6b6b;
    padding: 0 2px;
}

.auth-submit {
    margin-top: 6px;
    padding: 13px;
    background: linear-gradient(135deg, var(--accent), #c8882e);
    border: none;
    border-radius: 12px;
    color: #1a1100;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 20px rgba(244, 166, 54, 0.28);
    width: 100%;
    letter-spacing: 0.3px;
}

.auth-submit:hover:not(:disabled) {
    box-shadow: 0 6px 30px rgba(244, 166, 54, 0.45);
    transform: translateY(-1px);
}

.auth-submit:active:not(:disabled) {
    transform: translateY(0);
}

.auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loader {
    letter-spacing: 5px;
    animation: loaderPulse 0.8s ease-in-out infinite;
    display: inline-block;
}

.btn-loader.hidden,
.btn-text.hidden {
    display: none;
}

@keyframes loaderPulse {
    0%, 100% { opacity: 0.35; }
    50%       { opacity: 1;    }
}

.auth-footer-note {
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 22px;
}

/* ============================================
   USER PROFILE PILL
   ============================================ */

#user-profile {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--glass-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 6px 14px 6px 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#user-profile.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
}

#user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #c8882e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
    color: #1a1100;
    flex-shrink: 0;
}

#user-displayname {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#logout-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 3px 2px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    margin-left: 2px;
}

#logout-btn:hover {
    color: var(--accent);
}

/* ============================================
   AUTH RESPONSIVE
   ============================================ */

@media (max-width: 480px) {
    #auth-card {
        padding: 30px 24px;
        border-radius: 20px;
    }

    #auth-logo span {
        font-size: 1.05rem;
        letter-spacing: 3px;
    }
}

@media (max-width: 480px) {
    #timer-display {
        font-size: 2.6rem;
    }

    .timer-glass {
        padding: 22px 18px;
        min-width: 250px;
    }

    .bg-option-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .bg-preview {
        width: 100%;
        height: 80px;
    }

    .youtube-input-row {
        flex-direction: column;
    }
}
