/* ==========================================================================
   FocusFlow - Premium Aesthetics CSS Design System
   ========================================================================== */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600;800&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Fonts */
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Theme-specific gradients & variables (Dynamically overridden by JS themes) */
    --theme-bg-1: #060608;
    --theme-bg-2: #0b0f19;
    --theme-bg-3: #110e2c;
    
    /* Midnight Space Theme (Default) */
    --accent: 139, 92, 246; /* Violet #8b5cf6 */
    --accent-glow: rgba(139, 92, 246, 0.25);
    --accent-secondary: 59, 130, 246; /* Blue #3b82f6 */
    
    /* Glassmorphism Variables */
    --glass-bg: rgba(10, 10, 16, 0.52);
    --glass-border: rgba(255, 255, 255, 0.07);
    --glass-border-glow: rgba(139, 92, 246, 0.35);
    --glass-blur: 28px;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    /* Layout Constants */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --header-height: 70px;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Custom User adjustments */
    --user-transparency: 0.45;
    --user-blur: 24px;
    --eye-care-opacity: 0;
}

/* ==========================================================================
   Base Elements & Layout
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

body {
    font-family: var(--font-sans);
    background-color: var(--theme-bg-1);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
    line-height: 1.25;
}

/* Ambient Moving Gradient Background */
.bg-mesh {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(135deg, var(--theme-bg-1), var(--theme-bg-2), var(--theme-bg-3));
    background-size: 400% 400%;
    animation: gradientShift 25s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50% }
    50% { background-position: 100% 50% }
    100% { background-position: 0% 50% }
}

/* Ambient Floating Particles Container */
#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Amber Eye-care Filter Overlay */
#eye-care-filter {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(251, 191, 36, 0.15); /* Warm amber tint */
    pointer-events: none;
    z-index: 9999;
    opacity: var(--eye-care-opacity);
    transition: opacity 0.5s ease;
}

/* Dynamic Lighting Time-based Overlay */
#dynamic-lighting-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    background-color: var(--dynamic-ambient-light, transparent);
    transition: background-color 2s ease;
    mix-blend-mode: overlay;
}

/* App Container */
.app-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* ==========================================================================
   Glassmorphic Design Utility Classes
   ========================================================================== */
.glass-panel {
    background: linear-gradient(145deg, rgba(10, 10, 16, var(--user-transparency)), rgba(5, 5, 8, calc(var(--user-transparency) * 1.12)));
    backdrop-filter: blur(var(--user-blur)) saturate(185%);
    -webkit-backdrop-filter: blur(var(--user-blur)) saturate(185%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 20px 50px 0 rgba(0, 0, 0, 0.45),
                inset 0 1px 1px rgba(255, 255, 255, 0.15),
                0 0 30px 0 var(--accent-glow);
    transition: var(--transition-smooth);
    position: relative;
}

/* Microsoft Fluent Reveal border highlight */
.glass-panel::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1.5px;
    background: radial-gradient(circle 160px at var(--mouse-x, -999px) var(--mouse-y, -999px), rgba(var(--accent), 0.6), transparent 75%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover::before {
    opacity: 1;
}

/* Microsoft Fluent Reveal background glow */
.glass-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle 220px at var(--mouse-x, -999px) var(--mouse-y, -999px), rgba(var(--accent), 0.05), transparent 70%);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover::after {
    opacity: 1;
}

.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    backdrop-filter: blur(calc(var(--user-blur) * 0.5));
    -webkit-backdrop-filter: blur(calc(var(--user-blur) * 0.5));
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 12px 36px 0 rgba(0, 0, 0, 0.35);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 14px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    outline: none;
    letter-spacing: -0.2px;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: scale(0.96) translateY(0);
    transition: transform 0.05s ease;
}

.btn-primary {
    background: linear-gradient(135deg, rgb(var(--accent)), rgb(var(--accent-secondary)));
    border: none;
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgb(var(--accent-secondary)), rgb(var(--accent)));
    box-shadow: 0 8px 25px rgba(var(--accent), 0.5);
}

.btn-icon {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
}

/* Forms & Inputs */
.input-text {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    outline: none;
}

.input-text:focus {
    border-color: rgb(var(--accent));
    box-shadow: 0 0 10px var(--accent-glow);
    background: rgba(0, 0, 0, 0.5);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   Sidebar Navigation Component
   ========================================================================== */
.sidebar {
    width: var(--sidebar-width);
    height: calc(100vh - 40px);
    margin: 20px 0 20px 20px;
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    background: rgba(10, 10, 12, 0.45);
    backdrop-filter: blur(35px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    z-index: 10;
    transition: var(--transition-smooth);
    padding: 24px 16px;
    flex-shrink: 0;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
    padding: 24px 12px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 36px;
    padding-left: 8px;
    overflow: hidden;
}

.logo-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgb(var(--accent)), rgb(var(--accent-secondary)));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px var(--accent-glow);
    animation: pulseLogo 3s ease-in-out infinite alternate;
}

@keyframes pulseLogo {
    0% { transform: scale(1); box-shadow: 0 4px 15px var(--accent-glow); }
    100% { transform: scale(1.05); box-shadow: 0 4px 25px rgba(var(--accent), 0.7); }
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(to right, #ffffff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    white-space: nowrap;
    transition: var(--transition-smooth);
}

.sidebar.collapsed .logo-text {
    opacity: 0;
    width: 0;
    pointer-events: none;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
    flex-grow: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.menu-item svg {
    width: 22px;
    height: 22px;
    min-width: 22px;
    transition: var(--transition-smooth);
}

.menu-item:hover, .menu-item.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.menu-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: rgb(var(--accent));
    box-shadow: 0 0 10px rgb(var(--accent));
}

.menu-text {
    white-space: nowrap;
    transition: var(--transition-smooth);
}

.sidebar.collapsed .menu-text {
    opacity: 0;
    width: 0;
    pointer-events: none;
}

/* Companion Garden preview widget inside sidebar */
.sidebar-garden-preview {
    margin-top: auto;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-garden-preview {
    display: none;
}

.sidebar-garden-canvas {
    width: 100px;
    height: 100px;
    background: rgba(0,0,0,0.2);
    border-radius: 50%;
}

.sidebar-garden-info {
    text-align: center;
}

.sidebar-garden-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.sidebar-garden-level {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Main Stage Framework
   ========================================================================== */
.main-stage {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 40px);
    margin: 20px;
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    background: rgba(10, 10, 16, 0.25);
    backdrop-filter: blur(15px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    position: relative;
}

.header {
    height: var(--header-height);
    padding: 0 32px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 5;
}

.header-title-sec h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Quick stats chip */
.stats-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
}

.stats-chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981; /* Green */
    box-shadow: 0 0 8px #10b981;
}

/* Content Pane switcher */
.content-pane {
    flex-grow: 1;
    padding: 32px;
    overflow-y: auto;
    display: none;
    height: calc(100vh - var(--header-height));
    transform-origin: center top;
}

.content-pane.active {
    display: block;
    animation: paneFadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes paneFadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px) scale(0.98);
        filter: blur(8px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1);
        filter: blur(0px);
    }
}

/* ==========================================================================
   Module 1: Soundscape Mixer Dashboard
   ========================================================================== */
.mixer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.mixer-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 28px;
}

.mixer-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mixer-card-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mixer-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.mixer-card.active .mixer-card-icon {
    background: rgb(var(--accent));
    color: var(--text-primary);
    box-shadow: 0 0 15px var(--accent-glow);
}

.mixer-card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.mixer-card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

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

.slider-switch {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.08);
    transition: .4s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 34px;
    border: 1px solid rgba(255,255,255,0.08);
}

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

input:checked + .slider-switch {
    background-color: rgb(var(--accent));
    box-shadow: 0 0 15px var(--accent-glow);
}

input:focus + .slider-switch {
    box-shadow: 0 0 12px var(--accent-glow);
}

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

/* Audio sliders */
.audio-slider-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0.5;
    transition: var(--transition-smooth);
}

.mixer-card.active .audio-slider-container {
    opacity: 1;
}

.audio-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.audio-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.08);
    outline: none;
    transition: var(--transition-smooth);
}

.audio-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: var(--transition-smooth);
    border: 2px solid transparent;
}

.audio-slider::-webkit-slider-thumb:hover {
    transform: scale(1.25);
    box-shadow: 0 0 12px rgb(var(--accent));
}

.mixer-card.active .audio-slider::-webkit-slider-thumb {
    background: #ffffff;
    border-color: rgb(var(--accent));
    box-shadow: 0 0 8px var(--accent-glow);
}

/* Binaural Beats selection sub-card */
.binaural-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

.binaural-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.binaural-btn {
    padding: 6px;
    font-size: 0.75rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    color: var(--text-secondary);
    cursor: pointer;
    text-align: center;
    transition: var(--transition-smooth);
}

.binaural-btn:hover {
    background: rgba(255,255,255,0.08);
}

.binaural-btn.active {
    background: rgba(var(--accent), 0.2);
    border-color: rgb(var(--accent));
    color: var(--text-primary);
}

/* Uploader element */
.custom-uploader {
    border: 2px dashed rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.custom-uploader:hover {
    border-color: rgb(var(--accent));
    background: rgba(var(--accent), 0.02);
}

.custom-uploader-text {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Real-time spectrum visualizer banner */
.visualizer-container {
    height: 120px;
    margin-top: 24px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.visualizer-canvas {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

/* ==========================================================================
   Module 2: Time & Focus Managers (Timer Pane)
   ========================================================================== */
.timer-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 32px;
}

@media(max-width: 900px) {
    .timer-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Circular Pomodoro Card */
.pomo-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    text-align: center;
}

.pomo-dial-sec {
    position: relative;
    width: 300px;
    height: 300px;
    margin-bottom: 36px;
}

.pomo-svg {
    transform: rotate(-90deg);
}

.pomo-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.04);
    stroke-width: 10;
}

.pomo-progress {
    fill: none;
    stroke: rgb(var(--accent));
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s ease;
    filter: drop-shadow(0px 0px 12px var(--accent-glow));
}

.pomo-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.pomo-time {
    font-family: var(--font-mono);
    font-size: 3.8rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -1.5px;
    text-shadow: 0 0 24px rgba(var(--accent), 0.35);
}

.pomo-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 6px;
}

.pomo-controls {
    display: flex;
    align-items: center;
    gap: 24px;
}

.pomo-presets {
    display: flex;
    gap: 12px;
    margin-top: 36px;
}

.preset-chip {
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 0.88rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.preset-chip:hover {
    background: rgba(var(--accent), 0.12);
    border-color: rgba(var(--accent), 0.4);
    color: white;
    box-shadow: 0 0 15px rgba(var(--accent), 0.25);
    transform: translateY(-2px);
}

.preset-chip.active {
    background: linear-gradient(135deg, rgb(var(--accent)), rgba(var(--accent), 0.8));
    color: var(--text-primary);
    border-color: transparent;
    box-shadow: 0 8px 24px rgba(var(--accent), 0.35);
    transform: translateY(-2px);
}

/* Stopwatch card */
.stopwatch-card {
    padding: 32px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.stopwatch-time-sec {
    text-align: center;
    margin-bottom: 24px;
    padding: 20px 0;
}

.stopwatch-time {
    font-family: var(--font-mono);
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.stopwatch-controls {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.stopwatch-laps {
    flex-grow: 1;
    overflow-y: auto;
    max-height: 200px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lap-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 6px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

/* ==========================================================================
   Module 3: Task Managers & Mind-Journaling
   ========================================================================== */
.tasks-menu-tabs {
    display: flex;
    gap: 16px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 24px;
    padding-bottom: 12px;
}

.task-tab {
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    border-radius: 8px;
}

.task-tab:hover, .task-tab.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.task-pane {
    display: none;
}

.task-pane.active {
    display: block;
}

/* Drag-and-drop Kanban Board layout */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    height: calc(100vh - 350px);
    min-height: 400px;
}

.kanban-col {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 20px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.04);
    height: 100%;
    transition: var(--transition-smooth);
}

.kanban-col:hover {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.3);
}

.kanban-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary);
    padding: 4px 8px;
    letter-spacing: -0.2px;
}

.col-badge {
    background: rgba(255, 255, 255, 0.08);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.kanban-card-list {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 20px;
}

.task-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 16px;
    cursor: grab;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.task-card:active {
    cursor: grabbing;
}

.task-card:hover {
    border-color: rgba(var(--accent), 0.4);
    background: rgba(255,255,255,0.06);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.35), 0 0 15px -2px var(--accent-glow);
}

.task-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
}

.task-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.task-tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
}

.add-task-btn {
    border: 1px dashed rgba(255, 255, 255, 0.12);
    background: transparent;
    padding: 12px;
    border-radius: 14px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.add-task-btn:hover {
    border-color: rgb(var(--accent));
    color: var(--text-primary);
    background: rgba(var(--accent), 0.05);
    box-shadow: 0 0 12px var(--accent-glow);
}

/* Eisenhower Matrix Layout */
.eisenhower-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 24px;
    height: calc(100vh - 350px);
}

.matrix-quadrant {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: var(--transition-smooth);
}

.matrix-quadrant:hover {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.3);
}

.matrix-quadrant.urgent-important { border-left: 4px solid #ef4444; }
.matrix-quadrant.not-urgent-important { border-left: 4px solid #3b82f6; }
.matrix-quadrant.urgent-not-important { border-left: 4px solid #f59e0b; }
.matrix-quadrant.not-urgent-not-important { border-left: 4px solid #10b981; }

.matrix-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.98rem;
    font-weight: 700;
}

.matrix-tasks-list {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.matrix-task-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255,255,255,0.04);
    padding: 8px 12px;
    border-radius: 10px;
}

/* Sticky notes panel */
.sticky-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.sticky-note {
    background: rgba(251, 191, 36, 0.12); /* Yellow tint */
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 16px;
    padding: 16px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

.sticky-note:hover {
    box-shadow: 0 8px 24px rgba(251, 191, 36, 0.15);
    transform: translateY(-2px);
}

.sticky-note-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.sticky-note-textarea {
    width: 100%;
    flex-grow: 1;
    background: transparent;
    border: none;
    resize: none;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    line-height: 1.4;
    outline: none;
}

/* Gratitude Journal Form inside checkin tab */
.reflection-pane {
    max-width: 600px;
    margin: 0 auto;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.feeling-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.feeling-btn {
    padding: 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    text-align: center;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: var(--transition-smooth);
}

.feeling-btn:hover {
    background: rgba(255,255,255,0.08);
}

.feeling-btn.active {
    background: rgba(var(--accent), 0.2);
    border-color: rgb(var(--accent));
    box-shadow: 0 0 10px var(--accent-glow);
}

.feeling-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   Module 4: Companion Garden & Badges (game.js)
   ========================================================================== */
.game-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    align-items: start;
}

@media(max-width: 900px) {
    .game-grid {
        grid-template-columns: 1fr;
    }
}

.garden-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.garden-canvas-container {
    position: relative;
    width: 100%;
    max-width: 380px;
    height: 320px;
    margin-bottom: 24px;
}

#garden-canvas {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.xp-bar-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.xp-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
}

.xp-bar-track {
    width: 100%;
    height: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 5px;
    overflow: hidden;
}

.xp-bar-fill {
    width: 35%; /* Bind to Level % */
    height: 100%;
    background: linear-gradient(to right, #10b981, #34d399);
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    transition: width 1s ease-in-out;
}

/* Badges Showcase */
.badges-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255,255,255,0.04);
    opacity: 0.4;
    transition: var(--transition-smooth);
    text-align: center;
}

.badge-item.unlocked {
    opacity: 1;
    background: rgba(var(--accent), 0.05);
    border-color: rgba(var(--accent), 0.2);
}

.badge-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.4rem;
}

.badge-item.unlocked .badge-icon {
    background: linear-gradient(135deg, rgb(var(--accent)), rgb(var(--accent-secondary)));
    color: white;
    box-shadow: 0 0 10px var(--accent-glow);
}

.badge-name {
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-desc {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Quests */
.quests-card {
    padding: 24px;
}

.quests-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.quest-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 10px;
    font-size: 0.85rem;
}

.quest-item.completed {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.05);
    text-decoration: line-through;
    color: var(--text-muted);
}

/* ==========================================================================
   Module 5: Statistics & History Charts
   ========================================================================== */
.stats-header-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

@media(max-width: 768px) {
    .stats-header-row {
        grid-template-columns: 1fr 1fr;
    }
}

.stat-metric-card {
    padding: 20px;
    text-align: center;
}

.metric-val {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 6px;
}

.metric-lbl {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.stats-charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

@media(max-width: 900px) {
    .stats-charts-row {
        grid-template-columns: 1fr;
    }
}

/* SVG Chart */
.chart-panel {
    padding: 24px;
}

.chart-svg-container {
    width: 100%;
    height: 240px;
    position: relative;
}

/* Contribution Grass (Github commits-style heatmap) */
.heatmap-card {
    padding: 24px;
    overflow-x: auto;
}

.heatmap-grid {
    display: grid;
    grid-template-flow: column;
    grid-template-columns: repeat(53, 1fr);
    grid-template-rows: repeat(7, 1fr);
    gap: 3px;
    min-width: 700px;
    margin-top: 16px;
}

.heatmap-cell {
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,0.03);
    border-radius: 2px;
    transition: var(--transition-smooth);
}

.heatmap-cell:hover {
    transform: scale(1.3);
    box-shadow: 0 0 5px white;
}

.heatmap-cell.level-1 { background-color: #064e3b; }
.heatmap-cell.level-2 { background-color: #047857; }
.heatmap-cell.level-3 { background-color: #10b981; }
.heatmap-cell.level-4 { background-color: #34d399; }

/* ==========================================================================
   Module 6: Settings, Hotkeys & Configuration (ui.js)
   ========================================================================== */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

@media(max-width: 900px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

.settings-card {
    padding: 24px;
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.settings-row-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-row-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.settings-row-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Keyboard shortcuts table */
.shortcuts-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.shortcuts-table th {
    text-align: left;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding-bottom: 10px;
}

.shortcuts-table td {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 0.9rem;
}

.kbd-badge {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 4px 8px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-primary);
}

/* ==========================================================================
   Full-Screen Minimalist Screen Saver
   ========================================================================== */
#screensaver {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #030712; /* Deep obsidian black */
    z-index: 1000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    cursor: none;
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1);
}

#screensaver.active {
    display: flex;
}

.screensaver-clock {
    font-family: var(--font-mono);
    font-size: 6.5rem;
    font-weight: 800;
    color: rgba(255,255,255,0.85);
    letter-spacing: -2px;
    text-shadow: 0 0 30px rgba(255,255,255,0.15);
    animation: pulseScreensaverClock 4s ease-in-out infinite alternate;
}

@keyframes pulseScreensaverClock {
    from { opacity: 0.7; transform: scale(0.98); }
    to { opacity: 0.95; transform: scale(1); }
}

.screensaver-pomo {
    font-size: 1.4rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 8px 24px;
    border-radius: 30px;
}

.screensaver-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    position: absolute;
    bottom: 40px;
}

/* ==========================================================================
   Cozy Room Visualizer Premium Styles
   ========================================================================== */
.cozy-room-container {
    position: relative;
    width: 100%;
    height: 280px;
    background: linear-gradient(180deg, #1e1b4b 0%, #0f172a 100%);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
}

/* Cozy Window */
.room-window {
    position: absolute;
    top: 30px;
    left: 40px;
    width: 100px;
    height: 120px;
    background: rgba(255, 255, 255, 0.05);
    border: 4px solid #475569;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    z-index: 2;
}

.window-pane {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: #475569;
}

.window-pane::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -50px;
    width: 100px;
    height: 2px;
    background: #475569;
}

/* Rain Effect */
.rain-droplets {
    position: absolute;
    width: 100%;
    height: 100%;
    background: transparent;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.rain-active .rain-droplets {
    opacity: 1;
    background: repeating-linear-gradient(0deg, transparent, transparent 15px, rgba(59, 130, 246, 0.4) 15px, rgba(59, 130, 246, 0.4) 20px);
    animation: windowRain 0.8s linear infinite;
}

@keyframes windowRain {
    from { background-position: 0 0; }
    to { background-position: 0 100px; }
}

/* Swaying Curtains (Attic) */
.room-curtains {
    position: absolute;
    top: 15px;      /* Aligned with new window */
    left: 20px;     /* Aligned with new window */
    width: 100px;   /* Matches window width + overhang */
    height: 90px;   /* Matches window height + overhang */
    z-index: 3;
    pointer-events: none;
}

.curtain {
    position: absolute;
    top: -5px;
    width: 30px;
    height: 100px;
    background: linear-gradient(90deg, #fef08a 0%, #fde047 100%); /* Cute warm yellow */
    border-radius: 10px 10px 15px 15px;
    transform-origin: top center;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}
.curtain::after {
    /* Cute curtain tie-back */
    content: '';
    position: absolute;
    top: 50%;
    left: -2px; right: -2px;
    height: 6px;
    background: #fbbf24;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.curtain-left { left: -5px; border-right: 2px solid #fcd34d; }
.curtain-right { right: -5px; border-left: 2px solid #fcd34d; }

.wind-active .curtain-left {
    animation: curtainSwayLeft 4s ease-in-out infinite alternate;
}

.wind-active .curtain-right {
    animation: curtainSwayRight 4s ease-in-out infinite alternate;
}

@keyframes curtainSwayLeft {
    0% { transform: rotate(2deg); }
    100% { transform: rotate(8deg) scaleX(0.95); }
}

@keyframes curtainSwayRight {
    0% { transform: rotate(-2deg); }
    100% { transform: rotate(-8deg) scaleX(0.95); }
}

/* Glowing Fireplace */
.room-fireplace {
    position: absolute;
    bottom: 0;
    right: 40px;
    width: 120px;
    height: 90px;
    background: #334155;
    border: 6px solid #1e293b;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    z-index: 2;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.fireplace-hearth {
    position: absolute;
    bottom: 0;
    left: 10px;
    width: 88px;
    height: 45px;
    background: #0f172a;
    border-radius: 8px 8px 0 0;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.9);
}

.fireplace-flames {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    opacity: 0.15;
    transition: opacity 0.5s ease;
}

.campfire-active .fireplace-flames {
    opacity: 1;
}

.flame {
    width: 10px;
    height: 25px;
    background: linear-gradient(180deg, #f97316 0%, #ef4444 100%);
    border-radius: 5px 5px 0 0;
    animation: flameFlicker 0.6s ease-in-out infinite alternate;
    transform-origin: bottom center;
}

.flame-1 { animation-delay: 0.1s; height: 28px; background: #f97316; }
.flame-2 { animation-delay: 0.2s; height: 35px; background: #eab308; }
.flame-3 { animation-delay: 0.3s; height: 24px; background: #ef4444; }

.campfire-active::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: -30px;
    width: 180px;
    height: 60px;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.2) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
    animation: hearthGlow 2s infinite alternate;
}

@keyframes flameFlicker {
    0% { transform: scaleY(0.9) skewX(-2deg); }
    100% { transform: scaleY(1.15) skewX(2deg); }
}

@keyframes hearthGlow {
    0% { opacity: 0.6; }
    100% { opacity: 1.0; }
}

/* Desk Setup */
.room-desk {
    position: absolute;
    bottom: 0;
    left: 20px;
    width: 160px;
    height: 80px;
    z-index: 4;
}

.desk-surface {
    position: absolute;
    bottom: 30px;
    width: 100%;
    height: 10px;
    background: #78350f;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
}

.desk-surface::before {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 10px;
    width: 6px;
    height: 30px;
    background: #451a03;
}

.desk-surface::after {
    content: '';
    position: absolute;
    bottom: -30px;
    right: 10px;
    width: 6px;
    height: 30px;
    background: #451a03;
}

.desk-laptop {
    position: absolute;
    bottom: 40px;
    left: 55px;
    width: 45px;
    height: 30px;
    z-index: 5;
}

.laptop-screen {
    width: 38px;
    height: 26px;
    background: #475569;
    border: 2px solid #1e293b;
    border-radius: 4px;
    position: relative;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

.laptop-screen::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: radial-gradient(circle, rgba(147, 51, 234, 0.25) 0%, transparent 80%);
}

.waves-active .laptop-screen::after {
    background: radial-gradient(circle, rgba(6, 182, 212, 0.4) 0%, rgba(147, 51, 234, 0.4) 70%);
}

.laptop-keyboard {
    width: 44px;
    height: 4px;
    background: #1e293b;
    position: absolute;
    bottom: -4px;
    left: -3px;
    border-radius: 0 0 2px 2px;
}

.desk-lamp {
    position: absolute;
    bottom: 40px;
    left: 10px;
    width: 25px;
    height: 40px;
    z-index: 5;
}

.lamp-base {
    width: 14px;
    height: 4px;
    background: #94a3b8;
    position: absolute;
    bottom: 0;
    left: 5px;
    border-radius: 2px;
}

.lamp-base::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 6px;
    width: 2px;
    height: 25px;
    background: #94a3b8;
}

.lamp-shade {
    width: 22px;
    height: 12px;
    background: #ef4444;
    position: absolute;
    top: 5px;
    left: 1px;
    border-radius: 6px 6px 0 0;
    transform: rotate(-15deg);
}

.lamp-light {
    position: absolute;
    top: 17px;
    left: -15px;
    width: 50px;
    height: 70px;
    background: radial-gradient(ellipse at top, rgba(253, 224, 71, 0.25) 0%, transparent 70%);
    clip-path: polygon(30% 0%, 70% 0%, 100% 100%, 0% 100%);
    transform: rotate(-15deg);
    opacity: 0.8;
    pointer-events: none;
}

/* Floating Cup Steam */
.desk-cup {
    position: absolute;
    bottom: 40px;
    right: 15px;
    width: 14px;
    height: 14px;
    background: #e2e8f0;
    border-radius: 0 0 4px 4px;
    z-index: 5;
}

.desk-cup::after {
    content: '';
    position: absolute;
    top: 2px;
    right: -4px;
    width: 4px;
    height: 8px;
    border: 2px solid #e2e8f0;
    border-left: none;
    border-radius: 0 4px 4px 0;
}

.steam {
    position: absolute;
    width: 2px;
    height: 8px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    opacity: 0;
    bottom: 16px;
}

.steam-1 { left: 4px; animation: riseSteam 2s infinite linear; }
.steam-2 { left: 8px; animation: riseSteam 2.5s infinite linear 0.5s; }

.waves-active .steam, .campfire-active .steam {
    opacity: 1;
}

@keyframes riseSteam {
    0% { transform: translateY(0) scaleX(1); opacity: 0; }
    50% { opacity: 0.6; }
    100% { transform: translateY(-15px) scaleX(1.8); opacity: 0; }
}

/* Desk Plant */
.desk-plant {
    position: absolute;
    bottom: 40px;
    left: 115px;
    width: 14px;
    height: 12px;
    background: #78350f;
    border-radius: 0 0 2px 2px;
    z-index: 5;
}

.leaf {
    position: absolute;
    background: #10b981;
    border-radius: 50% 50% 0 50%;
    transform-origin: bottom center;
}

.leaf-1 {
    width: 8px;
    height: 16px;
    left: 0px;
    top: -12px;
    transform: rotate(-30deg);
}

.leaf-2 {
    width: 8px;
    height: 14px;
    right: 0px;
    top: -10px;
    transform: rotate(30deg) scaleX(-1);
}

/* ==========================================================================
   Mindfulness Breathing Coach Premium Styles
   ========================================================================== */
.breathing-circle-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.breathing-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(147, 51, 234, 0.4) 0%, rgba(59, 130, 246, 0.1) 70%);
    border: 2px solid rgba(147, 51, 234, 0.6);
    box-shadow: 0 0 30px rgba(147, 51, 234, 0.3);
    transition: all 4s cubic-bezier(0.4, 0, 0.2, 1);
}

.breathing-circle.inhale {
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.5) 0%, rgba(147, 51, 234, 0.2) 70%);
    border-color: rgba(6, 182, 212, 0.8);
    box-shadow: 0 0 55px rgba(6, 182, 212, 0.6);
}

.breathing-circle.hold {
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.5) 0%, rgba(6, 182, 212, 0.2) 70%);
    border-color: rgba(236, 72, 153, 0.8);
    box-shadow: 0 0 55px rgba(236, 72, 153, 0.6);
}

.breathing-circle.exhale {
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(147, 51, 234, 0.4) 0%, rgba(59, 130, 246, 0.1) 70%);
    border-color: rgba(147, 51, 234, 0.6);
    box-shadow: 0 0 30px rgba(147, 51, 234, 0.3);
}

.breathing-text {
    position: absolute;
    font-size: 1.05rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

/* ==========================================================================
   Welcome Splash Overlay
   ========================================================================== */
#welcome-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(15, 23, 42, 0.97) 0%, rgba(9, 9, 11, 0.99) 100%);
    backdrop-filter: blur(20px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#welcome-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.welcome-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(147, 51, 234, 0.3);
    border-radius: 28px;
    padding: 48px 44px;
    max-width: 520px;
    width: 100%;
    text-align: center;
    box-shadow: 0 0 80px rgba(147, 51, 234, 0.2), 0 30px 60px rgba(0,0,0,0.5);
    animation: welcomeFloat 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

.welcome-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgb(var(--accent)), rgb(var(--accent-secondary)));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 0 40px rgba(147, 51, 234, 0.5);
    animation: logoPulse 2.5s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { box-shadow: 0 0 30px rgba(147, 51, 234, 0.4); }
    50%       { box-shadow: 0 0 60px rgba(147, 51, 234, 0.8); }
}

.welcome-title {
    font-size: 2.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, rgb(var(--accent)), rgb(var(--accent-secondary)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.welcome-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 18px;
    letter-spacing: 0.02em;
}

.welcome-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 24px;
}

.welcome-desc strong {
    color: var(--text-primary);
}

.welcome-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 28px;
}

.welcome-feature {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: left;
    transition: all 0.25s ease;
}

.welcome-feature:hover {
    background: rgba(var(--accent), 0.08);
    border-color: rgba(var(--accent), 0.25);
    color: var(--text-primary);
}

.welcome-feature span:first-child {
    font-size: 1.3rem;
}

.welcome-start-btn {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 14px;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 30px rgba(var(--accent), 0.4);
    margin-bottom: 16px;
}

.welcome-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(var(--accent), 0.6);
}

.welcome-privacy {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.welcome-privacy a {
    color: rgb(var(--accent));
    text-decoration: none;
}

.welcome-privacy a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   AdSense Fixed Bottom Bar
   ========================================================================== */
.adsense-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    min-height: 90px;
    background: rgba(9, 9, 11, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 48px 8px 16px;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.adsense-bottom-bar.visible {
    transform: translateY(0);
}

.ad-close-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 3px 7px;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s;
}

.ad-close-btn:hover {
    background: rgba(255,255,255,0.12);
    color: var(--text-primary);
}

/* Push main content up when ad bar is showing */
body.ad-bar-open .app-layout {
    padding-bottom: 90px;
}

/* ==========================================================================
   Privacy Policy / Legal Modal
   ========================================================================== */
.legal-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(10px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.legal-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.legal-modal-card {
    background: #0f172a;
    border: 1px solid rgba(147, 51, 234, 0.3);
    border-radius: 24px;
    padding: 36px;
    max-width: 680px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
    scrollbar-width: thin;
}

.legal-content section {
    margin-bottom: 22px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.legal-content section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.legal-content h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: rgb(var(--accent));
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.legal-content p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

}

@media (max-width: 768px) {
    .welcome-features { grid-template-columns: 1fr; }
    .welcome-card { padding: 32px 24px; }
    .adsense-bottom-bar { padding: 8px 40px 8px 12px; }
}

/* ==========================================================================
   Custom Pomodoro Time Settings Panel
   ========================================================================== */
.pomo-custom-settings {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 16px;
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pomo-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pomo-setting-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex-shrink: 0;
    min-width: 80px;
}

.pomo-setting-input-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pomo-step-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(var(--accent), 0.15);
    border: 1px solid rgba(var(--accent), 0.3);
    color: rgb(var(--accent));
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.pomo-step-btn:hover {
    background: rgba(var(--accent), 0.3);
    transform: scale(1.1);
}

.pomo-time-input {
    width: 52px;
    text-align: center;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    padding: 4px 6px;
}

.pomo-time-input:focus {
    outline: none;
    border-color: rgba(var(--accent), 0.5);
    box-shadow: 0 0 0 2px rgba(var(--accent), 0.15);
}

/* Hide number input arrows */
.pomo-time-input::-webkit-outer-spin-button,
.pomo-time-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pomo-time-input[type=number] { -moz-appearance: textfield; }

.pomo-unit {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Cozy Multi-Room Character System
   ========================================================================== */
.cozy-room-panel {
    overflow: hidden;
}

.cozy-room-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 12px;
}

.cozy-room-sound-badge {
    background: rgba(var(--accent), 0.15);
    border: 1px solid rgba(var(--accent), 0.3);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.78rem;
    color: rgb(var(--accent));
    white-space: nowrap;
    flex-shrink: 0;
}

/* Room Tabs */
.room-tab-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.room-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.room-tab:hover {
    background: rgba(var(--accent), 0.1);
    border-color: rgba(var(--accent), 0.25);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.room-tab.active {
    background: rgba(var(--accent), 0.2);
    border-color: rgba(var(--accent), 0.5);
    color: rgb(var(--accent));
    box-shadow: 0 4px 15px rgba(var(--accent), 0.2);
}

.room-tab-icon { font-size: 1.4rem; }
.room-tab-label { font-size: 0.7rem; font-weight: 600; }

/* Room Stage */
.cozy-room-stage {
    position: relative;
    width: 100%;
    height: 280px;
    border-radius: 16px;
    overflow: hidden;
    background: #0d0d15;
}

.cozy-room {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.cozy-room.active {
    opacity: 1;
    pointer-events: auto;
}

/* ── Room Backgrounds ── */
.attic-bg {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, #1a0a2e 0%, #2d1244 50%, #1a0f2e 100%);
}
.attic-floor {
    position: absolute; bottom: 0; left: 0; right: 0; height: 45px;
    background: linear-gradient(180deg, #3d2a1a, #2a1a0a);
    border-top: 2px solid rgba(255,255,255,0.05);
}
.beach-bg {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, #1a3a5c 0%, #2d6a9f 40%, #e8c97a 70%, #c4a464 100%);
}
.beach-floor {
    position: absolute; bottom: 0; left: 0; right: 0; height: 55px;
    background: linear-gradient(180deg, #d4a96a, #c4955a);
}
.forest-bg {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, #0a1a0a 0%, #0f2a0f 40%, #1a3a1a 100%);
}
.forest-floor {
    position: absolute; bottom: 0; left: 0; right: 0; height: 50px;
    background: linear-gradient(180deg, #1a2a1a, #0f1a0f);
    border-top: 2px solid #2a3a1a;
}
.space-bg {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, #000010 0%, #050520 40%, #0a0a30 100%);
}
.space-floor {
    position: absolute; bottom: 0; left: 0; right: 0; height: 40px;
    background: linear-gradient(180deg, #1a1a3a, #0a0a25);
    border-top: 1px solid rgba(100,100,255,0.2);
}

/* ── Attic Room Elements (Cuter Redesign) ── */
.attic-bookshelf {
    position: absolute;
    right: 20px; top: 30px; /* Moved to upper wall */
    width: 70px; height: 8px;
    background: #8b5a2b; /* Warm wood */
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    display: flex;
    gap: 4px;
    align-items: flex-end;
    padding-left: 6px;
}
.book {
    width: 10px;
    border-radius: 3px 3px 0 0;
    margin-bottom: 8px; /* sits on shelf */
    box-shadow: -1px 0 3px rgba(0,0,0,0.2);
}
.book-1 { height: 28px; background: #fb7185; } /* Cute pink */
.book-2 { height: 20px; background: #60a5fa; transform: rotate(-10deg); transform-origin: bottom left; }
.book-3 { height: 32px; background: #34d399; }
.book-4 { height: 24px; background: #fcd34d; }
.book-5 { height: 26px; background: #a78bfa; transform: rotate(10deg); transform-origin: bottom right; }

.attic-window {
    position: absolute;
    top: 20px; left: 25px;
    width: 90px; height: 80px;
    background: linear-gradient(180deg, rgba(14, 165, 233, 0.15) 0%, rgba(56, 189, 248, 0.3) 100%);
    border: 5px solid #d4a373; /* Cute warm wooden frame */
    border-radius: 40px 40px 10px 10px; /* Arched cute window */
    overflow: hidden;
    box-shadow: inset 0 0 15px rgba(255,255,255,0.1), 0 5px 15px rgba(0,0,0,0.2);
}
.window-cross {
    position: absolute;
    inset: 0;
}
.window-cross::before, .window-cross::after {
    content: '';
    position: absolute;
    background: #d4a373;
}
.window-cross::before { left: 50%; top: 0; bottom: 0; width: 4px; transform: translateX(-50%); }
.window-cross::after  { top: 55%; left: 0; right: 0; height: 4px; transform: translateY(-50%); }

.attic-desk {
    position: absolute;
    bottom: 45px;
    left: 45%; /* Slightly shifted */
    transform: translateX(-50%);
    width: 140px; /* Added width for clearer structure */
}
.attic-desk .desk-surface {
    width: 140px; height: 14px;
    background: linear-gradient(180deg, #e6b981, #c8955a); /* Lighter cute wood */
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

/* ── Beach Room Elements ── */
.beach-window {
    position: absolute;
    top: 15px; left: 20px;
    width: 110px; height: 75px;
    background: linear-gradient(180deg, #87ceeb 0%, #1a9ed9 100%);
    border: 3px solid #8b6914;
    border-radius: 4px;
    overflow: hidden;
}
.sea-view { position: absolute; inset: 0; background: linear-gradient(180deg, #87ceeb 50%, #1a9ed9 100%); }
.sea-wave {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 12px;
    background: rgba(255,255,255,0.4);
    border-radius: 50% 50% 0 0;
    animation: seaWave 2s ease-in-out infinite;
}
.sea-wave.wave-2 { bottom: 8px; animation-delay: -1s; opacity: 0.6; }
@keyframes seaWave {
    0%, 100% { transform: scaleX(1); }
    50% { transform: scaleX(1.1); }
}

.beach-umbrella {
    position: absolute;
    right: 30px; bottom: 54px;
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 20px solid #e74c3c;
}
.beach-umbrella::after {
    content: '';
    position: absolute;
    bottom: -40px; left: -3px;
    width: 6px; height: 40px;
    background: #8b6914;
    border-radius: 0 0 3px 3px;
}
.beach-shell {
    position: absolute;
    bottom: 55px;
    width: 14px; height: 10px;
    background: #f4a460;
    border-radius: 50% 50% 0 0;
}
.shell-1 { left: 25%; }
.shell-2 { left: 40%; width: 10px; height: 7px; background: #dda0dd; }

.beach-hammock {
    position: absolute;
    bottom: 80px;
    left: 50%; transform: translateX(-50%);
    width: 120px;
}
.hammock-body {
    width: 120px; height: 35px;
    background: linear-gradient(180deg, #8b4513, #a0522d);
    border-radius: 0 0 30px 30px;
    border: 2px solid #6b3410;
    animation: hammockSway 3s ease-in-out infinite;
}
@keyframes hammockSway {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

/* ── Forest Room Elements ── */
.forest-window {
    position: absolute;
    top: 15px; left: 15px;
    width: 95px; height: 80px;
    background: rgba(30, 80, 30, 0.6);
    border: 3px solid #5a3a1a;
    border-radius: 4px 4px 0 0;
    overflow: hidden;
}
.forest-view { position: absolute; inset: 0; background: linear-gradient(180deg, #0a1a0a 0%, #1a3a1a 100%); }
.forest-tree {
    position: absolute;
    bottom: 0;
    width: 0;
    height: 0;
    border-left: 16px solid transparent;
    border-right: 16px solid transparent;
    border-bottom: 40px solid #1a5c1a;
}
.tree-1 { left: 10px; }
.tree-2 { left: 50px; border-bottom-width: 50px; }

.forest-stove {
    position: absolute;
    right: 20px; bottom: 50px;
    width: 45px;
}
.stove-body {
    width: 45px; height: 50px;
    background: linear-gradient(180deg, #2c2c2c, #1a1a1a);
    border-radius: 4px;
    border: 1px solid #444;
}
.stove-pipe {
    width: 12px; height: 30px;
    background: #333;
    margin: 0 auto;
    border-radius: 3px 3px 0 0;
}
.stove-fire {
    width: 20px; height: 8px;
    background: rgba(255, 120, 20, 0.8);
    border-radius: 50%;
    margin: -4px auto 0;
    animation: stovePulse 0.8s ease-in-out infinite alternate;
    box-shadow: 0 0 8px rgba(255,100,0,0.6);
}
@keyframes stovePulse {
    from { transform: scale(0.9); opacity: 0.7; }
    to   { transform: scale(1.1); opacity: 1; }
}

.forest-table {
    position: absolute;
    bottom: 44px;
    left: 50%; transform: translateX(-50%);
    width: 110px;
}
.table-surface {
    width: 110px; height: 12px;
    background: linear-gradient(180deg, #8b4513, #6b3410);
    border-radius: 4px 4px 0 0;
    border: 1px solid rgba(255,255,255,0.05);
}
.raccoon-mug {
    position: absolute;
    bottom: 12px; left: 10px;
    width: 22px; height: 26px;
    background: linear-gradient(180deg, #c8451f, #a83010);
    border-radius: 4px 4px 6px 6px;
    border: 1px solid rgba(255,255,255,0.1);
}
.mug-handle {
    position: absolute;
    right: -8px; top: 6px;
    width: 8px; height: 12px;
    border: 3px solid #a83010;
    border-radius: 0 6px 6px 0;
    border-left: none;
}
.table-book {
    position: absolute;
    bottom: 12px; right: 15px;
    width: 28px; height: 20px;
    background: #2c5282;
    border-radius: 2px;
    border-left: 4px solid #1a3a6a;
}
.table-acorn {
    position: absolute;
    bottom: 12px; right: 50px;
    width: 10px; height: 12px;
    background: #8b6914;
    border-radius: 50% 50% 40% 40%;
}
.table-acorn::after {
    content: '';
    position: absolute;
    top: -5px; left: 0; right: 0;
    height: 6px;
    background: #5a4510;
    border-radius: 40% 40% 0 0;
}

/* ── Space Room Elements ── */
.space-window {
    position: absolute;
    top: 15px; left: 15px;
    width: 100px; height: 80px;
    background: #000010;
    border: 3px solid #2a2a6a;
    border-radius: 50% / 30%;
    overflow: hidden;
}
.space-view { position: absolute; inset: 0; background: radial-gradient(ellipse at center, #000510 0%, #000 100%); }
.space-star {
    position: absolute;
    width: 3px; height: 3px;
    background: white;
    border-radius: 50%;
    animation: starTwinkle 2s ease-in-out infinite;
}
.s1 { top: 15%; left: 20%; animation-delay: 0s; }
.s2 { top: 40%; left: 60%; animation-delay: 0.5s; }
.s3 { top: 70%; left: 30%; animation-delay: 1s; width: 2px; height: 2px; }
.s4 { top: 25%; left: 80%; animation-delay: 1.5s; width: 2px; height: 2px; }
.s5 { top: 60%; left: 70%; animation-delay: 0.8s; }
@keyframes starTwinkle {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}
.space-planet {
    position: absolute;
    bottom: 10px; right: 10px;
    width: 30px; height: 30px;
    background: radial-gradient(circle at 35% 35%, #6a5acd, #2d1b8a);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(106, 90, 205, 0.5);
    animation: planetFloat 4s ease-in-out infinite;
}
.space-planet::after {
    content: '';
    position: absolute;
    top: 50%; left: -8px;
    width: 46px; height: 8px;
    border: 2px solid rgba(150,130,255,0.5);
    border-radius: 50%;
    transform: translateY(-50%) rotateX(70deg);
}
@keyframes planetFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-4px); }
}

.space-panel {
    position: absolute;
    right: 15px; bottom: 40px;
    width: 70px; height: 80px;
    background: linear-gradient(180deg, #1a1a3a, #0d0d2a);
    border: 1px solid rgba(100,100,255,0.3);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-content: flex-start;
}
.panel-screen {
    width: 100%; height: 28px;
    background: rgba(0, 100, 255, 0.15);
    border: 1px solid rgba(0,150,255,0.4);
    border-radius: 4px;
    animation: screenBlink 3s ease-in-out infinite;
}
@keyframes screenBlink {
    0%, 90%, 100% { opacity: 1; }
    95% { opacity: 0.3; }
}
.panel-btn {
    width: 14px; height: 10px;
    border-radius: 2px;
    border: none;
}
.b1 { background: #e74c3c; }
.b2 { background: #f39c12; }
.b3 { background: #2ecc71; }
.panel-light {
    width: 8px; height: 8px;
    border-radius: 50%;
    animation: lightBlink 1.5s ease-in-out infinite;
}
.l1 { background: #00ff88; }
.l2 { background: #0088ff; animation-delay: 0.75s; }
@keyframes lightBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

.space-float-items {
    position: absolute;
    left: 15px; top: 110px;
}
.float-item {
    position: absolute;
    animation: floatItem 3s ease-in-out infinite;
}
.pencil {
    width: 5px; height: 22px;
    background: linear-gradient(180deg, #f39c12, #e74c3c);
    border-radius: 0 0 3px 3px;
    left: 0;
}
.water-drop {
    width: 10px; height: 12px;
    background: rgba(100,200,255,0.7);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    left: 15px; top: 5px;
    animation-delay: -1.5s;
}
@keyframes floatItem {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-8px) rotate(5deg); }
    66% { transform: translateY(3px) rotate(-3deg); }
}

/* ==========================================================================
   🐧 Penguin Character
   ========================================================================== */
.penguin {
    position: absolute;
    bottom: 44px;
    left: 50%; transform: translateX(-50%);
    cursor: pointer;
    animation: charBob 3s ease-in-out infinite;
}
@keyframes charBob {
    0%, 100% { transform: translateX(-50%) translateY(0px); }
    50% { transform: translateX(-50%) translateY(-4px); }
}
.penguin-body {
    width: 60px; height: 75px;
    background: linear-gradient(180deg, #1a1a1a, #0d0d0d);
    border-radius: 50% 50% 45% 45% / 40% 40% 50% 50%;
    position: relative;
}
.penguin-belly {
    position: absolute;
    bottom: 10px; left: 50%; transform: translateX(-50%);
    width: 36px; height: 45px;
    background: linear-gradient(180deg, #f0f0f0, #e0e0e0);
    border-radius: 50% 50% 45% 45% / 40% 40% 50% 50%;
}
.penguin-face {
    position: absolute;
    top: 10px; left: 50%; transform: translateX(-50%);
    width: 44px; height: 32px;
}
.penguin-eye {
    position: absolute;
    top: 5px;
    width: 9px; height: 9px;
    background: white;
    border-radius: 50%;
    box-shadow: inset -2px -1px 0 2px #1a1a1a;
}
.penguin-eye.left  { left: 4px; }
.penguin-eye.right { right: 4px; }
.penguin-beak {
    position: absolute;
    bottom: 0; left: 50%; transform: translateX(-50%);
    width: 12px; height: 6px;
    background: #f39c12;
    border-radius: 2px 2px 4px 4px;
    animation: beakChatter 0.4s ease-in-out infinite alternate;
}
@keyframes beakChatter {
    from { transform: translateX(-50%) scaleY(1); }
    to   { transform: translateX(-50%) scaleY(0.5); }
}
.penguin-glasses {
    position: absolute;
    top: 2px; left: 50%; transform: translateX(-50%);
    width: 32px; height: 12px;
    border: 2px solid rgba(var(--accent), 0.8);
    border-radius: 50%;
    outline: 2px solid rgba(var(--accent), 0.4);
}
.penguin-wing {
    position: absolute;
    top: 30px;
    width: 14px; height: 28px;
    background: #1a1a1a;
    border-radius: 6px;
}
.penguin-wing.left-wing  { left: -10px; transform: rotate(-15deg); }
.penguin-wing.right-wing { right: -10px; transform: rotate(15deg); }
.penguin-wing.typing {
    animation: wingType 0.2s ease-in-out infinite alternate;
}
@keyframes wingType {
    from { transform: rotate(15deg) translateY(0); }
    to   { transform: rotate(10deg) translateY(-3px); }
}
.penguin-feet {
    position: absolute;
    bottom: -10px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 8px;
}
.penguin-foot {
    width: 18px; height: 8px;
    background: #f39c12;
    border-radius: 3px 3px 5px 5px;
}

/* ==========================================================================
   🦭 Seal Character
   ========================================================================== */
.seal {
    position: absolute;
    bottom: 55px; /* inside hammock */
    left: 50%; transform: translateX(-50%);
    cursor: pointer;
    animation: sealBreathe 4s ease-in-out infinite;
}
@keyframes sealBreathe {
    0%, 100% { transform: translateX(-50%) scaleY(1); }
    50% { transform: translateX(-50%) scaleY(1.04); }
}
.seal-body {
    width: 80px; height: 55px;
    background: linear-gradient(160deg, #a0a0b0, #707080);
    border-radius: 50% 50% 45% 45% / 55% 55% 40% 40%;
    position: relative;
}
.seal-belly {
    position: absolute;
    bottom: 5px; left: 50%; transform: translateX(-50%);
    width: 45px; height: 32px;
    background: linear-gradient(180deg, #e0d8c8, #d0c8b8);
    border-radius: 50%;
}
.seal-face {
    position: absolute;
    top: 8px; left: 50%; transform: translateX(-50%);
    width: 50px; height: 30px;
}
.seal-eye {
    position: absolute;
    top: 0;
    width: 10px; height: 12px;
    background: #1a1a1a;
    border-radius: 50%;
    box-shadow: 0 0 3px rgba(255,255,255,0.3);
}
.seal-eye.left  { left: 5px; }
.seal-eye.right { right: 5px; }
/* Eye closed / sleeping */
.seal-eye::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 55%;
    background: #707080;
    border-radius: 0 0 50% 50%;
    animation: sealSleep 4s ease-in-out infinite;
}
@keyframes sealSleep {
    0%, 80%, 100% { height: 55%; }
    85%, 95% { height: 100%; }
}
.seal-nose {
    position: absolute;
    bottom: 5px; left: 50%; transform: translateX(-50%);
    width: 12px; height: 7px;
    background: #c0a0a0;
    border-radius: 50%;
}
.seal-whisker {
    position: absolute;
    bottom: 8px;
    width: 16px; height: 1.5px;
    background: rgba(255,255,255,0.5);
    border-radius: 1px;
}
.seal-whisker.left-w  { left: 2px;  transform: rotate(-10deg); }
.seal-whisker.right-w { right: 2px; transform: rotate(10deg); }
.seal-flipper {
    position: absolute;
    bottom: 0;
    width: 20px; height: 12px;
    background: #707080;
    border-radius: 50% 50% 5px 5px;
}
.seal-flipper.left-flipper  { left: -5px; transform: rotate(-20deg); }
.seal-flipper.right-flipper { right: -5px; transform: rotate(20deg); }
.seal-tail {
    position: absolute;
    bottom: -4px; right: -12px;
    width: 20px; height: 14px;
    background: #707080;
    border-radius: 50% 50% 0 50%;
    transform: rotate(20deg);
}

.zzz-container {
    position: absolute;
    top: -30px; right: -20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}
.zzz {
    font-style: italic;
    font-weight: 700;
    color: rgba(150,200,255,0.7);
    animation: zzzFloat 3s ease-in-out infinite;
    line-height: 1;
}
.z1 { font-size: 0.7rem; animation-delay: 0s; }
.z2 { font-size: 0.9rem; animation-delay: 1s; margin-left: 6px; }
.z3 { font-size: 1.1rem; animation-delay: 2s; margin-left: 12px; }
@keyframes zzzFloat {
    0% { opacity: 0; transform: translateY(0) translateX(0); }
    30% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-20px) translateX(8px); }
}

/* ==========================================================================
   🦝 Raccoon Character
   ========================================================================== */
.raccoon {
    position: absolute;
    bottom: 55px;
    left: 50%; transform: translateX(-50%);
    cursor: pointer;
    animation: charBob 3.5s ease-in-out infinite;
}
.raccoon-body {
    width: 55px; height: 70px;
    background: linear-gradient(180deg, #6a6a6a, #4a4a4a);
    border-radius: 45% 45% 40% 40% / 38% 38% 50% 50%;
    position: relative;
}
.raccoon-belly {
    position: absolute;
    bottom: 8px; left: 50%; transform: translateX(-50%);
    width: 30px; height: 40px;
    background: linear-gradient(180deg, #c8c0b0, #b0a898);
    border-radius: 50%;
}
.raccoon-face {
    position: absolute;
    top: 8px; left: 50%; transform: translateX(-50%);
    width: 40px; height: 32px;
}
.raccoon-mask {
    position: absolute;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 32px; height: 16px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
}
.raccoon-eye {
    position: absolute;
    top: 4px;
    width: 8px; height: 8px;
    background: white;
    border-radius: 50%;
    box-shadow: inset -1px -1px 0 2px #1a1a1a;
}
.raccoon-eye.left  { left: 3px; }
.raccoon-eye.right { right: 3px; }
.raccoon-nose {
    position: absolute;
    bottom: 6px; left: 50%; transform: translateX(-50%);
    width: 10px; height: 6px;
    background: #a07060;
    border-radius: 50%;
}
.raccoon-ear {
    position: absolute;
    top: -14px;
    width: 14px; height: 16px;
    background: #6a6a6a;
    border-radius: 50% 50% 0 0;
}
.raccoon-ear.left  { left: -2px; }
.raccoon-ear.right { right: -2px; }
.raccoon-ear::after {
    content: '';
    position: absolute;
    inset: 3px;
    background: #c07070;
    border-radius: 50% 50% 0 0;
}
.raccoon-tail {
    position: absolute;
    bottom: -8px; right: -20px;
    width: 22px; height: 50px;
    background: repeating-linear-gradient(180deg, #6a6a6a 0px, #6a6a6a 6px, #f0f0f0 6px, #f0f0f0 12px);
    border-radius: 50% 50% 40% 40% / 30% 30% 50% 50%;
    transform: rotate(25deg);
}
.raccoon-arm {
    position: absolute;
    bottom: 15px; right: -18px;
    width: 14px; height: 28px;
    background: #6a6a6a;
    border-radius: 6px;
    transform: rotate(-30deg);
    transform-origin: top;
    animation: armSip 3s ease-in-out infinite;
}
@keyframes armSip {
    0%, 60%, 100% { transform: rotate(-30deg); }
    70%, 80% { transform: rotate(-60deg); }
}
.arm-mug {
    position: absolute;
    bottom: -2px; left: -4px;
    width: 18px; height: 16px;
    background: #c8451f;
    border-radius: 3px;
    border: 1px solid rgba(255,255,255,0.1);
}

/* ==========================================================================
   🦆 Platypus (Ornithorhynchus) Character
   ========================================================================== */
.platypus {
    position: absolute;
    bottom: 40px;
    left: 50%; transform: translateX(-50%);
    cursor: pointer;
    animation: platypusFloat 4s ease-in-out infinite;
}
@keyframes platypusFloat {
    0%, 100% { transform: translateX(-50%) translateY(0px) rotate(0deg); }
    25% { transform: translateX(-50%) translateY(-3px) rotate(1deg); }
    75% { transform: translateX(-50%) translateY(-1px) rotate(-1deg); }
}
.platypus-suit {
    width: 55px; height: 70px;
    position: relative;
}
.suit-body {
    position: absolute;
    bottom: 0; left: 50%; transform: translateX(-50%);
    width: 50px; height: 55px;
    background: linear-gradient(180deg, #e0e8f0, #c8d8e8);
    border-radius: 45% 45% 40% 40% / 35% 35% 50% 50%;
    border: 2px solid rgba(100,150,200,0.4);
}
.helmet {
    position: absolute;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 46px; height: 46px;
    background: linear-gradient(135deg, #c8d8e8, #a0b8d0);
    border-radius: 50%;
    border: 2px solid rgba(100,150,200,0.5);
    z-index: 2;
}
.helmet-glass {
    position: absolute;
    inset: 8px;
    background: rgba(150,200,255,0.25);
    border-radius: 50%;
    border: 1px solid rgba(200,230,255,0.5);
}
.helmet-reflection {
    position: absolute;
    top: 10px; left: 12px;
    width: 10px; height: 8px;
    background: rgba(255,255,255,0.4);
    border-radius: 50%;
    transform: rotate(-30deg);
    animation: helmetShine 3s ease-in-out infinite;
}
@keyframes helmetShine {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.9; }
}
.platypus-face {
    position: absolute;
    top: 12px; left: 50%; transform: translateX(-50%);
    width: 30px; height: 24px;
    z-index: 3;
}
.platypus-eye {
    position: absolute;
    top: 2px;
    width: 7px; height: 7px;
    background: #1a1a1a;
    border-radius: 50%;
    box-shadow: 0 0 2px rgba(255,255,255,0.3);
    animation: platypusLook 5s ease-in-out infinite;
}
.platypus-eye.left  { left: 2px; }
.platypus-eye.right { right: 2px; }
@keyframes platypusLook {
    0%, 40%, 100% { transform: translateX(0); }
    50%, 90% { transform: translateX(3px); }
    70% { transform: translateX(-3px); }
}
.platypus-bill {
    position: absolute;
    bottom: -2px; left: 50%; transform: translateX(-50%);
    width: 20px; height: 8px;
    background: linear-gradient(180deg, #c8a060, #a08040);
    border-radius: 2px 2px 8px 8px;
}
.suit-arm {
    position: absolute;
    top: 32px;
    width: 12px; height: 22px;
    background: linear-gradient(180deg, #d8e8f0, #c0d0e0);
    border-radius: 6px;
    border: 1px solid rgba(100,150,200,0.3);
}
.suit-arm.left-arm  { left: -8px; transform: rotate(-10deg); }
.suit-arm.right-arm { right: -8px; transform: rotate(10deg); animation: rightArmWave 4s ease-in-out infinite; }
@keyframes rightArmWave {
    0%, 70%, 100% { transform: rotate(10deg); }
    80%, 90% { transform: rotate(30deg); }
}
.platypus-tail {
    position: absolute;
    bottom: -5px; right: -15px;
    width: 25px; height: 12px;
    background: linear-gradient(180deg, #a0b8c8, #8098a8);
    border-radius: 5px 15px 15px 5px;
    transform: rotate(10deg);
}

/* ==========================================================================
   Shared Character Elements
   ========================================================================== */
.char-bubble {
    position: absolute;
    top: -38px;
    left: 50%; transform: translateX(-50%);
    background: rgba(15,23,42,0.9);
    border: 1px solid rgba(var(--accent), 0.4);
    border-radius: 12px 12px 12px 4px;
    padding: 5px 10px;
    font-size: 0.72rem;
    white-space: nowrap;
    color: var(--text-secondary);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(8px);
}
.char-bubble.show { opacity: 1; }

.character:hover .char-bubble { opacity: 1; }

.character.reacting {
    animation: charReact 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
@keyframes charReact {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    20% { transform: translateX(-50%) rotate(-8deg); }
    40% { transform: translateX(-50%) rotate(8deg); }
    60% { transform: translateX(-50%) rotate(-4deg); }
    80% { transform: translateX(-50%) rotate(4deg); }
}

/* Character info bar */
.char-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding: 8px 14px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.05);
}
.char-name { font-size: 0.82rem; font-weight: 600; }
.char-mood { font-size: 0.78rem; color: var(--text-secondary); }

/* ==========================================================================
   🧬 MBTI × Big5 성격 진단 시스템
   ========================================================================== */

/* Accuracy Banner */
.accuracy-banner {
    background: rgba(var(--accent), 0.06);
    border: 1px solid rgba(var(--accent), 0.18);
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 20px;
}
.accuracy-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}
.accuracy-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
    white-space: nowrap;
}
.accuracy-bar-wrap {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
    overflow: hidden;
}
.accuracy-bar {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, rgb(var(--accent)), rgb(var(--accent-secondary)));
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease;
}
.accuracy-pct {
    font-size: 0.9rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: rgb(var(--accent));
    white-space: nowrap;
    min-width: 38px;
}
.accuracy-tip {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Personality Layout: 2-column */
.personality-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
@media (max-width: 900px) {
    .personality-layout { grid-template-columns: 1fr; }
}

.diag-panel {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.diag-panel-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.diag-panel-header h3 {
    font-size: 1.05rem;
    margin: 0;
}

/* Diagnosis Tabs */
.diag-tabs {
    display: flex;
    gap: 6px;
    background: rgba(0,0,0,0.25);
    border-radius: 10px;
    padding: 4px;
}
.diag-tab {
    flex: 1;
    padding: 7px 12px;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: var(--font-sans);
}
.diag-tab.active {
    background: rgba(var(--accent), 0.25);
    color: rgb(var(--accent));
    box-shadow: 0 2px 8px rgba(var(--accent), 0.2);
}

.diag-tab-content { display: none; }
.diag-tab-content.active { display: block; }

/* MBTI 16-type Grid */
.mbti-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.mbti-group-label {
    grid-column: 1 / -1;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 0 2px;
}
.mbti-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 9px 4px;
    border-radius: 10px;
    border: 1.5px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}
.mbti-type-btn:hover {
    border-color: var(--type-color);
    background: rgba(255,255,255,0.07);
    color: var(--text-primary);
    transform: translateY(-2px);
}
.mbti-type-btn.selected {
    border-color: var(--type-color);
    background: color-mix(in srgb, var(--type-color) 20%, transparent);
    color: var(--text-primary);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--type-color) 30%, transparent);
}
.mbti-type-code {
    font-size: 0.85rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--type-color);
}
.mbti-type-name {
    font-size: 0.62rem;
    color: inherit;
}

/* MBTI Dimension Sliders */
.mbti-dim-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.mbti-dim-row {}
.mbti-dim-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.mbti-dim-left, .mbti-dim-right {
    font-size: 0.8rem;
    font-weight: 700;
    color: rgb(var(--accent));
}
.mbti-dim-mid {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
}
.mbti-dim-slider {
    width: 100%;
    accent-color: rgb(var(--accent));
    height: 6px;
    border-radius: 3px;
}
.mbti-dim-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin: 5px 0 0;
    line-height: 1.4;
}

/* Big5 Questions */
.big5-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.big5-trait-block {}
.big5-trait-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}
.big5-trait-emoji {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}
.big5-trait-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgb(var(--accent));
    margin-bottom: 2px;
}
.big5-trait-question {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.big5-options {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.big5-opt-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1.5px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    font-family: var(--font-sans);
    color: var(--text-secondary);
}
.big5-opt-btn:hover {
    border-color: rgba(var(--accent), 0.35);
    background: rgba(var(--accent), 0.06);
    color: var(--text-primary);
}
.big5-opt-btn.selected {
    border-color: rgba(var(--accent), 0.6);
    background: rgba(var(--accent), 0.15);
    color: var(--text-primary);
}
.big5-opt-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(var(--accent), 0.15);
    color: rgb(var(--accent));
    font-size: 0.72rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.big5-opt-btn.selected .big5-opt-num {
    background: rgb(var(--accent));
    color: white;
}
.big5-opt-text {
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Diagnose Button */
.diag-submit-btn {
    width: 100%;
    padding: 16px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 14px;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 30px rgba(var(--accent), 0.35);
    margin-bottom: 28px;
    transition: all 0.3s ease;
}
.diag-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(var(--accent), 0.55);
}

/* ==========================================================================
   Result Card
   ========================================================================== */
.personality-result {
    animation: resultFadeIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes resultFadeIn {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.result-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1.5px solid rgba(var(--rtype-color), 0.35);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 0 60px rgba(var(--rtype-color), 0.12), 0 20px 50px rgba(0,0,0,0.4);
    backdrop-filter: blur(20px);
}

.result-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}
.result-emoji {
    font-size: 3rem;
    flex-shrink: 0;
    line-height: 1;
    filter: drop-shadow(0 0 12px rgba(var(--rtype-color), 0.6));
}
.result-title-block { flex: 1; }
.result-type-name {
    font-size: 1.6rem;
    font-weight: 900;
    background: linear-gradient(135deg, rgb(var(--rtype-color)), rgba(var(--rtype-color), 0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}
.result-tagline {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.result-mbti-badge {
    display: inline-block;
    background: rgba(var(--rtype-color), 0.15);
    border: 1px solid rgba(var(--rtype-color), 0.4);
    border-radius: 8px;
    padding: 3px 10px;
    font-size: 0.8rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: rgb(var(--rtype-color));
}
.result-accuracy-badge {
    flex-shrink: 0;
    background: rgba(72, 187, 120, 0.15);
    border: 1px solid rgba(72, 187, 120, 0.4);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #48bb78;
    white-space: nowrap;
}
.result-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
    padding: 14px 18px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    border-left: 3px solid rgba(var(--rtype-color), 0.5);
}

.result-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
@media (max-width: 700px) {
    .result-sections { grid-template-columns: 1fr; }
}
.result-section-sounds { grid-column: 1 / -1; }

.result-section {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 16px;
}
.result-section h4 {
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: rgb(var(--rtype-color));
}
.result-list {
    list-style: none;
    padding: 0; margin: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.result-list li {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    padding-left: 4px;
}

.result-sound-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.result-sound-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1.5px solid rgba(var(--rtype-color), 0.4);
    background: rgba(var(--rtype-color), 0.1);
    color: rgb(var(--rtype-color));
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-sans);
}
.result-sound-btn:hover {
    background: rgba(var(--rtype-color), 0.25);
    transform: translateY(-1px);
}
.result-sound-btn.binaural {
    border-color: rgba(154, 117, 234, 0.5);
    background: rgba(154, 117, 234, 0.1);
    color: #a78bfa;
}
.result-room-rec {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}
.result-room-btn {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid rgba(var(--rtype-color), 0.4);
    background: rgba(var(--rtype-color), 0.12);
    color: rgb(var(--rtype-color));
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-sans);
    margin-left: auto;
}
.result-room-btn:hover {
    background: rgba(var(--rtype-color), 0.25);
}

/* Type Comparison Mini Grid */
.result-types-mini {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 20px;
    margin-top: 4px;
}
.result-types-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
@media (max-width: 600px) {
    .result-types-grid { grid-template-columns: repeat(2, 1fr); }
}
.result-mini-type {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    text-align: left;
}
.result-mini-type:hover {
    border-color: rgba(var(--m-color), 0.4);
    background: rgba(var(--m-color), 0.08);
    color: var(--text-primary);
    transform: translateY(-1px);
}
.result-mini-type.current {
    border-color: rgba(var(--rtype-color), 0.6);
    background: rgba(var(--rtype-color), 0.15);
    color: var(--text-primary);
    font-weight: 700;
}

/* ==========================================================================
   Character Interaction & Bubbles
   ========================================================================== */
.character.jump {
    animation: charJump 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes charJump {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.05); }
    100% { transform: translateY(0) scale(1); }
}

.char-bubble {
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%) translateY(10px) scale(0.9);
    background: rgba(255, 255, 255, 0.95);
    color: #1a202c;
    padding: 10px 16px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    opacity: 0;
    pointer-events: none;
    z-index: 50;
    animation: bubblePop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.char-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.95) transparent transparent transparent;
}

@keyframes bubblePop {
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

/* ==========================================================================
   Dynamic Reactive Rooms (Lighting & Decor)
   ========================================================================== */

/* ── 1. Lighting Overlay (Sound Reactive) ── */
.room-lighting-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 1.5s ease, background 1.5s ease;
    mix-blend-mode: multiply;
}

.rain-active .room-lighting-overlay {
    background: #0f172a;
    opacity: 0.45;
}
.rain-active.cozy-room::after {
    content: '';
    position: absolute;
    inset: 0;
    background: white;
    opacity: 0;
    z-index: 9;
    pointer-events: none;
    animation: lightningFlash 15s infinite;
}
@keyframes lightningFlash {
    0%, 95%, 98%, 100% { opacity: 0; }
    96%, 97% { opacity: 0.15; }
}

.campfire-active .room-lighting-overlay {
    background: radial-gradient(circle at 70% 80%, rgba(249, 115, 22, 0.4) 0%, rgba(0,0,0,0.1) 70%);
    opacity: 1;
    mix-blend-mode: overlay;
    animation: fireFlicker 3s infinite alternate;
}
@keyframes fireFlicker {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.walk-active .room-lighting-overlay {
    background: radial-gradient(circle at 10% 90%, rgba(34, 197, 94, 0.28) 0%, rgba(0,0,0,0) 80%);
    opacity: 1;
    mix-blend-mode: screen;
    animation: leafBreeze 8s ease-in-out infinite alternate;
}
@keyframes leafBreeze {
    0% { transform: scale(1) translate3d(0,0,0); opacity: 0.8; }
    100% { transform: scale(1.08) translate3d(5px,-5px,0); opacity: 1.0; }
}
.walk-active .cozy-room-stage {
    animation: gentleSway 10s ease-in-out infinite alternate;
}
@keyframes gentleSway {
    0% { transform: rotate(0deg) translate3d(0,0,0); }
    100% { transform: rotate(0.4deg) translate3d(2px, 1px, 0); }
}

.white-active .room-lighting-overlay {
    background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.15) 0%, rgba(15, 23, 42, 0.35) 100%);
    opacity: 1;
    mix-blend-mode: overlay;
    backdrop-filter: saturate(0.82) contrast(1.03);
    animation: zenPulse 6s ease-in-out infinite alternate;
}
@keyframes zenPulse {
    0% { opacity: 0.7; filter: blur(0.2px); }
    100% { opacity: 1.0; filter: blur(0px); }
}

/* ── 2. Personality Decor Layer ── */
.room-decor-layer {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
}
.decor-item {
    position: absolute;
    opacity: 0;
    transform: scale(0.9) translateY(10px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.decor-rug {
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%) scale(0.9) translateY(10px);
    width: 140px;
    height: 35px;
    background: #64748b;
    border-radius: 50%;
    border: 2px dashed #94a3b8;
}

.decor-plant {
    bottom: 25px;
    left: 20px;
    width: 25px;
    height: 45px;
    background: linear-gradient(180deg, #22c55e, #166534);
    border-radius: 50% 50% 10% 10%;
    box-shadow: -2px 5px 10px rgba(0,0,0,0.4);
}
.decor-plant::after {
    content: '';
    position: absolute;
    bottom: -10px; left: 2px;
    width: 21px; height: 18px;
    background: #c2410c;
    border-radius: 3px 3px 6px 6px;
}

.decor-whiteboard {
    top: 25px;
    left: 25px;
    width: 60px;
    height: 45px;
    background: #f8fafc;
    border: 3px solid #cbd5e1;
    border-radius: 4px;
    box-shadow: 2px 4px 10px rgba(0,0,0,0.3);
}
.decor-whiteboard::before {
    content: '';
    position: absolute;
    top: 10px; left: 8px;
    width: 30px; height: 2px;
    background: #ef4444;
    box-shadow: 0 6px 0 #3b82f6, 0 12px 0 #10b981;
}

.decor-easel {
    bottom: 30px;
    left: 25px;
    width: 40px;
    height: 50px;
    background: #fef08a;
    border: 2px solid #b45309;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.4);
}
.decor-easel::after {
    content: '🎨';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
}
.decor-easel::before {
    content: '';
    position: absolute;
    bottom: -15px; left: 5px; right: 5px;
    border-top: 15px solid transparent;
    border-bottom: 0px solid transparent;
    border-left: 15px solid #92400e;
    border-right: 15px solid #92400e;
}

.decor-poster {
    top: 20px;
    right: 25px;
    width: 35px;
    height: 50px;
    background: linear-gradient(135deg, #a78bfa, #c084fc);
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transform: rotate(3deg) scale(0.9) translateY(10px);
}

.cozy-room-stage.pers-driver .decor-whiteboard,
.cozy-room-stage.pers-achiever .decor-whiteboard,
.cozy-room-stage.pers-analyst .decor-whiteboard {
    opacity: 1; transform: scale(1) translateY(0);
}

.cozy-room-stage.pers-creative .decor-easel,
.cozy-room-stage.pers-freespirit .decor-easel {
    opacity: 1; transform: scale(1) translateY(0);
}

.cozy-room-stage.pers-healer .decor-plant,
.cozy-room-stage.pers-dreamer .decor-plant,
.cozy-room-stage.pers-perfectionist .decor-plant,
.cozy-room-stage.pers-explorer .decor-plant {
    opacity: 1; transform: scale(1) translateY(0);
}

.cozy-room-stage.pers-healer .decor-rug,
.cozy-room-stage.pers-dreamer .decor-rug,
.cozy-room-stage.pers-creative .decor-rug {
    opacity: 1; transform: translateX(-50%) scale(1) translateY(0);
}

.cozy-room-stage.pers-explorer .decor-poster,
.cozy-room-stage.pers-freespirit .decor-poster,
.cozy-room-stage.pers-achiever .decor-poster {
    opacity: 1; transform: rotate(3deg) scale(1) translateY(0);
}

/* ==========================================================================
   Virtual Pet & Adventure System
   ========================================================================== */

/* Pet Status Widget (Header) */
#pet-widget {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-right: 15px;
}
.pet-widget-content {
    display: flex;
    align-items: center;
    gap: 10px;
}
.pet-level {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fcd34d;
}
.pet-exp-bar {
    width: 60px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}
.pet-exp-fill {
    height: 100%;
    background: #34d399;
    transition: width 0.3s ease;
}
.pet-snack-btn, .pet-adv-btn {
    padding: 4px 10px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    color: white;
}
.pet-snack-btn:hover { background: rgba(255, 255, 255, 0.2); }
.pet-adv-btn.active {
    background: #ef4444;
    border-color: #f87171;
    animation: pulse 2s infinite;
}

/* Pet Hats & Hearts */
.pet-hat {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%) rotate(10deg);
    font-size: 1.5rem;
    z-index: 10;
}
.pet-heart-burst {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    z-index: 10;
    animation: floatUpFade 1.5s forwards;
}

@keyframes floatUpFade {
    0% { opacity: 1; transform: translate(-50%, 0) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -40px) scale(1.5); }
}

/* Pet Interactive Animations */
.character {
    cursor: pointer; /* make pet clickable */
    transition: transform 0.3s ease;
}

.pet-jump {
    animation: petJumpAnim 0.5s ease;
}
@keyframes petJumpAnim {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.1); }
}

.pet-spin {
    animation: petSpinAnim 0.6s ease;
}
@keyframes petSpinAnim {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

/* Adventure Walk Animation */
.adventure-walk {
    animation: petWalkOffScreen 4s forwards !important;
}

@keyframes petWalkOffScreen {
    0% { transform: scale(1); }
    20% { transform: scale(1.1) translateY(-10px) rotate(5deg); }
    40% { transform: scale(0.9) translateY(0) rotate(-5deg); }
    60% { transform: scale(0.8) translateY(-5px) translateX(30px) rotate(5deg); }
    100% { transform: scale(0.5) translateX(200px) translateY(10px) rotate(-10deg); opacity: 0; }
}

/* ==========================================================================
   Mobile Mode (Native App Layout Overrides)
   ========================================================================== */

/* Hide sidebar and toggle completely in mobile mode */
.mobile-mode .sidebar {
    display: flex !important; /* Override none */
    position: fixed;
    top: 0;
    left: -290px; /* Hide offscreen */
    width: 280px;
    height: 100vh;
    margin: 0 !important;
    border-radius: 0 24px 24px 0 !important;
    border-left: none !important;
    z-index: 100001; /* Above dimming overlay */
    background: rgba(10, 10, 15, 0.96);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    box-shadow: 20px 0 50px rgba(0,0,0,0.8);
    transition: var(--transition-smooth);
    padding: 24px 16px;
}
.mobile-mode .sidebar.drawer-open {
    left: 0 !important; /* Slide in */
}
.mobile-mode #sidebar-toggle {
    display: inline-flex !important; /* Override none */
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    z-index: 99;
}

/* Sidebar Dim Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100000;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
}
.mobile-mode .sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Main stage takes full width */
.mobile-mode .main-stage {
    margin-left: 0 !important;
    padding-bottom: 80px; /* Space for bottom nav */
}

/* Bottom Navigation Bar Styles */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 9999;
    flex-direction: row;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
}
.mobile-mode .bottom-nav {
    display: flex;
    overflow-x: hidden; /* No scrollbar/no scrolling */
    justify-content: space-around; /* Evenly spaced */
    padding: 0 12px;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.65rem;
    gap: 4px;
    flex: 0 0 68px;
    min-width: 68px;
    height: 100%;
    transition: all 0.2s ease;
}
.mobile-mode .bottom-nav-item {
    flex: 1; /* Stretch evenly across screen width */
    min-width: 0;
}
.bottom-nav-item svg {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}
.bottom-nav-item.active {
    color: rgb(var(--accent));
}
.bottom-nav-item.active svg {
    opacity: 1;
}

/* Mobile Timer adjustments */
.mobile-mode #pane-timer {
    display: flex !important; /* Force flex in active state */
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 160px);
}
.mobile-mode .timer-circle {
    width: 280px;
    height: 280px;
    margin: 0 auto;
}
.mobile-mode .time-display {
    font-size: 4.5rem;
}

/* Mobile Pet Widget adjustments (Floating Bubble) */
.mobile-mode #pet-widget {
    position: fixed;
    bottom: 80px;
    right: 15px;
    margin: 0;
    background: rgba(20, 20, 25, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    z-index: 9998;
    padding: 8px 12px;
}

/* ==========================================================================
   Module 8: Blog & Guide Pane (Phase 7)
   ========================================================================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.blog-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 12px;
    backdrop-filter: blur(var(--user-blur));
    -webkit-backdrop-filter: blur(var(--user-blur));
}

.blog-card:hover {
    transform: translateY(-5px);
    border-color: rgba(var(--accent), 0.5);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), inset 0 0 15px var(--glass-border-glow);
}

.blog-card-meta {
    font-size: 0.8rem;
    color: rgb(var(--accent));
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
}

.blog-card-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-article-content h2 {
    font-size: 1.5rem;
    color: rgb(var(--accent));
    margin-top: 32px;
    margin-bottom: 16px;
}

.blog-article-content h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-top: 24px;
    margin-bottom: 12px;
}

.blog-article-content p {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.blog-article-content ul, .blog-article-content ol {
    margin-left: 24px;
    margin-bottom: 24px;
    color: var(--text-secondary);
}

.blog-article-content li {
    margin-bottom: 8px;
}

.blog-article-content strong {
    color: var(--text-primary);
}

/* Pet State Animations */
.pet-sleeping {
    filter: brightness(0.7) sepia(0.2);
    animation: pet-breathe 3s infinite ease-in-out;
}

@keyframes pet-breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05) translateY(-2px); }
}

/* ==========================================================================
   Zen (Focus) Mode
   ========================================================================== */
body.zen-mode .sidebar { transform: translateX(-100%); pointer-events: none; opacity: 0; }
body.zen-mode .main-stage { margin-left: 0 !important; }
body.zen-mode .dashboard-header { opacity: 0; pointer-events: none; height: 0; min-height: 0; padding: 0; overflow: hidden; }
body.zen-mode .stats-chip { display: none; }
body.zen-mode .ad-bottom-bar { display: none; }

body.zen-mode::after {
    content: '🧘 Zen Mode — ESC로 해제';
    position: fixed;
    bottom: 16px;
    right: 16px;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
    z-index: 9999;
    pointer-events: none;
}

/* ==========================================================================
   Onboarding Tutorial Overlay
   ========================================================================== */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s ease;
}

.onboarding-card {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    max-width: 520px;
    width: 90%;
    text-align: center;
}

.onboarding-card h2 { font-size: 1.6rem; margin-bottom: 12px; }
.onboarding-card p { color: var(--text-secondary); margin-bottom: 24px; line-height: 1.6; }
.onboarding-emoji { font-size: 3.5rem; margin-bottom: 16px; display: block; }
.onboarding-step-dots { display: flex; gap: 8px; justify-content: center; margin-bottom: 20px; }
.onboarding-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.15); transition: all 0.3s; }
.onboarding-dot.active { background: rgb(var(--accent)); transform: scale(1.3); }

.onboarding-actions { display: flex; gap: 12px; justify-content: center; }
.onboarding-actions .btn { min-width: 120px; }

/* ==========================================================================
   Daily Summary Report Modal
   ========================================================================== */
.daily-summary-card {
    background: linear-gradient(135deg, rgba(var(--accent), 0.08), rgba(var(--accent-secondary), 0.05));
    border: 1px solid rgba(var(--accent), 0.2);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
}

.daily-summary-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    margin-bottom: 8px;
}

.daily-summary-stat .stat-emoji { font-size: 1.8rem; }
.daily-summary-stat .stat-value { font-size: 1.5rem; font-weight: 700; }
.daily-summary-stat .stat-label { font-size: 0.8rem; color: var(--text-secondary); }

/* ==========================================================================
   Theme Selector - Additional buttons
   ========================================================================== */
.theme-btn[data-theme="ocean"]::before { content: '🌊'; }
.theme-btn[data-theme="sakura"]::before { content: '🌸'; }

/* ==========================================================================
   Interactive Onboarding Tutorial Modal Styles
   ========================================================================== */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 5, 10, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10005;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.4s ease;
    opacity: 1;
}
.onboarding-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}
.onboarding-card {
    width: 90%;
    max-width: 480px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(147, 51, 234, 0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    transform: translateY(0);
    transition: transform 0.3s ease;
}
.onboarding-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, rgb(var(--accent-secondary)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.onboarding-icon {
    font-size: 3rem;
    filter: drop-shadow(0 0 15px rgba(var(--accent), 0.5));
    margin: 12px 0;
    animation: pulseGlow 2s infinite ease-in-out;
}
@keyframes pulseGlow {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 15px rgba(var(--accent), 0.5)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 25px rgba(var(--accent), 0.8)); }
}
.onboarding-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.onboarding-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 16px;
}
.onboarding-dots {
    display: flex;
    gap: 8px;
}
.onboarding-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}
.onboarding-dot.active {
    background: rgb(var(--accent));
    transform: scale(1.25);
}

/* ==========================================================================
   ASMR Reactive Visual Effect Styles
   ========================================================================== */
/* Reinforced rain water droplets falling on glass windows */
.window-drop {
    position: absolute;
    top: -10px;
    width: 2px;
    height: 14px;
    background: linear-gradient(transparent, rgba(59, 130, 246, 0.7));
    animation: dropFall linear infinite;
    pointer-events: none;
    border-radius: 50%;
}
@keyframes dropFall {
    0% { transform: translateY(-10px); opacity: 0; }
    20% { opacity: 1; }
    90% { opacity: 0.8; }
    100% { transform: translateY(110px); opacity: 0; }
}

/* Slow swaying relaxing visual representing ambient ocean waves */
@keyframes waveSway {
    0%, 100% { transform: rotate(0deg) translate(0, 0); }
    25% { transform: rotate(0.08deg) translate(0.5px, 1px); }
    50% { transform: rotate(-0.05deg) translate(-0.5px, 0.5px); }
    75% { transform: rotate(0.05deg) translate(0.5px, -0.5px); }
}
.waves-sway-active {
    animation: waveSway 10s ease-in-out infinite !important;
}

/* ==========================================================================
   Phase 10: Apple Studio Display & Gamification Style Extensions
   ========================================================================== */

/* 🖥️ Apple Studio Display Monitor styling */
.smart-monitor-container {
    position: absolute;
    top: 15px;
    right: 20px;
    width: 130px;
    height: 75px;
    z-index: 99;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.smart-monitor-container:hover {
    width: 290px;
    height: 165px;
    z-index: 999;
    transform: translateY(-5px);
}

.monitor-bezel {
    width: 100%;
    height: 100%;
    background: #1f2022;
    border: 3.5px solid #2d2e30;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.05);
    padding: 1px;
    position: relative;
    box-sizing: border-box;
}

.monitor-screen {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.monitor-screen iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none; /* Let hover expand work smoothly without iframe stealing focus immediately */
}

.smart-monitor-container:hover .monitor-screen iframe {
    pointer-events: auto; /* Enable controls once fully hovered/expanded */
}

.monitor-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    border-radius: 5px;
}

.monitor-glass-reflection {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 45%);
}

.unmute-badge {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 2.5px 8px;
    font-size: 0.6rem;
    border-radius: 10px;
    backdrop-filter: blur(4px);
    white-space: nowrap;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.smart-monitor-container:hover .unmute-badge {
    opacity: 0;
}

/* Studio Display Metal Neck & Base */
.monitor-stand-neck {
    width: 14px;
    height: 16px;
    background: linear-gradient(90deg, #52525b 0%, #a1a1aa 50%, #3f3f46 100%);
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.smart-monitor-container:hover .monitor-stand-neck {
    height: 22px;
    width: 22px;
}

.monitor-stand-base {
    width: 44px;
    height: 3.5px;
    background: linear-gradient(180deg, #a1a1aa 0%, #3f3f46 100%);
    border-radius: 3px 3px 0 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.smart-monitor-container:hover .monitor-stand-base {
    width: 80px;
}

/* Remote & Power Quick Buttons */
.monitor-bezel-controls {
    position: absolute;
    right: -32px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.smart-monitor-container:hover .monitor-bezel-controls {
    opacity: 1;
    pointer-events: auto;
    right: -42px;
}

.bezel-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.bezel-btn:hover {
    transform: scale(1.12);
    background: rgba(var(--accent), 0.75);
    border-color: rgba(var(--accent), 0.4);
}

/* Power Off State */
.smart-monitor-container.power-off .monitor-screen {
    background: #09090b !important;
}

.smart-monitor-container.power-off iframe,
.smart-monitor-container.power-off .unmute-badge {
    display: none !important;
}

.smart-monitor-container.power-off .monitor-overlay::after {
    content: '🔌 OFF';
    color: var(--text-muted);
    font-size: 0.55rem;
    font-weight: 700;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    letter-spacing: 0.08em;
}

.smart-monitor-container.power-off:hover .monitor-overlay::after {
    font-size: 0.75rem;
}

.smart-monitor-container.collapsed-cinema {
    display: none !important;
}

/* Remote Control Modal Buttons */
.remote-channels {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.remote-channel-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-family: var(--font-sans);
}

.remote-channel-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    transform: translateY(-1px);
}

.remote-channel-btn.active {
    background: rgba(var(--accent), 0.15) !important;
    border-color: rgba(var(--accent), 0.5) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(var(--accent), 0.2) !important;
}

.channel-emoji {
    font-size: 1.1rem;
}

.channel-name {
    font-size: 0.85rem;
    font-weight: 500;
}

/* 🔥 Focus Study Combo Game Widget */
.focus-combo-widget {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 15px;
    background: rgba(15, 23, 42, 0.75);
    border: 1.5px solid rgba(249, 115, 22, 0.4);
    border-radius: 20px;
    color: #fff;
    font-weight: 800;
    font-size: 0.8rem;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.25), inset 0 0 6px rgba(249, 115, 22, 0.1);
    backdrop-filter: blur(8px);
    z-index: 98;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.focus-combo-widget.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
    animation: pulseFire 2.5s ease-in-out infinite;
}

@keyframes pulseFire {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(249, 115, 22, 0.25);
    }
    50% {
        box-shadow: 0 4px 22px rgba(249, 115, 22, 0.5), 0 0 10px rgba(249, 115, 22, 0.3);
        transform: translateX(-50%) translateY(-2px) scale(1.04);
    }
}

.combo-badge-fire {
    font-size: 1rem;
    display: inline-block;
    animation: flameFlicker 0.4s ease infinite alternate;
}

@keyframes flameFlicker {
    0% { transform: scale(1) rotate(-3deg); }
    100% { transform: scale(1.15) rotate(3deg); filter: drop-shadow(0 0 2px rgba(249, 115, 22, 0.8)); }
}

.combo-value {
    color: #f97316;
    font-family: var(--font-mono);
}

/* Floating Combo Up Burst effect */
.floating-combo-burst {
    position: absolute;
    pointer-events: none;
    color: #f97316;
    font-weight: 900;
    font-size: 0.9rem;
    z-index: 10000;
    animation: floatUpBurst 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    text-shadow: 0 0 6px rgba(249, 115, 22, 0.8), 0 1px 2px rgba(0,0,0,0.5);
    white-space: nowrap;
}

@keyframes floatUpBurst {
    0% { transform: translateY(0) scale(0.7); opacity: 1; }
    50% { opacity: 1; }
    100% { transform: translateY(-45px) scale(1.15); opacity: 0; }
}

/* 🐧 Cute Character 360 Spin Anim */
.character {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.character:hover {
    transform: scale(1.08) !important;
}

.character.char-spin {
    animation: spin360 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes spin360 {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1) rotate(360deg); }
}

/* Floating speech hearts */
.floating-heart {
    position: absolute;
    pointer-events: none;
    z-index: 1000;
    font-size: 1.2rem;
    animation: floatHeart 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes floatHeart {
    0% { transform: translateY(0) scale(0.5) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-60px) scale(1.2) rotate(15deg); opacity: 0; }
}

/* ==========================================================================
   Phase 11: Immersive Theater Mode & Mobile Aesthetic Extensions
   ========================================================================== */

/* 🎭 Theater Mode Toggle Button */
.theater-toggle-btn {
    position: absolute;
    top: 15px;
    left: 20px;
    z-index: 999;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.theater-toggle-btn:hover {
    background: rgba(var(--accent), 0.75);
    border-color: rgba(var(--accent), 0.4);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(var(--accent), 0.3);
}

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

/* 🎭 Fullscreen Immersive Stage */
body.theater-active .cozy-room-stage {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    border-radius: 0;
    background: #050508;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

body.theater-active .cozy-room {
    height: 100vh;
}

/* Ensure other room items scale up elegantly in theater mode */
body.theater-active .room-floor {
    height: 90px;
}
body.theater-active .room-desk {
    bottom: 50px;
    transform: translateX(-50%) scale(1.35) !important;
}
body.theater-active .character {
    transform: scale(1.4) !important;
}
body.theater-active .character:hover {
    transform: scale(1.5) !important;
}
body.theater-active .character.jump {
    animation: spinJump 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}
@keyframes spinJump {
    0% { transform: translateY(0) scale(1.4); }
    50% { transform: translateY(-40px) scale(1.5) rotate(5deg); }
    100% { transform: translateY(0) scale(1.4); }
}

/* Immersive Theater Overlay Layer */
.theater-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 98;
    pointer-events: none;
    flex-direction: column;
    justify-content: space-between;
    padding: 36px 40px;
    box-sizing: border-box;
    background: linear-gradient(180deg, rgba(5,5,10,0.4) 0%, transparent 40%, transparent 70%, rgba(5,5,10,0.6) 100%);
}

body.theater-active .theater-overlay {
    display: flex;
}

body.theater-active .theater-toggle-btn {
    display: none !important; /* Hide open button when active */
}

/* Header Row */
.theater-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.theater-title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 6px 14px;
    border-radius: 14px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.theater-title-icon {
    font-size: 1.1rem;
    animation: swing 3s infinite ease-in-out alternate;
}

@keyframes swing {
    0% { transform: rotate(-5deg); }
    100% { transform: rotate(5deg); }
}

.theater-title-text {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
}

.theater-close-btn {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    padding: 8px 18px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 16px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.theater-close-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}

/* Center Stage Timer */
.theater-center {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.theater-timer-container {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 24px 44px;
    border-radius: 28px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 0 15px rgba(255,255,255,0.03);
    animation: floatPanel 4s infinite ease-in-out;
}

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

.theater-timer-state {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgb(var(--accent-secondary));
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 4px;
    text-shadow: 0 0 10px rgba(var(--accent-secondary), 0.5);
    animation: flashLabel 2s infinite ease-in-out alternate;
}

@keyframes flashLabel {
    0% { opacity: 0.7; }
    100% { opacity: 1; text-shadow: 0 0 18px rgba(var(--accent-secondary), 0.8); }
}

.theater-timer-clock {
    font-family: var(--font-sans);
    font-size: 6.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin: 4px 0;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}

.theater-timer-subtext {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Footer Row */
.theater-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.theater-combo-widget {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 20px;
    background: rgba(249, 115, 22, 0.15);
    border: 1.5px solid rgba(249, 115, 22, 0.4);
    border-radius: 20px;
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.2), inset 0 0 8px rgba(249, 115, 22, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.theater-combo-fire {
    font-size: 1rem;
    animation: flameFlicker 0.4s ease infinite alternate;
}

.theater-combo-val {
    color: #f97316;
    font-family: var(--font-mono);
}

.theater-help-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 500px;
}

/* 💤 Sleep Particle Zzz */
.sleep-zzz {
    position: absolute;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 700;
    pointer-events: none;
    font-size: 1.2rem;
    z-index: 10000;
    animation: floatZzz 3.5s linear forwards;
    text-shadow: 0 0 4px rgba(255,255,255,0.3);
}

@keyframes floatZzz {
    0% { transform: translate(0, 0) scale(0.4) rotate(-5deg); opacity: 0; }
    15% { opacity: 0.8; }
    50% { transform: translate(20px, -45px) scale(1) rotate(15deg); }
    85% { opacity: 0.8; }
    100% { transform: translate(-10px, -110px) scale(0.85) rotate(-10deg); opacity: 0; }
}

/* 🖥️ Theater Studio Display placement */
body.theater-active .smart-monitor-container {
    top: 40px;
    right: 40px;
    width: 150px;
    height: 85px;
}

body.theater-active .smart-monitor-container:hover {
    width: 320px;
    height: 180px;
    transform: translateY(-8px) scale(1.05);
}

/* ==========================================================================
   Mobile-specific Responsiveness Overrides for Immersive Theater View
   ========================================================================== */
@media (max-width: 768px) {
    /* Stage full-screen settings */
    body.theater-active .cozy-room-stage {
        padding: 24px 20px;
    }
    
    body.theater-active .theater-overlay {
        padding: 24px 20px;
    }
    
    body.theater-active .theater-timer-clock {
        font-size: 4.2rem;
    }
    
    body.theater-active .theater-timer-container {
        padding: 16px 28px;
        border-radius: 20px;
        width: 100%;
        max-width: 300px;
    }
    
    body.theater-active .room-desk {
        bottom: 80px;
        transform: translateX(-50%) scale(1.1) !important;
    }
    
    body.theater-active .character {
        transform: scale(1.1) !important;
    }
    
    body.theater-active .character:hover {
        transform: scale(1.18) !important;
    }
    
    /* Reposition Smart display to prevent overlay on timer */
    body.theater-active .smart-monitor-container {
        top: auto;
        bottom: 120px;
        right: 15px;
        width: 110px;
        height: 65px;
        z-index: 100;
    }
    
    body.theater-active .smart-monitor-container:hover {
        width: 210px;
        height: 120px;
        top: auto;
        bottom: 120px;
        right: 15px;
    }
}

/* ==========================================================================
   🧠 블로그 맞춤형 성격 조언 카드 (Blog Personalized Advice Card)
   ========================================================================== */

/* 진단 회원용 프리미엄 글래스모픽 조언 카드 */
.blog-advice-card {
    margin: 32px 0 24px 0;
    padding: 28px;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25), 
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    animation: pulseBorder 6s infinite alternate ease-in-out;
}

.blog-advice-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
    animation: rotateBg 25s linear infinite;
}

@keyframes rotateBg {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulseBorder {
    0% {
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2), 
                    inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }
    100% {
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), 
                    inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
}

.blog-advice-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35), 
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* 카드 헤더 */
.advice-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    position: relative;
    z-index: 2;
}

.advice-emoji {
    font-size: 2.2rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    animation: bounceEmoji 4s infinite ease-in-out;
}

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

.advice-title-block {
    flex: 1;
}

.advice-user-type {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: 0.2px;
}

.advice-tagline {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 2px;
    font-style: italic;
}

.advice-accuracy-badge {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
}

/* 본문 텍스트 */
.advice-body-text {
    font-family: var(--font-sans);
    font-size: 0.88rem;
    line-height: 1.65;
    color: #e2e8f0;
    margin-bottom: 22px;
    position: relative;
    z-index: 2;
}

/* 액션 영역 및 즉시 적용 버튼 */
.advice-action-area {
    display: flex;
    justify-content: flex-start;
    position: relative;
    z-index: 2;
}

.advice-apply-btn {
    pointer-events: auto;
    font-family: var(--font-sans);
    font-size: 0.84rem;
    font-weight: 700;
    padding: 12px 26px;
    border-radius: 50px;
    cursor: pointer;
    background: rgba(var(--btn-bg), 0.25);
    border: 1px solid rgba(var(--btn-bg), 0.6);
    color: #fff;
    box-shadow: 0 4px 15px rgba(var(--btn-bg), 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 8px;
    outline: none;
}

.advice-apply-btn:hover {
    background: rgb(var(--btn-bg));
    border-color: rgb(var(--btn-bg));
    box-shadow: 0 8px 24px rgba(var(--btn-bg), 0.45);
    transform: scale(1.04) translateY(-1px);
}

.advice-apply-btn:active {
    transform: scale(0.97) translateY(1px);
}

/* ──────────────────────────────────────────────────────────────────────────
   미진단 유저용 안내 카드 (Invite Card)
   ────────────────────────────────────────────────────────────────────────── */
.blog-advice-invite-card {
    margin: 32px 0 24px 0;
    padding: 28px;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2), 
                inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-advice-invite-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

.invite-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.invite-emoji {
    font-size: 2.2rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
    animation: rotateInviteEmoji 5s infinite ease-in-out;
}

@keyframes rotateInviteEmoji {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(10deg) scale(1.08); }
}

.invite-title-block {
    flex: 1;
}

.invite-title {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
}

.invite-desc {
    font-family: var(--font-sans);
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.invite-body-text {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    line-height: 1.6;
    color: #cbd5e1;
    margin-bottom: 22px;
}

.invite-action-area {
    display: flex;
    justify-content: flex-start;
}

.invite-btn {
    pointer-events: auto;
    font-family: var(--font-sans);
    font-size: 0.84rem;
    font-weight: 700;
    padding: 12px 26px;
    border-radius: 50px;
    cursor: pointer;
    background: rgba(147, 51, 234, 0.25);
    border: 1px solid rgba(147, 51, 234, 0.6);
    color: #fff;
    box-shadow: 0 4px 15px rgba(147, 51, 234, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 8px;
    outline: none;
}

.invite-btn:hover {
    background: rgb(147, 51, 234);
    border-color: rgb(147, 51, 234);
    box-shadow: 0 8px 24px rgba(147, 51, 234, 0.45);
    transform: scale(1.04) translateY(-1px);
}

.invite-btn:active {
    transform: scale(0.97) translateY(1px);
}

/* 모바일 모드 최적화 */
@media (max-width: 640px) {
    .blog-advice-card, .blog-advice-invite-card {
        padding: 20px;
        margin: 24px 0 16px 0;
        border-radius: 18px;
    }
    
    .advice-card-header, .invite-header {
        gap: 12px;
        flex-wrap: wrap;
    }
    
    .advice-emoji, .invite-emoji {
        font-size: 1.8rem;
    }
    
    .advice-user-type, .invite-title {
        font-size: 0.88rem;
    }
    
    .advice-accuracy-badge {
        font-size: 0.68rem;
        padding: 4px 10px;
    }
    
    .advice-body-text, .invite-body-text {
        font-size: 0.82rem;
        line-height: 1.55;
        margin-bottom: 18px;
    }
    
    .advice-apply-btn, .invite-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 20px;
        font-size: 0.8rem;
    }
}

/* ==========================================================================
   📱 초정밀 모바일 극상 최적화 (Premium Mobile Ultra Optimization)
   ========================================================================== */

@media (max-width: 768px) {
    /* 1. 모바일 뷰 전체 스크롤 및 레이아웃 개선 */
    .app-layout {
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    .main-stage {
        padding: 16px !important;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    /* 2. Cozy Room Stage 모바일 비례 정교화 */
    .cozy-room-stage {
        height: 250px !important;
        border-radius: 20px;
        overflow: hidden;
        position: relative;
        margin-bottom: 16px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* 방 안의 가구 및 캐릭터 비례 축소 */
    .room-desk {
        bottom: 40px !important;
        transform: translateX(-50%) scale(0.82) !important;
    }
    
    .character {
        transform: scale(0.82) !important;
    }
    
    .character:hover, .character:active {
        transform: scale(0.88) !important;
    }
    
    /* 너구리 테이블 위치 조절 */
    .forest-table {
        bottom: 30px !important;
        transform: scale(0.82) !important;
    }
    
    /* 우주정거장 컨트롤 패널 */
    .space-panel {
        bottom: 25px !important;
        transform: scale(0.82) !important;
    }

    /* 캐릭터 말풍선 모바일 최적화 */
    .char-bubble {
        font-size: 0.72rem !important;
        padding: 6px 12px !important;
        max-width: 130px !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
        bottom: 110% !important;
    }

    /* 3. 모바일 사운드 믹서 슬라이더 및 터치 영역 최적화 (터치 미끄러짐 방지) */
    .mixer-card {
        padding: 16px !important;
        border-radius: 18px !important;
    }

    .mixer-card-top {
        margin-bottom: 12px !important;
    }

    .audio-slider-container {
        gap: 8px !important;
    }

    /* 손가락 드래그 쾌적도를 위해 슬라이더 트랙 및 핸들 크기 확대 */
    .audio-slider {
        height: 8px !important;
        border-radius: 4px !important;
    }

    .audio-slider::-webkit-slider-thumb {
        width: 22px !important;
        height: 22px !important;
        border-radius: 50% !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.4) !important;
        background: #fff !important;
        border: 2px solid rgb(var(--accent)) !important;
    }

    .audio-slider::-moz-range-thumb {
        width: 22px !important;
        height: 22px !important;
        border-radius: 50% !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.4) !important;
        background: #fff !important;
        border: 2px solid rgb(var(--accent)) !important;
    }

    /* 4. 몰입 스마트 모니터(유튜브 시네마) 모바일 배치 교정 */
    .smart-monitor-container {
        width: 90px !important;
        height: 55px !important;
        bottom: 85px !important;
        right: 10px !important;
    }

    .smart-monitor-container:hover, .smart-monitor-container:active {
        width: 180px !important;
        height: 105px !important;
        bottom: 85px !important;
        right: 10px !important;
    }

    /* 5. 콤보 위젯 및 극장 모드 뷰 겹침 완전 해결 */
    .focus-combo-widget {
        top: 12px !important;
        left: 12px !important;
        padding: 4px 10px !important;
        font-size: 0.72rem !important;
    }

    .theater-toggle-btn {
        top: 12px !important;
        right: 12px !important;
        padding: 5px 10px !important;
        font-size: 0.72rem !important;
    }

    /* 6. 모바일 극장 오버레이 초대형 타이머 및 레이아웃 */
    .theater-timer-clock {
        font-size: 4rem !important;
    }

    .theater-timer-container {
        padding: 20px 24px !important;
        border-radius: 20px !important;
        max-width: 280px !important;
    }
    
    .theater-help-text {
        font-size: 0.68rem !important;
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    /* 1. 최상단 헤더 축소 및 안전 여백 확보 */
    .header {
        padding: 10px 12px !important;
        margin-bottom: 16px !important;
    }

    .header-title-sec h1 {
        font-size: 1.25rem !important;
    }

    .stats-chip {
        padding: 4px 8px !important;
        font-size: 0.7rem !important;
    }

    /* 2. 모바일 하단 네비게이션바 터치 피드백 강화 */
    .sidebar {
        border-top: 1px solid rgba(255,255,255,0.08) !important;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.3) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
    }

    .menu-item {
        padding: 8px 6px !important;
        border-radius: 12px !important;
    }
    
    .menu-item.active {
        background: rgba(var(--accent), 0.15) !important;
        transform: scale(1.05);
    }

    /* 3. 할 일 & 일기 칸반 보드 카드 축소 조율 */
    .kanban-column {
        min-width: 100% !important;
        margin-bottom: 16px;
    }

    /* 4. 블로그 조언 카드 스크롤 부드러움 하드웨어 가속 적용 */
    .blog-advice-card, .blog-advice-invite-card {
        will-change: transform, box-shadow;
        transform: translate3d(0, 0, 0);
    }
}

/* ==========================================================================
   ⚡ GPU 하드웨어 가속 및 프리미엄 조작감 스타일 패치 (Phase 13)
   ========================================================================== */

/* 1. GPU 가속 레이어 전원 효율 및 프레임 활성화 */
.cozy-room-stage, 
.character, 
.smart-monitor-container,
.theater-overlay,
.theater-timer-container,
.menu-item,
.mixer-card,
.glass-panel,
.blog-advice-card {
    will-change: transform, opacity;
    transform: translate3d(0, 0, 0);
}

/* 2. 볼륨 휠 조정 피드백 팝 효과 */
.vol-percentage {
    display: inline-block;
    transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.15s ease;
}
.vol-percentage.vol-pop {
    transform: scale(1.3) !important;
    color: rgb(var(--accent)) !important;
    text-shadow: 0 0 10px rgba(var(--accent), 0.6);
}

/* 3. 초정밀 글래스모픽 툴팁 디자인 [data-tooltip] */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(8px) scale(0.95);
    background: rgba(15, 23, 42, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
    padding: 6px 12px !important;
    border-radius: 10px !important;
    font-size: 0.75rem !important;
    font-family: var(--font-sans);
    font-weight: 600 !important;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 
                0 0 12px rgba(147, 51, 234, 0.25) !important;
    z-index: 999999 !important;
}

[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
}

/* 4. 모바일 하단 탭바 Active 네온 펄스 인디케이터 */
@media (max-width: 768px) {
    .menu-item {
        position: relative !important;
        overflow: visible !important;
    }
    
    .menu-item.active::after {
        content: '' !important;
        position: absolute !important;
        bottom: -2px !important;
        left: 25% !important;
        width: 50% !important;
        height: 3px !important;
        background: linear-gradient(90deg, rgb(var(--accent-secondary)), rgb(var(--accent))) !important;
        border-radius: 2px !important;
        box-shadow: 0 0 8px rgba(var(--accent), 0.7), 
                    0 0 16px rgba(var(--accent-secondary), 0.5) !important;
        animation: activePulse 2s infinite ease-in-out alternate !important;
    }
}

@keyframes activePulse {
    0% {
        opacity: 0.7;
        transform: scaleX(0.85);
        box-shadow: 0 0 6px rgba(var(--accent), 0.5), 0 0 10px rgba(var(--accent-secondary), 0.3);
    }
    100% {
        opacity: 1;
        transform: scaleX(1.15);
        box-shadow: 0 0 14px rgba(var(--accent), 0.9), 0 0 20px rgba(var(--accent-secondary), 0.7);
    }
}

/* 5. 모바일 0.68배 및 0.58배 스케일링 극상 패치 */
@media (max-width: 480px) {
    /* 0.68배 비례 셋업 */
    .room-desk {
        bottom: 30px !important;
        transform: translateX(-50%) scale(0.68) !important;
    }
    .character {
        transform: scale(0.68) !important;
    }
    .character:hover, .character:active {
        transform: scale(0.72) !important;
    }
    .forest-table {
        bottom: 25px !important;
        transform: scale(0.68) !important;
    }
    .space-panel {
        bottom: 20px !important;
        transform: scale(0.68) !important;
    }
    .char-bubble {
        font-size: 0.65rem !important;
        padding: 5px 10px !important;
        max-width: 110px !important;
        bottom: 105% !important;
    }
}

@media (max-width: 360px) {
    /* 0.58배 기품 넘치는 소형 뷰 */
    .room-desk {
        bottom: 25px !important;
        transform: translateX(-50%) scale(0.58) !important;
    }
    .character {
        transform: scale(0.58) !important;
    }
    .character:hover, .character:active {
        transform: scale(0.62) !important;
    }
    .forest-table {
        bottom: 20px !important;
        transform: scale(0.58) !important;
    }
    .space-panel {
        bottom: 15px !important;
        transform: scale(0.58) !important;
    }
    .cozy-room-stage {
        height: 200px !important;
    }
    .char-bubble {
        font-size: 0.6rem !important;
        padding: 4px 8px !important;
        max-width: 95px !important;
    }
}

/* ==========================================================================
   FocusFlow 14-Channel Sub-Option Tab Buttons Style
   ========================================================================== */
.mixer-sub-options {
    display: flex;
    gap: 6px;
    margin: 12px 0;
    padding: 3px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.sub-option-btn {
    flex: 1;
    padding: 6px 4px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-align: center;
    white-space: nowrap;
}

.sub-option-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.sub-option-btn.active {
    color: var(--text-primary);
    background: rgba(var(--accent), 0.25);
    border: 1px solid rgba(var(--accent), 0.5);
    box-shadow: 0 0 10px rgba(var(--accent), 0.2);
}

/* ==========================================================================
   FocusFlow New Room Active Lighting Overlays (Premium Visual FX)
   ========================================================================== */
.cafe-active #dynamic-lighting-overlay {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, rgba(0, 0, 0, 0) 70%) !important;
    mix-blend-mode: color-dodge;
}

.insects-active #dynamic-lighting-overlay {
    background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, rgba(0, 0, 0, 0) 80%) !important;
    animation: fireflyPulse 6s ease-in-out infinite alternate;
}

@keyframes fireflyPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.9; }
}

.space-active #dynamic-lighting-overlay {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(30, 27, 75, 0.2) 100%) !important;
}

.stream-active #dynamic-lighting-overlay {
    background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, rgba(0, 0, 0, 0) 75%) !important;
}

.train-active #dynamic-lighting-overlay {
    background: rgba(0, 0, 0, 0.05);
    animation: trainLightFlicker 4s steps(4) infinite;
}

@keyframes trainLightFlicker {
    0%, 100% { background: rgba(0, 0, 0, 0.02); }
    45% { background: rgba(0, 0, 0, 0.08); }
    50% { background: rgba(255, 255, 255, 0.02); }
    55% { background: rgba(0, 0, 0, 0.05); }
}

.underwater-active #dynamic-lighting-overlay {
    background: radial-gradient(circle, rgba(14, 165, 233, 0.2) 0%, rgba(15, 23, 42, 0.4) 100%) !important;
    backdrop-filter: blur(0.5px);
    animation: underwaterRipple 8s ease-in-out infinite alternate;
}

@keyframes underwaterRipple {
    0% { filter: hue-rotate(0deg) contrast(1); }
    100% { filter: hue-rotate(15deg) contrast(1.08); }
}

.lofi-active #dynamic-lighting-overlay {
    background: linear-gradient(to bottom, rgba(236, 72, 153, 0.1), rgba(124, 58, 237, 0.08)) !important;
    mix-blend-mode: hard-light;
}

/* ==========================================================================
   FocusFlow MBTI × Big5 Personality Diagnose Premium CSS Styles
   ========================================================================== */
#pane-personality {
    display: none;
    flex-direction: column;
    gap: 24px;
    animation: fadeIn var(--transition-smooth);
}

#pane-personality.active {
    display: flex;
}

/* Accuracy Banner */
.accuracy-banner {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px 20px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

.accuracy-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.accuracy-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 70px;
}

.accuracy-bar-wrap {
    flex: 1;
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.accuracy-bar {
    height: 100%;
    border-radius: 5px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1), background 0.4s ease;
    box-shadow: 0 0 10px rgba(147, 51, 234, 0.5);
}

.accuracy-pct {
    font-size: 1.1rem;
    font-weight: 700;
    color: rgb(var(--accent));
    min-width: 45px;
    text-align: right;
}

.accuracy-tip {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Personality Layout */
.personality-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .personality-layout {
        grid-template-columns: 1fr;
    }
}

.diag-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px;
}

.diag-panel-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 16px;
}

.diag-panel-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.diag-tabs {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3px;
    border-radius: 8px;
}

.diag-tab {
    flex: 1;
    padding: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-align: center;
}

.diag-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.diag-tab.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.diag-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.diag-tab-content.active {
    display: block;
}

/* MBTI Grid */
.mbti-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.mbti-group-label {
    grid-column: span 4;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 12px;
    margin-bottom: 4px;
    border-left: 3px solid rgb(var(--accent));
    padding-left: 8px;
}

.mbti-group-label:first-child {
    margin-top: 0;
}

.mbti-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.mbti-type-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.mbti-type-btn.selected {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--type-color);
    box-shadow: 0 0 15px var(--type-color);
}

.mbti-type-code {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.mbti-type-name {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* MBTI Slider */
.mbti-dim-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mbti-dim-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(255, 255, 255, 0.01);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.mbti-dim-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.mbti-dim-left {
    color: var(--text-primary);
}

.mbti-dim-mid {
    color: rgb(var(--accent));
    font-size: 0.9rem;
}

.mbti-dim-right {
    color: var(--text-primary);
}

.mbti-dim-slider {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    outline: none;
    accent-color: rgb(var(--accent));
    cursor: pointer;
}

.mbti-dim-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

/* Big5 List */
.big5-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.big5-trait-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

.big5-trait-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.big5-trait-emoji {
    font-size: 1.5rem;
}

.big5-trait-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.big5-trait-question {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.big5-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.big5-opt-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.big5-opt-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateX(4px);
}

.big5-opt-btn.selected {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgb(var(--accent));
    box-shadow: 0 0 10px rgba(147, 51, 234, 0.25);
}

.big5-opt-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.big5-opt-btn.selected .big5-opt-num {
    background: rgb(var(--accent));
    color: white;
}

.big5-opt-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.big5-opt-btn.selected .big5-opt-text {
    color: var(--text-primary);
}

/* Submit Button */
.diag-submit-btn {
    align-self: center;
    width: 100%;
    max-width: 400px;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 30px;
    background: linear-gradient(135deg, rgb(var(--accent)) 0%, rgb(var(--accent-secondary)) 100%);
    box-shadow: 0 0 20px rgba(147, 51, 234, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 12px;
}

.diag-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(147, 51, 234, 0.6);
}

/* Result Card */
.personality-result {
    margin-top: 32px;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.result-card {
    border: 1px solid rgba(var(--rtype-color), 0.3);
    background: radial-gradient(circle at top left, rgba(var(--rtype-color), 0.08) 0%, rgba(255, 255, 255, 0.02) 60%);
    border-radius: 20px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 30px rgba(var(--rtype-color), 0.15);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, rgba(var(--rtype-color), 0.8), transparent);
}

.result-header {
    display: flex;
    gap: 20px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 20px;
    flex-wrap: wrap;
}

.result-emoji {
    font-size: 3rem;
    filter: drop-shadow(0 0 10px rgba(var(--rtype-color), 0.5));
}

.result-title-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-type-name {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
}

.result-tagline {
    font-size: 1rem;
    color: var(--text-secondary);
    font-style: italic;
}

.result-mbti-badge {
    align-self: flex-start;
    padding: 3px 10px;
    background: rgba(var(--rtype-color), 0.2);
    border: 1px solid rgba(var(--rtype-color), 0.4);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    margin-top: 6px;
}

.result-accuracy-badge {
    padding: 6px 12px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.result-desc {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.result-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 768px) {
    .result-sections {
        grid-template-columns: 1fr;
    }
}

.result-section {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-section h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    border-left: 4px solid rgba(var(--rtype-color), 0.8);
    padding-left: 10px;
}

.result-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 0;
    list-style: none;
}

.result-list li {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary);
    position: relative;
    padding-left: 16px;
}

.result-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: rgba(var(--rtype-color), 0.8);
    font-weight: bold;
}

.result-section-sounds {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .result-section-sounds {
        grid-column: span 1;
    }
}

.result-sound-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.result-sound-btn {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.result-sound-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(var(--rtype-color), 0.4);
    transform: translateY(-2px);
}

.result-sound-btn.binaural {
    border-color: rgba(var(--rtype-color), 0.3);
}

.result-room-rec {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
    flex-wrap: wrap;
    margin-top: 8px;
}

.result-room-btn {
    margin-left: auto;
    padding: 6px 12px;
    background: rgba(var(--rtype-color), 0.2);
    border: 1px solid rgba(var(--rtype-color), 0.4);
    border-radius: 6px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.result-room-btn:hover {
    background: rgba(var(--rtype-color), 0.3);
    transform: translateX(3px);
}

@media (max-width: 480px) {
    .result-room-btn {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
}

/* Result Types Mini Grid */
.result-types-mini {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 20px;
}

.result-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
}

.result-mini-type {
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.result-mini-type:hover {
    background: rgba(var(--m-color), 0.1);
    border-color: rgba(var(--m-color), 0.3);
}

.result-mini-type.current {
    background: rgba(var(--m-color), 0.2);
    border-color: rgba(var(--m-color), 0.6);
    color: white;
    font-weight: 700;
    box-shadow: 0 0 8px rgba(var(--m-color), 0.25);
}

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

/* Direct Fallback Navigation Shortcuts Hover Styling */
.fallback-direct-link:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(var(--accent), 0.5) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3),
                0 0 15px rgba(var(--accent), 0.25) !important;
}

.fallback-direct-link:active {
    transform: translateY(-1px);
}




/* ==========================================================================
   Workspace Layout Overhaul & Mission Control Grid Styles
   ========================================================================== */
.mission-control-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    flex-grow: 1;
    width: 100%;
    margin-top: 10px;
}

.dashboard-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100%;
}

.preset-launcher-bar {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.preset-trigger-btn:hover {
    background: rgba(var(--preset-color), 0.2) !important;
    border-color: rgba(var(--preset-color), 0.5) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(var(--preset-color), 0.2);
}

/* Audio Visualizer styling */
.live-visualizer-sec {
    box-shadow: inset 0 0 15px rgba(0,0,0,0.5);
}

/* Floating Navigation Dock spring hovers */
.menu-item {
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.menu-item:hover {
    transform: translateX(4px) scale(1.02);
}

/* Control center slide transitions */
#control-center-panel {
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
}

@media (max-width: 1024px) {
    .mission-control-grid {
        grid-template-columns: 1fr !important;
    }
    .sidebar {
        margin: 0 !important;
        height: 100vh !important;
        border-radius: 0 !important;
        border-right: 1px solid var(--glass-border) !important;
        border-left: none !important;
    }
    .main-stage {
        margin: 0 !important;
        height: 100vh !important;
        border-radius: 0 !important;
        border: none !important;
    }
}

/* Premium Mobile-specific Responsive Spacing overrides */
@media (max-width: 600px) {
    .content-pane {
        padding: 16px !important;
    }
    .glass-panel {
        padding: 16px !important;
        border-radius: 16px !important;
    }
    .header {
        padding: 0 16px !important;
    }
    .pomo-dial-sec {
        width: 240px !important;
        height: 240px !important;
        margin-bottom: 20px !important;
    }
    .time-display {
        font-size: 3.5rem !important;
    }
    .binaural-options {
        grid-template-columns: 1fr !important;
    }
    .stopwatch-controls, .breathing-controls {
        flex-wrap: wrap;
        gap: 8px;
    }
    .btn {
        padding: 10px 16px !important;
        font-size: 0.85rem !important;
    }
    .mission-control-grid {
        gap: 16px !important;
    }
}

/* Premium Big 5 Modal Trigger Button Styles */
.big5-modal-trigger-btn {
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.88rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.big5-modal-trigger-btn:hover {
    border-color: rgba(var(--accent), 0.4);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25), 0 0 15px rgba(var(--accent), 0.15);
}
.big5-modal-trigger-btn.selected {
    background: rgba(var(--accent), 0.08);
    border-color: rgba(var(--accent), 0.5);
    color: var(--text-primary);
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(var(--accent), 0.1), inset 0 1px 0 rgba(255,255,255,0.05);
}
.big5-modal-trigger-btn.selected:hover {
    border-color: rgb(var(--accent));
    background: rgba(var(--accent), 0.12);
    box-shadow: 0 8px 25px rgba(var(--accent), 0.25);
}

/* Premium Big 5 Grid Layout */
.big5-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
}

.big5-grid-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 18px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    cursor: pointer;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 105px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.big5-grid-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(var(--accent), 0.4);
    color: var(--text-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25), 0 0 15px rgba(var(--accent), 0.15);
}

.big5-grid-btn.selected {
    color: var(--text-primary);
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(var(--accent), 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.big5-grid-btn .big5-trait-emoji {
    font-size: 1.6rem;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.big5-grid-btn:hover .big5-trait-emoji {
    transform: scale(1.1) rotate(5deg);
}

/* 5번째 아이템(신경성)은 두 열을 차지하도록 설정해 균형을 잡음 */
.big5-grid-btn.full-width {
    grid-column: span 2;
}

@media (max-width: 480px) {
    .big5-grid {
        grid-template-columns: 1fr;
    }
    .big5-grid-btn.full-width {
        grid-column: span 1;
    }
}

/* Dashboard Mission Control Symmetrical Layout System */
.mission-control-grid-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    width: 100%;
    align-items: start;
    box-sizing: border-box;
}

.dashboard-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

/* Fallback for safety */
.mission-control-grid {
    display: grid;
    grid-template-columns: 1.12fr 0.94fr 0.94fr;
    gap: 20px;
    width: 100%;
    align-items: start;
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    .mission-control-grid-bottom {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .mission-control-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ==========================================================================
   Phase 14: Global 4-Wellness Productivity Killer Features CSS Overhaul
   ========================================================================== */

/* 1. Immersive Writing Mode Viewport Masking */
.writing-immersive #sidebar, 
.writing-immersive .header,
.writing-immersive .sidebar-garden-preview,
.writing-immersive .header-controls,
.writing-immersive .main-stage > *:not(#pane-writer),
.writing-immersive #pane-writer > *:not(.writer-container),
.writing-immersive .writer-container > *:not(.glass-panel:first-child) {
    opacity: 0.03;
    pointer-events: none;
    filter: blur(4px);
    transition: opacity 0.8s ease-in-out, filter 0.8s ease-in-out;
}

/* Hover disclosure for hidden parts when in immersive mode */
.writing-immersive #sidebar:hover,
.writing-immersive .header:hover {
    opacity: 0.85;
    pointer-events: auto;
    filter: blur(0);
}

.writer-container {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Premium Retro LP Vinyl theme for Timer */
.pomo-retro-lp-skin {
    background: radial-gradient(circle, #1a1a2e 0%, #0c0c16 100%) !important;
    border: 2px solid #e2e8f0 !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 255, 255, 0.05) !important;
}

.pomo-retro-lp-skin .pomo-dial-sec {
    animation: rotateLP 20s infinite linear;
}

@keyframes rotateLP {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 2. Collectible Card frames and Unlocks in Pet Museum */
.collection-item-card {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1.5px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 16px 12px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    overflow: hidden;
}

.collection-item-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% -20%, rgba(var(--accent), 0.15), transparent 70%);
    pointer-events: none;
}

.collection-item-card:hover {
    transform: translateY(-5px) scale(1.03);
    border-color: rgba(var(--accent), 0.4);
    box-shadow: 0 15px 35px rgba(0,0,0,0.5), 0 0 20px rgba(var(--accent), 0.25);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
}

/* Rarity classes for cards */
.collection-item-card.rare {
    border-color: rgba(52, 211, 153, 0.3);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 15px rgba(52, 211, 153, 0.08);
}
.collection-item-card.rare:hover {
    border-color: rgba(52, 211, 153, 0.6);
    box-shadow: 0 15px 35px rgba(0,0,0,0.5), 0 0 25px rgba(52, 211, 153, 0.3);
}

.collection-item-card.epic {
    border-color: rgba(252, 211, 77, 0.35);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 18px rgba(252, 211, 77, 0.1);
}
.collection-item-card.epic:hover {
    border-color: rgba(252, 211, 77, 0.7);
    box-shadow: 0 15px 35px rgba(0,0,0,0.5), 0 0 30px rgba(252, 211, 77, 0.4);
}

/* 3. Time-Based Circadian weather rooms and dynamic gradients */
.circadian-dawn {
    background: linear-gradient(135deg, #1e1b4b 0%, #311042 50%, #4c1d95 100%) !important;
}
.circadian-day {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0284c7 100%) !important;
}
.circadian-dusk {
    background: linear-gradient(135deg, #020617 0%, #311042 50%, #b91c1c 100%) !important;
}
.circadian-night {
    background: linear-gradient(135deg, #020205 0%, #090514 50%, #1e1b4b 100%) !important;
}

/* 4. Magical Breathing Orb Pulse Feedback & Haptics simulation */
.haptic-pulse {
    animation: hapticScale 4s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

@keyframes hapticScale {
    0% { transform: scale(1.0); filter: brightness(1.0); }
    100% { transform: scale(1.22); filter: brightness(1.2) drop-shadow(0 0 25px rgba(var(--accent), 0.6)); }
}

.screen-haptic-pulse {
    animation: screenVibrate 0.12s linear infinite;
}

@keyframes screenVibrate {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-1px, 1px); }
    50% { transform: translate(1px, -1px); }
    75% { transform: translate(-1px, -1px); }
    100% { transform: translate(1px, 1px); }
}


/* ==========================================================================
   Phase 15-21: 21단계 대중 니즈 수정 보완 스타일 시스템
   ========================================================================== */

/* ---- [Mod 1] Interactive Onboarding Tour ---- */
.onboarding-overlay {
    position: fixed; inset: 0; z-index: 999990;
    background: rgba(0,0,0,0.72); backdrop-filter: blur(4px);
    transition: opacity 0.4s ease;
}
.onboarding-spotlight {
    position: absolute; border-radius: 16px;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.72), 0 0 30px 8px rgba(var(--accent), 0.35);
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    animation: spotlightPulse 2s ease-in-out infinite alternate;
}
@keyframes spotlightPulse {
    0% { box-shadow: 0 0 0 9999px rgba(0,0,0,0.72), 0 0 30px 8px rgba(var(--accent), 0.35); }
    100% { box-shadow: 0 0 0 9999px rgba(0,0,0,0.72), 0 0 45px 15px rgba(var(--accent), 0.55); }
}
.onboarding-tooltip {
    position: absolute; background: var(--glass-bg);
    backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(var(--accent), 0.35); border-radius: 16px;
    padding: 24px; min-width: 320px; max-width: 400px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 20px rgba(var(--accent), 0.15);
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    animation: tooltipFloat 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
@keyframes tooltipFloat {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.onboarding-step-indicator {
    font-size: 0.72rem; color: rgb(var(--accent));
    font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
    margin-bottom: 8px;
}
.onboarding-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.onboarding-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 16px; }
.onboarding-actions { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.onboarding-btn-skip {
    background: transparent; border: 1px solid rgba(255,255,255,0.12); color: var(--text-muted);
    padding: 8px 18px; border-radius: 10px; font-size: 0.82rem; cursor: pointer;
    transition: all 0.2s ease;
}
.onboarding-btn-skip:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.onboarding-btn-next {
    background: linear-gradient(135deg, rgb(var(--accent)), rgb(var(--accent-secondary)));
    border: none; color: white; padding: 8px 24px; border-radius: 10px;
    font-size: 0.82rem; font-weight: 700; cursor: pointer;
    box-shadow: 0 4px 15px rgba(var(--accent), 0.4);
    transition: all 0.2s ease;
}
.onboarding-btn-next:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(var(--accent), 0.5); }
.onboarding-progress { height: 3px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.onboarding-progress-bar {
    height: 100%; background: linear-gradient(90deg, rgb(var(--accent)), rgb(var(--accent-secondary)));
    border-radius: 2px; transition: width 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ---- [Mod 2] Keyboard Shortcuts Modal ---- */
.ff-modal-overlay {
    position: fixed; inset: 0; z-index: 999980;
    background: rgba(0,0,0,0.65); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.3s ease;
}
.ff-modal {
    background: var(--glass-bg); backdrop-filter: blur(32px) saturate(180%);
    border: 1px solid var(--glass-border-glow); border-radius: 20px;
    padding: 28px; width: 90%; max-width: 560px; max-height: 80vh;
    overflow-y: auto; box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 30px rgba(var(--accent), 0.1);
    animation: modalSlideUp 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.ff-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px; padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ff-modal-header h3 { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); }
.ff-modal-close {
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted); width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 0.9rem; transition: all 0.2s ease;
}
.ff-modal-close:hover { background: rgba(239,68,68,0.2); color: #ef4444; border-color: rgba(239,68,68,0.3); }

.shortcuts-search {
    width: 100%; padding: 10px 16px; background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 10px;
    color: var(--text-primary); font-size: 0.85rem; font-family: var(--font-sans);
    outline: none; margin-bottom: 16px; transition: border-color 0.2s ease;
}
.shortcuts-search:focus { border-color: rgba(var(--accent), 0.5); }
.shortcuts-search::placeholder { color: var(--text-muted); }

.shortcuts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.shortcut-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 12px; background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05); border-radius: 8px;
    font-size: 0.8rem; color: var(--text-secondary);
    transition: all 0.2s ease;
}
.shortcut-item:hover { background: rgba(var(--accent), 0.08); border-color: rgba(var(--accent), 0.2); }
.shortcut-key {
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px; padding: 3px 8px; font-family: var(--font-mono);
    font-size: 0.75rem; color: rgb(var(--accent)); font-weight: 700;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* ---- [Mod 3] Stacked Toast Notifications ---- */
.ff-toast-container {
    position: fixed; top: 90px; right: 20px; z-index: 999970;
    display: flex; flex-direction: column; gap: 8px;
    pointer-events: none; max-width: 380px;
}
.ff-toast {
    pointer-events: auto; display: flex; align-items: center; gap: 10px;
    padding: 12px 18px; background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    animation: toastSlideIn 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative; overflow: hidden; min-width: 280px;
}
.ff-toast.toast-exit { animation: toastSlideOut 0.3s ease-in forwards; }
@keyframes toastSlideIn { from { opacity: 0; transform: translateX(100px) scale(0.9); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes toastSlideOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(100px) scale(0.85); } }
.ff-toast-icon { font-size: 1.2rem; flex-shrink: 0; }
.ff-toast-msg { font-size: 0.82rem; color: var(--text-primary); flex: 1; }
.ff-toast-progress {
    position: absolute; bottom: 0; left: 0; height: 3px;
    border-radius: 0 0 12px 12px; transition: width linear;
}
.ff-toast.toast-success { border-left: 3px solid #22c55e; }
.ff-toast.toast-success .ff-toast-progress { background: #22c55e; }
.ff-toast.toast-warning { border-left: 3px solid #f59e0b; }
.ff-toast.toast-warning .ff-toast-progress { background: #f59e0b; }
.ff-toast.toast-info { border-left: 3px solid rgb(var(--accent)); }
.ff-toast.toast-info .ff-toast-progress { background: rgb(var(--accent)); }

/* ---- [Mod 9] Live Focus Counter ---- */
.live-counter-chip {
    display: flex; align-items: center; gap: 6px;
    background: rgba(34, 197, 94, 0.08); border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 20px; padding: 5px 14px; font-size: 0.78rem;
    color: #22c55e; font-weight: 600; cursor: pointer;
    transition: all 0.3s ease; white-space: nowrap;
}
.live-counter-chip:hover { background: rgba(34, 197, 94, 0.15); transform: scale(1.02); }
.live-dot {
    width: 7px; height: 7px; border-radius: 50%; background: #22c55e;
    animation: liveDotPulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 6px #22c55e;
}
@keyframes liveDotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.75); }
}

/* ---- [Mod 12] Sleep Timer ---- */
.sleep-timer-presets {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px;
}
.sleep-preset-btn {
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary); padding: 12px 8px; border-radius: 10px;
    font-size: 0.85rem; font-weight: 600; cursor: pointer;
    transition: all 0.25s ease;
}
.sleep-preset-btn:hover, .sleep-preset-btn.active {
    background: rgba(var(--accent), 0.15); border-color: rgba(var(--accent), 0.4);
    color: rgb(var(--accent)); transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--accent), 0.2);
}
.sleep-timer-custom {
    display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.sleep-timer-input {
    width: 80px; padding: 8px 12px; background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 8px;
    color: var(--text-primary); font-size: 0.85rem; text-align: center;
    font-family: var(--font-mono); outline: none;
}
.sleep-timer-input:focus { border-color: rgba(var(--accent), 0.5); }
.sleep-timer-status {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; background: rgba(var(--accent), 0.06);
    border: 1px solid rgba(var(--accent), 0.15); border-radius: 10px;
}
.sleep-timer-remaining {
    display: flex; align-items: center; gap: 8px; font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ---- [Mod 7] QR Code Share ---- */
.qr-share-url-box {
    display: flex; gap: 8px; align-items: center;
}
.qr-share-url-input {
    flex: 1; padding: 10px 14px; background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 8px;
    color: var(--text-primary); font-size: 0.78rem; font-family: var(--font-mono);
    outline: none; overflow: hidden; text-overflow: ellipsis;
}

/* ---- [Mod 19] Streak Calendar ---- */
.streak-stats-row {
    display: flex; justify-content: space-around; margin-bottom: 20px; gap: 12px;
}
.streak-stat {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 12px 18px; background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; flex: 1;
}
.streak-stat-num {
    font-size: 1.6rem; font-weight: 800; font-family: var(--font-heading);
    background: linear-gradient(135deg, rgb(var(--accent)), rgb(var(--accent-secondary)));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.streak-stat-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; }
.streak-calendar-grid {
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.streak-day {
    aspect-ratio: 1; border-radius: 6px; display: flex; align-items: center; justify-content: center;
    font-size: 0.65rem; font-weight: 600; color: var(--text-muted);
    background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04);
    transition: all 0.2s ease;
}
.streak-day.checked {
    background: rgba(var(--accent), 0.25); border-color: rgba(var(--accent), 0.4);
    color: rgb(var(--accent)); box-shadow: 0 0 8px rgba(var(--accent), 0.2);
}
.streak-day.today {
    border-color: rgba(var(--accent), 0.6); box-shadow: 0 0 12px rgba(var(--accent), 0.3);
    font-weight: 800;
}
.streak-day.missed {
    background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.15);
    color: rgba(239,68,68,0.5);
}

/* ---- [Mod 20] Achievement System ---- */
.achievement-level-bar {
    text-align: center; margin-bottom: 20px; padding: 14px;
    background: rgba(255,255,255,0.03); border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
}
.achievement-level-bar > span:first-child {
    font-size: 0.95rem; font-weight: 700; color: rgb(var(--accent));
    display: block; margin-bottom: 8px;
}
.achievement-xp-bar {
    height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px;
    overflow: hidden; margin-bottom: 6px;
}
.achievement-xp-fill {
    height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, rgb(var(--accent)), rgb(var(--accent-secondary)));
    transition: width 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 0 8px rgba(var(--accent), 0.4);
}
.achievement-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px;
}
.achievement-card {
    padding: 14px; background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06); border-radius: 12px;
    text-align: center; transition: all 0.25s ease; position: relative;
    overflow: hidden;
}
.achievement-card:hover { transform: translateY(-2px); border-color: rgba(var(--accent), 0.2); }
.achievement-card.unlocked {
    border-color: rgba(var(--accent), 0.4);
    background: linear-gradient(135deg, rgba(var(--accent), 0.08), rgba(var(--accent-secondary), 0.05));
}
.achievement-card.locked { opacity: 0.45; filter: grayscale(0.6); }
.achievement-card .ach-icon { font-size: 1.8rem; display: block; margin-bottom: 6px; }
.achievement-card .ach-name { font-size: 0.75rem; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; }
.achievement-card .ach-desc { font-size: 0.65rem; color: var(--text-muted); line-height: 1.4; }
.achievement-card .ach-tier {
    position: absolute; top: 6px; right: 6px; font-size: 0.55rem; font-weight: 800;
    padding: 1px 6px; border-radius: 8px; text-transform: uppercase; letter-spacing: 0.5px;
}
.ach-tier.bronze { background: rgba(205,127,50,0.2); color: #cd7f32; }
.ach-tier.silver { background: rgba(192,192,192,0.2); color: #c0c0c0; }
.ach-tier.gold { background: rgba(255,215,0,0.2); color: #ffd700; }
.ach-tier.diamond { background: rgba(185,242,255,0.2); color: #b9f2ff; }

/* ---- [Mod 10] Time-based Recommendation ---- */
.recommendation-card {
    padding: 14px 18px; background: linear-gradient(135deg, rgba(var(--accent), 0.06), rgba(var(--accent-secondary), 0.04));
    border: 1px solid rgba(var(--accent), 0.12); border-radius: 12px;
    margin-bottom: 20px; display: flex; align-items: center; gap: 14px;
    transition: all 0.3s ease; cursor: pointer;
}
.recommendation-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(var(--accent), 0.12); }
.rec-time-icon { font-size: 2rem; }
.rec-content { flex: 1; }
.rec-content h4 { font-size: 0.88rem; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; }
.rec-content p { font-size: 0.75rem; color: var(--text-secondary); line-height: 1.4; }
.rec-apply-btn {
    background: rgba(var(--accent), 0.2); border: 1px solid rgba(var(--accent), 0.3);
    color: rgb(var(--accent)); padding: 6px 14px; border-radius: 8px;
    font-size: 0.75rem; font-weight: 700; cursor: pointer; white-space: nowrap;
    transition: all 0.2s ease;
}
.rec-apply-btn:hover { background: rgba(var(--accent), 0.3); }

/* ---- [Mod 6] Session Report Card ---- */
.session-report-overlay {
    position: fixed; inset: 0; z-index: 999985;
    background: rgba(0,0,0,0.75); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.4s ease;
}
.session-report-card {
    background: var(--glass-bg); backdrop-filter: blur(32px) saturate(180%);
    border: 1px solid var(--glass-border-glow); border-radius: 24px;
    padding: 36px; width: 90%; max-width: 420px; text-align: center;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6);
    animation: modalSlideUp 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.session-report-card h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 8px; }
.session-report-card .sr-emoji { font-size: 3.5rem; display: block; margin-bottom: 12px; }
.session-report-card .sr-stat-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 20px 0;
}
.sr-stat-item {
    padding: 12px; background: rgba(255,255,255,0.04); border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.06);
}
.sr-stat-item .sr-stat-val { font-size: 1.3rem; font-weight: 800; color: rgb(var(--accent)); }
.sr-stat-item .sr-stat-label { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }

/* ---- [Mod 8] Weekly Focus Report ---- */
.focus-report-card { max-width: 480px; }

/* ---- [Mod 11] Master EQ Console ---- */
.eq-console {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
    padding: 16px; background: rgba(0,0,0,0.2); border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06); margin-top: 12px;
}
.eq-band {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.eq-band label { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; }
.eq-band input[type="range"] {
    writing-mode: vertical-lr; direction: rtl;
    width: 6px; height: 100px; accent-color: rgb(var(--accent));
}
.eq-band .eq-val { font-size: 0.7rem; color: rgb(var(--accent)); font-weight: 700; font-family: var(--font-mono); }
.eq-presets {
    display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap;
}
.eq-preset-btn {
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-secondary); padding: 6px 12px; border-radius: 8px;
    font-size: 0.72rem; cursor: pointer; transition: all 0.2s ease;
}
.eq-preset-btn:hover, .eq-preset-btn.active {
    background: rgba(var(--accent), 0.15); color: rgb(var(--accent));
    border-color: rgba(var(--accent), 0.3);
}

/* ---- [Mod 15] Ambient Light Sync indicator ---- */
.ambient-sync-badge {
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(var(--accent), 0.1); border: 1px solid rgba(var(--accent), 0.2);
    border-radius: 16px; padding: 3px 10px; font-size: 0.68rem;
    color: rgb(var(--accent)); font-weight: 600;
}

/* ---- [Mod 17] Accessibility high-contrast ---- */
@media (prefers-contrast: high) {
    :root {
        --glass-bg: rgba(0,0,0,0.85);
        --glass-border: rgba(255,255,255,0.25);
        --text-primary: #ffffff;
        --text-secondary: #e2e8f0;
        --text-muted: #cbd5e1;
    }
    .glass-panel, .ff-modal { border-width: 2px; }
    .btn:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
        outline: 3px solid rgb(var(--accent));
        outline-offset: 2px;
    }
}

/* Keyboard focus indicators (Mod 17) */
:focus-visible {
    outline: 2px solid rgba(var(--accent), 0.7);
    outline-offset: 2px;
}

/* ---- Mobile Responsive for new features ---- */
@media (max-width: 768px) {
    .live-counter-chip { font-size: 0.7rem; padding: 4px 10px; }
    .shortcuts-grid { grid-template-columns: 1fr; }
    .ff-modal { width: 95%; padding: 20px; max-height: 85vh; }
    .ff-toast-container { right: 10px; left: 10px; max-width: none; }
    .achievement-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
    .streak-calendar-grid { gap: 2px; }
    .eq-console { grid-template-columns: 1fr; }
    .eq-band input[type="range"] { writing-mode: horizontal-tb; direction: ltr; width: 100%; height: auto; }
    .session-report-card { padding: 24px; }
    .onboarding-tooltip { min-width: 280px; max-width: 90vw; }
}

