/* =============================================
   POMODORO TIMER — RECTANGULAR PREMIUM DESIGN
   ============================================= */

/* =============================================
   TIMER CARD MAIN CONTAINER
   ============================================= */
.timer-card-main {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem 2rem 1.6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    transition: var(--transition);
    width: 100%;
    box-sizing: border-box;
}

.timer-card-main::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% -20%, var(--primary-glow) 0%, transparent 65%);
    pointer-events: none;
    border-radius: inherit;
    z-index: 0;
}

/* =============================================
   RECTANGULAR TIMER DISPLAY BOX
   ============================================= */
.timer-display-box {
    position: relative;
    width: 100%;
    max-width: 480px;
    height: auto;
    aspect-ratio: 9 / 4;
    container-type: inline-size;
    background: var(--bg-tertiary);
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    overflow: visible;
    box-shadow:
        inset 0 1px 0 var(--border-color),
        var(--shadow-lg);
    transition: box-shadow 0.35s ease, transform 0.35s ease;
    isolation: isolate;
}

/* Uniform gradient border — identical weight on all four sides */
.timer-display-box::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 23px;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.14) 0%,
        rgba(124, 58, 237, 0.35) 35%,
        rgba(80, 30, 180, 0.2) 60%,
        rgba(255, 255, 255, 0.06) 100%
    );
    -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: 1;
    transition: opacity 0.35s ease;
}

/* Inner bottom glow */
.timer-display-box::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15%;
    width: 70%;
    height: 45%;
    background: radial-gradient(ellipse at center bottom, rgba(124, 58, 237, 0.14) 0%, transparent 75%);
    pointer-events: none;
    border-radius: 0 0 22px 22px;
    z-index: 0;
}

.timer-display-box:hover {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        inset 0 -1px 0 rgba(0, 0, 0, 0.5),
        0 24px 60px rgba(0, 0, 0, 0.6),
        0 4px 16px rgba(0, 0, 0, 0.4),
        0 0 50px rgba(124, 58, 237, 0.13);
    transform: translateY(-1px);
}

.timer-display-box:hover::before {
    opacity: 1.4;
}

.timer-countdown {
    font-size: clamp(3.2rem, 25cqw, 5rem);
    font-weight: 700;
    font-family: var(--font-mono);
    line-height: 1;
    letter-spacing: -1px;
    background: linear-gradient(180deg, #f5f5ff 30%, rgba(168, 139, 250, 0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    z-index: 2;
    position: relative;
    margin-top: -10px;
    filter: drop-shadow(0 2px 12px rgba(124, 58, 237, 0.3));
}

/* Progress SVG Ring around rectangular box */
.timer-svg-rect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    overflow: visible;
}

.timer-rect-track {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 2.5;
    opacity: 0.7;
}

.timer-rect-progress {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear, stroke 0.6s ease, filter 0.6s ease;
}

#timer-progress-dot, #zen-progress-dot {
    transition: cx 1s linear, cy 1s linear, fill 0.6s ease, filter 0.6s ease;
}

/* =============================================
   SESSION CYCLE INDICATOR (INSIDE TIMER BOX)
   ============================================= */
.timer-bottom-indicators {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 5;
}

.timer-session-dots {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.timer-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.timer-dot.active {
    background: #ff9f43;
    border-color: #ff9f43;
    box-shadow: 0 0 8px rgba(255, 159, 67, 0.8), 0 0 16px rgba(255, 159, 67, 0.4);
    animation: activeDotBreathe 2.5s ease-in-out infinite alternate;
}

body.mode-break .timer-dot.active {
    background: #38bdf8;
    border-color: #38bdf8;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.8), 0 0 16px rgba(56, 189, 248, 0.4);
    animation: activeDotBreakBreathe 2.5s ease-in-out infinite alternate;
}

@keyframes activeDotBreathe {
    0% {
        box-shadow: 0 0 6px rgba(255, 159, 67, 0.7), 0 0 12px rgba(255, 159, 67, 0.3);
        transform: scale(1);
    }
    100% {
        box-shadow: 0 0 12px rgba(255, 185, 0, 1), 0 0 24px rgba(255, 159, 67, 0.7);
        transform: scale(1.25);
    }
}

@keyframes activeDotBreakBreathe {
    0% {
        box-shadow: 0 0 6px rgba(56, 189, 248, 0.7), 0 0 12px rgba(56, 189, 248, 0.3);
        transform: scale(1);
    }
    100% {
        box-shadow: 0 0 12px rgba(56, 189, 248, 1), 0 0 24px rgba(56, 189, 248, 0.7);
        transform: scale(1.25);
    }
}

/* ── Timer Colon: Static & Solid ── */
.timer-colon {
    display: inline-block;
    opacity: 1 !important;
    transform: none !important;
}

.timer-colon.running {
    opacity: 1 !important;
    animation: none !important;
}

/* =============================================
   ACTIVE TASK DISPLAY (BELOW TIMER BOX)
   ============================================= */
.timer-task-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 0;
    margin-bottom: 0.5rem;
    text-align: center;
    animation: fadeInUp 0.4s var(--ease-smooth);
    width: 100%;
}

.timer-task-title-row {
    width: 100%;
    display: flex;
    justify-content: center;
}

.timer-task-meta-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.timer-inner-title {
    font-size: 1.12rem;
    font-weight: 600;
    color: var(--text-primary);
    max-width: 280px;
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
    letter-spacing: -0.2px;
    line-height: 1.4;
    text-shadow: 0 2px 10px rgba(124, 58, 237, 0.2);
}

.zen-details .timer-inner-title {
    font-size: 1.7rem;
    max-width: 520px;
    letter-spacing: -0.4px;
    line-height: 1.35;
    text-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
}

.timer-inner-capsule {
    font-size: 0.62rem !important;
    padding: 3px 11px !important;
    height: 24px !important;
    box-sizing: border-box !important;
    border-radius: 30px !important;
    font-weight: 800 !important;
    text-transform: none;
    letter-spacing: 1px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
}

.zen-details .timer-inner-capsule {
    font-size: 0.8rem !important;
    padding: 5px 15px !important;
    height: 30px !important;
    box-sizing: border-box !important;
    letter-spacing: 1.2px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
}

/* Time Spent Capsule */
.time-capsule {
    font-size: 0.62rem !important;
    padding: 3px 11px !important;
    height: 24px !important;
    box-sizing: border-box !important;
    border-radius: 30px !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
    border: 1px solid rgba(255, 159, 67, 0.25);
    background: rgba(255, 159, 67, 0.08);
    color: #ff9f43;
}

.zen-details .time-capsule {
    font-size: 0.8rem !important;
    padding: 5px 15px !important;
    height: 30px !important;
    box-sizing: border-box !important;
    line-height: 1.2 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
}

.timer-inner-placeholder {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 0;
    margin-bottom: 0.5rem;
    text-align: center;
    letter-spacing: 0.2px;
}

/* =============================================
   DAILY PROGRESS BAR
   ============================================= */
.timer-daily-goal-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}
.timer-daily-goal-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff9f43, #805ad5);
    border-radius: 4px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================
   TIMER CONTROLS ROW
   ============================================= */
.timer-controls-row {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: center;
}

.timer-btn-round {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--surface-raised);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.22s var(--ease-spring);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 4px 12px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
}

.timer-btn-round::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.10) 0%, transparent 60%);
    pointer-events: none;
}

.timer-btn-round svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.timer-btn-round:hover {
    background: var(--interactive-subtle);
    border-color: var(--border-hover);
    color: var(--primary-light);
    transform: scale(1.08) translateY(-1px);
    box-shadow: 0 6px 20px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.30);
}

.timer-btn-round.is-muted {
    color: var(--danger-color);
    border-color: rgba(239,68,68,0.3);
    background: rgba(239,68,68,0.1);
}

.timer-btn-round.play-pause {
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    box-shadow: 0 6px 28px var(--primary-glow), 0 2px 10px rgba(0,0,0,0.4), inset 0 1.5px 0.5px rgba(255,255,255,0.35);
    transition: all 0.25s var(--ease-spring);
}

.timer-btn-round.play-pause svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    stroke: none;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.timer-btn-round.play-pause:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
    box-shadow: 0 10px 36px var(--primary-glow), 0 4px 14px rgba(0,0,0,0.45), inset 0 1.5px 0.5px rgba(255,255,255,0.45);
    border-color: rgba(255, 255, 255, 0.35);
    transform: scale(1.12);
}

/* =============================================
   TODAY'S FOCUS CARD (UNIFIED WITH DAILY GOAL BAR)
   ============================================= */
.timer-today-focus-card {
    width: 100%;
    max-width: 320px;
    margin-top: 1.25rem;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.timer-today-focus-text-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.timer-today-focus-label-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.timer-today-focus-label-wrap svg {
    width: 14px;
    height: 14px;
    color: #ff9f43;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.timer-today-focus-value {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    letter-spacing: -0.2px;
    line-height: 1;
}

.timer-today-focus-interactive-row {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 12px;
}

/* ── Inline Focus Flame Icon */
.timer-flame-icon-wrap {
    transition: transform 0.2s ease;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.timer-flame-icon-wrap:hover {
    transform: scale(1.15);
}
.flame-svg-inline {
    width: 28px;
    height: 28px;
    transform-origin: center bottom;
    transition: filter 0.4s ease;
}



/* =============================================
   ZEN MODE OVERLAY REDESIGN
   ============================================= */
.zen-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden !important;
    background: #030309;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: zenEnter 0.4s ease;
}

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

.zen-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.zen-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    width: 100%;
    max-width: 600px;
    padding: 0 24px;
}

.zen-display-box {
    max-width: 640px;
    width: 100%;
    height: auto;
    aspect-ratio: 27 / 11;
    container-type: inline-size;
    background: linear-gradient(145deg,
        rgba(20, 14, 48, 0.55) 0%,
        rgba(12, 8, 28, 0.38) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 28px;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 1.5px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1.5px 0 rgba(0, 0, 0, 0.6),
        0 24px 60px rgba(0, 0, 0, 0.75),
        0 0 40px rgba(124, 58, 237, 0.1);
    overflow: visible;
    position: relative;
    isolation: isolate;
}

/* Gradient border on zen box — matches the main timer aesthetic */
.zen-display-box::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 29px;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.16) 0%,
        rgba(124, 58, 237, 0.4) 40%,
        rgba(80, 30, 180, 0.18) 65%,
        rgba(255, 255, 255, 0.05) 100%
    );
    -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: 1;
}

.zen-display-box::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 12%;
    width: 76%;
    height: 48%;
    background: radial-gradient(ellipse at center bottom, rgba(124, 58, 237, 0.18) 0%, transparent 72%);
    pointer-events: none;
    border-radius: 0 0 28px 28px;
    z-index: 0;
}

.zen-display-box .timer-countdown {
    font-size: clamp(4rem, 25cqw, 7rem);
    letter-spacing: -2px;
    margin-top: -12px;
}

.zen-details {
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Zen bottom playback bar (Unobtrusive Seamless Glassmorphism) */
.zen-playback-bar {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    gap: 4px;
    align-items: center;
    background: rgba(12, 14, 25, 0.35);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 30px;
    padding: 3px 6px;
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.35), 
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.zen-overlay.immersive .zen-playback-bar {
    opacity: 0;
    transform: translate(-50%, 20px);
    pointer-events: none;
}

.zen-overlay.immersive .zen-details {
    opacity: 0;
    transform: translateY(15px);
    pointer-events: none;
}

.zen-play-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s var(--ease-spring);
    box-shadow: 0 4px 18px var(--primary-glow), inset 0 1px 0 rgba(255,255,255,0.3);
}

.zen-play-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 8px 28px var(--primary-glow);
}

.zen-play-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    stroke: none;
    display: block;
    pointer-events: none;
}

.zen-play-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: scale(1.05);
}

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

.zen-stop-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid transparent;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.zen-stop-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    display: block;
}

.zen-stop-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    transform: scale(1.05);
}

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

/* Ambiance Themes */
.zen-overlay.ambiance-obsidian {
    background: radial-gradient(ellipse at 50% 50%, #1e1509 0%, #050403 100%);
}
.zen-overlay.ambiance-linen {
    background: radial-gradient(ellipse at 50% 50%, #262320 0%, #12100e 100%);
}
.zen-overlay.ambiance-midnight {
    background: radial-gradient(ellipse at 50% 50%, #0c061e 0%, #030308 100%);
}
.zen-overlay.ambiance-sunset {
    background: radial-gradient(ellipse at 50% 50%, #200810 0%, #030308 100%);
}
.zen-overlay.ambiance-forest {
    background: radial-gradient(ellipse at 50% 50%, #031812 0%, #030308 100%);
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =============================================
   IMMERSIVE ZEN MODE (RESPONSIVE & GLASSMORPHIC)
   ============================================= */

/* 2 Hidden-by-Default Controls (Revealed only on click/tap, auto-fades after 3s) */
.zen-immersive-controls {
    display: flex;
    position: absolute;
    top: 22px;
    right: 24px;
    z-index: 100;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.zen-overlay.immersive .zen-immersive-controls.show {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
}

.zen-immersive-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: rgba(255, 255, 255, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.zen-immersive-icon-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    transition: transform 0.25s ease;
}

.zen-immersive-icon-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    opacity: 1;
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.zen-immersive-icon-btn:active {
    transform: scale(0.94);
}

.zen-overlay.immersive .timer-svg-rect {
    display: block !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
}

.zen-overlay.immersive #zen-rect-progress {
    stroke-linecap: round !important;
    filter: drop-shadow(0 0 10px rgba(255, 185, 0, 0.7)) drop-shadow(0 0 20px rgba(255, 120, 0, 0.4)) !important;
}

.zen-overlay.immersive #zen-progress-dot {
    filter: drop-shadow(0 0 12px rgba(255, 200, 50, 0.9)) drop-shadow(0 0 24px rgba(255, 140, 0, 0.6)) !important;
}

.zen-overlay.immersive .zen-details {
    display: none !important;
}

.zen-overlay.immersive .zen-content {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100% !important;
    padding: 0 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translate(-50%, -50%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    overflow: visible;
}

.zen-overlay.immersive .zen-content > * {
    pointer-events: auto;
}

/* ── Hero Scaled 3D Immersive Timer Card ── */
.zen-overlay.immersive .zen-display-box {
    max-width: min(820px, 90vw) !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 27 / 11 !important;
    margin: 0 auto !important;
    transform: scale(1.02) !important;
    transform-origin: center center !important;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    container-type: inline-size;
    cursor: pointer !important;
}

/* Crisp Premium Monospace Typography */
.zen-overlay.immersive #zen-countdown-text {
    font-size: clamp(3rem, 23.5cqw, 18rem) !important;
    font-weight: 800 !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    font-family: var(--font-mono), monospace !important;
    font-variant-numeric: tabular-nums !important;
    font-feature-settings: "tnum" 1, "zero" 1 !important;
    letter-spacing: 0.02em !important;
    line-height: 1 !important;
    text-shadow: 0 0 35px rgba(255, 255, 255, 0.35), 0 0 70px rgba(139, 92, 246, 0.3) !important;
    z-index: 4;
}

/* Theme Specific Dynamic Text Glows for Immersive Mode */
.zen-overlay.immersive.ambiance-sunset #zen-countdown-text {
    color: #fff9f0 !important;
    text-shadow: 0 0 35px rgba(255, 190, 90, 0.45), 0 0 75px rgba(245, 120, 20, 0.3) !important;
}

.zen-overlay.immersive.ambiance-midnight #zen-countdown-text {
    color: #f0f7ff !important;
    text-shadow: 0 0 35px rgba(96, 165, 250, 0.45), 0 0 75px rgba(59, 130, 246, 0.3) !important;
}

.zen-overlay.immersive.ambiance-forest #zen-countdown-text {
    color: #f0fdf4 !important;
    text-shadow: 0 0 35px rgba(74, 222, 128, 0.45), 0 0 75px rgba(34, 197, 94, 0.3) !important;
}

.zen-overlay.immersive.ambiance-linen #zen-countdown-text {
    color: #ffffff !important;
    text-shadow: 0 0 35px rgba(255, 255, 255, 0.4), 0 0 75px rgba(217, 119, 6, 0.25) !important;
}

/* ── Smart Mobile / Landscape & Portrait Mode Toggles ── */

/* Force Landscape Mode (For Mobile or requested landscape) */
.zen-overlay.immersive.force-landscape .zen-content {
    transform: translate(-50%, -50%) rotate(90deg) !important;
    width: 100vh !important;
    height: 100vw !important;
    max-width: 100vh !important;
    max-height: 100vw !important;
}

.zen-overlay.immersive.force-landscape .zen-display-box {
    width: min(80vh, 85vw * 2.45) !important;
    max-width: min(80vh, 85vw * 2.45) !important;
}

/* Force Portrait Mode */
.zen-overlay.immersive.force-portrait .zen-content {
    transform: translate(-50%, -50%) rotate(0deg) !important;
    width: 100vw !important;
    height: 100vh !important;
}

/* ── Scaled Fullscreen Timer Mode ── */
.zen-overlay.immersive.scaled-timer .zen-display-box {
    width: 98vw !important;
    max-width: 98vw !important;
    height: 85vh !important;
    aspect-ratio: unset !important;
}

.zen-overlay.immersive.scaled-timer #zen-countdown-text {
    font-size: clamp(6rem, 34cqw, 32rem) !important;
    line-height: 0.9 !important;
}

.zen-overlay.immersive.force-landscape.scaled-timer .zen-display-box {
    width: 98vh !important;
    max-width: 98vh !important;
    height: 85vw !important;
}

.zen-overlay.immersive.force-landscape.scaled-timer #zen-countdown-text {
    font-size: clamp(6rem, 34cqh, 32rem) !important;
}

.zen-overlay.immersive.force-portrait .zen-display-box {
    width: 95vw !important;
    max-width: 95vw !important;
}

/* Desktop Screens (No need for rotation button on desktop screens) */
@media (min-width: 769px) {
    #zen-rotate-icon-btn {
        display: none !important;
    }
}

/* Mobile Screens (Under 768px) Default Behavior */
@media (max-width: 768px) {
    .zen-immersive-controls {
        top: 16px;
        right: 16px;
        gap: 8px;
    }
    .zen-immersive-icon-btn {
        width: 34px;
        height: 34px;
    }
    .zen-immersive-icon-btn svg {
        width: 15px;
        height: 15px;
    }
    .timer-card-main {
        padding: 1.25rem !important;
    }
    .timer-display-box {
        max-width: 100% !important;
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .zen-overlay.immersive #zen-countdown-text {
        font-size: clamp(2.5rem, 22cqw, 6.5rem) !important;
    }
    .timer-card-main {
        padding: 1rem !important;
    }
    .timer-display-box {
        max-width: 100% !important;
        width: 100% !important;
    }
    .timer-controls-row {
        gap: 10px !important;
    }
}

/* Micro Reflection Modal Overlay */
.reflection-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 8, 22, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.reflection-overlay.open {
    display: flex;
    animation: reflectionFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes reflectionFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.reflection-card {
    position: relative;
    width: 92vw;
    max-width: 480px;
    background: linear-gradient(145deg, rgba(24, 18, 44, 0.98) 0%, rgba(14, 11, 28, 0.99) 100%);
    border: 1px solid rgba(167, 139, 250, 0.35);
    border-radius: 28px;
    padding: 32px 28px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.85), 0 0 40px rgba(124, 58, 237, 0.32);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .reflection-card {
        padding: 22px 16px;
        border-radius: 22px;
    }
}

.reflection-close-btn {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.reflection-close-btn:hover {
    color: #ffffff;
}

.reflection-icon-ring {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.12);
    border: 2px solid rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.reflection-flame-icon {
    font-size: 1.55rem;
    color: #f59e0b;
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.7));
}

.reflection-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 4px;
    background: linear-gradient(135deg, #ffffff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.reflection-subtitle {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin: 0 0 20px;
}

.reflection-session-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    width: 100%;
    margin-bottom: 14px;
}

.reflection-stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.reflection-stat-val {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    font-family: var(--font-mono);
}

.reflection-stat-lbl {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 3px;
    font-weight: 600;
}

/* Reflection Today's Focus Card (Full Width Edge-to-Edge Bar) */
.reflection-today-focus-fullcard {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    box-sizing: border-box;
}

.fullwidth-bar {
    width: 100% !important;
    height: 7px !important;
    margin: 0 !important;
}

.reflection-task-info {
    width: 100%;
    background: rgba(124, 58, 237, 0.09);
    border: 1px solid rgba(167, 139, 250, 0.25);
    border-radius: 18px;
    padding: 14px 16px;
    margin-bottom: 22px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    box-sizing: border-box;
}

.reflection-task-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.reflection-task-capsule {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(124, 58, 237, 0.22);
    color: #a78bfa;
    white-space: nowrap;
}

.reflection-meta-tag {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    white-space: nowrap;
}

.reflection-meta-tag.due-date {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.25);
    color: #34d399;
}

.reflection-meta-tag.task-time-badge {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.reflection-task-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: #ffffff;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    margin-bottom: 2px;
}

.reflection-actions {
    display: flex;
    gap: 12px;
    width: 100%;
}

.reflection-btn-notes {
    flex: 1.4;
    padding: 12px;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(124, 58, 237, 0.4);
}

.reflection-btn-done {
    flex: 1;
    padding: 12px;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(5, 150, 105, 0.35) 100%);
    border: 1px solid rgba(52, 211, 153, 0.45);
    color: #34d399;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.22);
}

.reflection-btn-done:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.35) 0%, rgba(5, 150, 105, 0.55) 100%);
    border-color: rgba(52, 211, 153, 0.7);
    color: #ffffff;
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

html[data-theme="linen"] .reflection-btn-done {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.25) 100%);
    border-color: rgba(16, 185, 129, 0.4);
    color: #047857;
}

/* =============================================
   STREAK FLAME BUTTON & WARM GOLDEN AMBER AESTHETIC MODAL
   ============================================= */
.streak-flame-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.streak-flame-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(245, 158, 11, 0.5);
    transform: translateY(-1px);
}

.streak-flame-btn.ignited {
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.25) 0%, rgba(249, 115, 22, 0.18) 100%);
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.4);
}

.streak-flame-icon.flame-dim {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.streak-flame-icon.flame-glowing {
    color: #f59e0b;
    font-size: 1rem;
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.9)) drop-shadow(0 0 14px rgba(249, 115, 22, 0.7));
    animation: warmFlamePulse 1.8s infinite alternate ease-in-out;
}

/* Light Theme Adaptability (Linen) */
html[data-theme="linen"] .streak-flame-btn {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.12);
}

html[data-theme="linen"] .streak-flame-btn:hover {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.4);
}

html[data-theme="linen"] .streak-flame-icon.flame-dim {
    color: rgba(0, 0, 0, 0.35);
}

html[data-theme="linen"] .streak-flame-icon.flame-glowing {
    color: #d97706;
    filter: drop-shadow(0 0 8px rgba(217, 119, 6, 0.6));
}

@keyframes warmFlamePulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.8));
    }
    100% {
        transform: scale(1.16);
        filter: drop-shadow(0 0 14px rgba(245, 158, 11, 1)) drop-shadow(0 0 22px rgba(249, 115, 22, 0.8));
    }
}

/* Modal Showcase Card (Expansive 480px Screen Estate) */
.streak-modal-card {
    width: 100%;
    max-width: 480px;
    background: linear-gradient(165deg, #14101d 0%, #0a0812 100%);
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 28px;
    padding: 2.25rem 2rem 1.75rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 45px rgba(245, 158, 11, 0.16);
    position: relative;
    box-sizing: border-box;
}

/* Unobstructive Minimal Top-Right Close Button */
.streak-modal-close-btn {
    position: absolute !important;
    top: 18px !important;
    right: 22px !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: rgba(255, 255, 255, 0.4) !important;
    font-size: 1.5rem !important;
    line-height: 1 !important;
    cursor: pointer !important;
    transition: color 0.2s ease, transform 0.2s ease !important;
    z-index: 10;
    padding: 4px 8px !important;
    border-radius: 50% !important;
}

.streak-modal-close-btn:hover {
    color: #ffffff !important;
    transform: scale(1.15) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

/* Hero Showcase Row */
.streak-hero-showcase {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.streak-hero-number-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    line-height: 1;
}

.streak-hero-number {
    font-size: 5.4rem;
    font-weight: 800;
    font-family: var(--font-primary, -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Outfit', 'Inter', sans-serif);
    letter-spacing: -0.05em;
    line-height: 0.95;
    background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.72) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.15));
}

.streak-modal-hero-flame {
    font-size: 3.8rem;
    line-height: 1;
}

.streak-modal-hero-flame.pending {
    color: rgba(245, 158, 11, 0.35);
    filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.2));
}

.streak-modal-hero-flame.ignited {
    color: #f59e0b;
    filter: drop-shadow(0 0 22px rgba(245, 158, 11, 0.95)) drop-shadow(0 0 38px rgba(249, 115, 22, 0.8));
    animation: warmFlamePulse 1.8s infinite alternate ease-in-out;
}

.streak-hero-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 8px;
}

/* Progress Bar Card */
.streak-progress-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 1.25rem;
}

.streak-progress-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 99px;
    overflow: hidden;
}

.streak-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b 0%, #f97316 100%);
    border-radius: 99px;
    transition: width 0.4s ease;
}

.streak-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.streak-status-pill.ignited {
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.5);
    color: #f59e0b;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.3);
}

.streak-status-pill.pending {
    background: rgba(249, 115, 22, 0.12);
    border: 1px solid rgba(249, 115, 22, 0.35);
    color: #f97316;
}

.streak-capsule-gear-btn {
    background: transparent;
    border: none;
    color: currentColor;
    font-size: 0.76rem;
    cursor: pointer;
    padding: 2px 4px;
    margin-left: 4px;
    opacity: 0.65;
    transition: opacity 0.2s, transform 0.2s;
    vertical-align: middle;
}

.streak-capsule-gear-btn:hover {
    opacity: 1;
    transform: rotate(45deg);
}

/* History Grid & Polished Tiles */
.streak-weekly-history-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    text-align: center;
}

.streak-history-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 4px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    transition: all 0.25s ease;
}

.streak-history-day.ignited {
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.2) 0%, rgba(249, 115, 22, 0.08) 100%);
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.25);
}

.streak-history-day.today-pending {
    background: rgba(249, 115, 22, 0.08);
    border-color: rgba(249, 115, 22, 0.4);
}

.streak-day-name {
    font-size: 0.65rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.streak-day-icon {
    font-size: 0.95rem;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.streak-history-flame {
    color: #f59e0b;
    font-size: 1.05rem;
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.85));
    animation: warmFlamePulse 1.8s infinite alternate ease-in-out;
}

/* Light Theme Adaptability (Linen) */
html[data-theme="linen"] .streak-modal-card {
    background: linear-gradient(160deg, #ffffff 0%, #f7f4ef 100%);
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12), 0 0 30px rgba(245, 158, 11, 0.15);
}

html[data-theme="linen"] .streak-hero-number {
    background: linear-gradient(180deg, #2c1a0e 0%, #5a4030 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: none;
}

html[data-theme="linen"] .streak-hero-label {
    color: #8c7a6b;
}

html[data-theme="linen"] .streak-progress-card {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.06);
}

html[data-theme="linen"] .streak-history-day {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.06);
}

html[data-theme="linen"] .streak-day-name {
    color: #8c7a6b;
}
    text-shadow: none;
}

html[data-theme="linen"] .streak-hero-label {
    color: #8c7a6b;
}

html[data-theme="linen"] .streak-progress-card {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.06);
}

html[data-theme="linen"] .streak-history-day {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.06);
}

html[data-theme="linen"] .streak-day-name {
    color: #8c7a6b;
}

html[data-theme="linen"] .streak-day-mins {
    color: #2c1a0e;
}
