:root {
    --bg: #fdfcfb;
    --card-bg: #ffffff;
    --text: #1c1c1e;
    --accent: #e67e22; /* Primary Amber */
    --gold: #d35400;   /* Burnt Orange */
    --success: #27ae60;
    --error: #c0392b;
    --dim: #8e8e93;
    
    --font-sans: 'Outfit', sans-serif;
    --font-serif: 'Outfit', sans-serif;
}

[data-theme="dark"] {
    --bg: #0f0f10;
    --card-bg: #1a1a1c;
    --text: #f2f2f7;
    --accent: #f39c12; /* Vibrant Amber */
    --gold: #e67e22;
    --error: #ff3b30;
    --success: #2ecc71;
    --dim: #636366;
}

body {
    background-color: var(--bg); color: var(--text);
    font-family: 'Outfit', sans-serif; height: 100vh; display: flex; flex-direction: column; overflow: hidden; justify-content: space-between;
    user-select: none; margin: 0; padding: 1.5rem 0; box-sizing: border-box; touch-action: manipulation;
    transition: background-color 0.5s ease, color 0.5s ease;
    position: relative;
}

/* Static Noise Layer to prevent jitter during transition */
.noise-layer {
    position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

[data-theme="dark"] body {
    background-image: radial-gradient(circle at 50% 50%, transparent 0%, rgba(0,0,0,0.4) 100%);
}

* { box-sizing: border-box; }

body::after {
    content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none;
    background: radial-gradient(circle at center, transparent 30%, rgba(0,0,0,0.03) 100%);
    opacity: 1; z-index: 1000;
}

[data-theme="dark"] body::after {
    background: radial-gradient(circle at center, transparent 30%, rgba(0,0,0,0.4) 100%);
}

body::before {
    content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none;
    box-shadow: inset 0 0 0px var(--accent); transition: box-shadow 0.5s; z-index: 900;
}
body.wrong-bg::before {
    animation: wrongFlash 0.5s ease-out;
    box-shadow: inset 0 0 100px rgba(192, 57, 43, 0.2);
}

@keyframes wrongFlash {
    0% { box-shadow: inset 0 0 0px rgba(192, 57, 43, 0); }
    50% { box-shadow: inset 0 0 150px rgba(192, 57, 43, 0.4); }
    100% { box-shadow: inset 0 0 100px rgba(192, 57, 43, 0.2); }
}

body.danger-mode::before {
    animation: dangerPulse 0.8s infinite alternate ease-in-out;
    box-shadow: inset 0 0 40px rgba(196, 62, 43, 0.4);
}

@keyframes dangerPulse {
    0% { box-shadow: inset 0 0 20px rgba(196, 62, 43, 0); }
    100% { box-shadow: inset 0 0 120px rgba(196, 62, 43, 0.4); }
}

/* Time Penalty Animation */
.time-penalty {
    position: absolute; top: 3.5rem; left: 50%; transform: translateX(-50%);
    color: var(--accent); font-weight: 800; font-size: 0.8rem;
    animation: penaltyFloat 0.8s forwards ease-out; pointer-events: none;
    white-space: nowrap; z-index: 100;
}
@keyframes penaltyFloat {
    0% { opacity: 0; transform: translate(-50%, 0); }
    30% { opacity: 1; transform: translate(-50%, 5px); }
    100% { opacity: 0; transform: translate(-50%, 25px); }
}

.new-letter {
    display: inline-block;
    animation: letterBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes letterBounce {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.input-delete-shake {
    animation: inputShake 0.2s ease-in-out;
}

@keyframes inputShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.ui-shake {
    animation: globalShake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes globalShake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

.app-container {
    width: 100%; max-width: 800px; margin: 0 auto; flex-grow: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 1.5rem; padding: 0.5rem 0; overflow: visible;
}

/* Advertisement Layouts */
.ad-container {
    width: 95%; max-width: 800px; margin: 0 auto;
    min-height: 90px; background: rgba(0,0,0,0.01);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border-radius: 16px; border: 1px dashed rgba(0,0,0,0.04);
    position: relative; overflow: hidden; flex-shrink: 0;
}
.ad-label {
    font-size: 0.5rem; letter-spacing: 2px; opacity: 0.3;
    position: absolute; top: 5px; left: 15px; font-weight: 700;
}
[data-theme="dark"] .ad-container { background: rgba(255,255,255,0.01); border-color: rgba(255,255,255,0.04); }


.top-nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 2rem; z-index: 10; width: 100%; max-width: 800px; margin: 0 auto;
}

.daily-badge {
    font-family: var(--font-sans); font-size: 0.6rem; font-weight: 800;
    padding: 2px 8px; border-radius: 4px; border: 1px solid rgba(230, 126, 34, 0.3);
    color: var(--accent); opacity: 0.7; letter-spacing: 1px;
}

.logo { 
    font-family: var(--font-serif); font-size: 1.8rem; font-weight: 700; letter-spacing: 6px; 
    text-transform: uppercase; color: var(--text);
    transition: letter-spacing 0.5s ease;
}
.logo:hover { letter-spacing: 10px; }
.nav-controls { display: flex; align-items: center; gap: 2rem; }
.timer { font-family: var(--font-sans); font-size: 1.2rem; font-weight: 600; color: var(--text); opacity: 0.8; }
.timer.danger { color: var(--accent); animation: timerPanic 0.5s infinite; }
@keyframes timerPanic {
    0%, 100% { transform: scale(1.1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(2deg); }
    75% { transform: scale(1.1) rotate(-2deg); }
}

.theme-toggle {
    background: transparent; border: none; color: var(--text); cursor: pointer;
    padding: 0.5rem; display: flex; align-items: center; justify-content: center;
    transition: transform 0.3s;
}
.theme-toggle:hover { transform: scale(1.1); }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.8; transform: scale(1.05); } }
.timer.punished { color: var(--accent); transform: scale(1.2); }

.time-burn-bar {
    position: fixed; top: 0; left: 0; height: 5px; background: var(--text);
    width: 100%; z-index: 2000; transform-origin: left; transition: width 1s linear, background 0.3s;
}

.combo-badge {
    position: absolute; top: -50px; left: 0; right: 0; margin: 0 auto; width: max-content;
    background: var(--gold); color: #fff;
    padding: 0.3rem 1.2rem; border-radius: 100px; font-family: var(--font-sans); font-weight: 600;
    font-size: 0.9rem; letter-spacing: 2px; transform: translateY(0) scale(1); transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 4px 10px rgba(198, 168, 124, 0.4); z-index: 100;
}
.combo-badge.hidden { opacity: 0; transform: translateY(-10px) scale(0.9); pointer-events: none; }

.progress-bar {
    width: 100%; padding: 0 2rem; display: flex; justify-content: center; z-index: 10;
}
.progress-track {
    display: flex; gap: 6px; width: 100%; max-width: 600px;
    padding: 12px; background: rgba(0,0,0,0.02); border-radius: 20px;
}
.letter-dot {
    flex: 1; height: 6px; background: rgba(0,0,0,0.08); border-radius: 10px;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}
[data-theme="dark"] .progress-track { background: rgba(255,255,255,0.02); }
[data-theme="dark"] .letter-dot { background: rgba(255,255,255,0.1); }

.letter-dot.active { 
    transform: scaleY(1.8); background: var(--accent); opacity: 1; 
    box-shadow: 0 0 15px rgba(230, 126, 34, 0.2);
}
[data-theme="dark"] .letter-dot.active { box-shadow: 0 0 20px rgba(243, 156, 18, 0.3); }
.letter-dot.correct { background: var(--success); }
.letter-dot.wrong { background: var(--error); }
/* Non-Obstructive Tutorial Styles */
/* HUD Insight Tutorial Reimagined */
.tutorial-insight {
    position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%);
    background: rgba(255,255,255,0.85); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--accent); border-radius: 100px;
    padding: 0.8rem 2.5rem; z-index: 4000; width: auto; min-width: 480px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    display: flex; flex-direction: column; gap: 0.4rem; overflow: hidden;
    animation: insightSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="dark"] .tutorial-insight { 
    background: rgba(15,15,15,0.9); 
    border-color: var(--accent);
}

.insight-content { display: flex; align-items: center; gap: 1.5rem; }
.insight-step-num { font-family: var(--font-serif); font-size: 0.8rem; opacity: 0.6; font-style: italic; color: var(--accent); }
.tutorial-insight p { font-size: 0.95rem; font-weight: 600; color: var(--text); flex: 1; letter-spacing: 0.3px; }

.insight-keys { display: flex; align-items: center; gap: 0.6rem; }
.key-tag { 
    font-size: 0.65rem; font-weight: 800; background: var(--accent); color: white;
    padding: 3px 8px; border-radius: 4px; font-family: monospace;
}
.key-label { font-size: 0.6rem; font-weight: 800; letter-spacing: 1px; opacity: 0.6; }

@keyframes insightSlideUp {
    from { transform: translate(-50%, 100%); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.tutorial-pulse {
    animation: elementPulse 1.5s infinite ease-in-out !important;
    border-radius: inherit;
    position: relative;
    z-index: 4500;
    /* Use box-shadow for the border effect to prevent shifting */
    box-shadow: 0 0 0 2px var(--accent) !important;
}
@keyframes elementPulse {
    0%, 100% { box-shadow: 0 0 0 2px var(--accent), 0 0 0 0 rgba(230, 126, 34, 0); }
    50% { box-shadow: 0 0 0 2px var(--gold), 0 0 0 20px rgba(230, 126, 34, 0.2); }
}

.game-area {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    z-index: 10; width: 100%; padding: 0 2rem 2rem 2rem; max-width: 620px; margin: 0 auto;
    gap: 1.5rem; position: relative; overflow: visible; /* Prevent pulse clipping */
}

.card-stack {
    position: relative;
    width: 100%; max-width: 600px; height: 380px; margin: 2rem auto;
    z-index: 5;
    display: flex; align-items: center; justify-content: center;
    animation: cardFloat 6s ease-in-out infinite;
}

/* Navigation Arrows */
.nav-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: var(--card-bg); border: 1px solid rgba(230, 126, 34, 0.1);
    color: var(--text); width: 50px; height: 50px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 20; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}
.nav-arrow:hover { transform: translateY(-50%) scale(1.1); background: var(--accent); color: white; border-color: var(--accent); }
.nav-arrow.prev { left: -70px; }
.nav-arrow.next { right: -70px; }

@media (max-width: 768px) {
    .nav-arrow { width: 40px; height: 40px; }
    .nav-arrow.prev { left: 10px; }
    .nav-arrow.next { right: 10px; }
}

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

.card {
    position: absolute; width: 100%; height: 100%; 
    background: linear-gradient(145deg, #ffffff, #f5f5f7);
    border-radius: 48px; 
    box-shadow: 
        0 10px 30px rgba(0,0,0,0.02),
        0 40px 100px rgba(0,0,0,0.04),
        inset 0 0 0 1px rgba(230, 126, 34, 0.08);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 3rem 4rem; text-align: center;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: visible;
}

[data-theme="dark"] .card {
    background: linear-gradient(145deg, #1c1c1e, #141415);
    box-shadow: 
        0 10px 30px rgba(0,0,0,0.2),
        0 40px 100px rgba(0,0,0,0.4),
        inset 0 0 0 1px rgba(243, 156, 18, 0.1);
    border: none;
}

.card.wrong-state {
    transform: translateX(10px);
}

.card.hidden {
    opacity: 0; transform: translateY(20px); pointer-events: none;
}

.card.swipe-right { transform: translateX(120%) rotate(10deg) !important; opacity: 0; transition: transform 0.5s, opacity 0.4s; }
.card.swipe-left { transform: translateX(-120%) rotate(-10deg) !important; opacity: 0; transition: transform 0.5s, opacity 0.4s; }
.card.swipe-down { transform: translateY(120%) rotate(5deg) !important; opacity: 0; transition: transform 0.5s, opacity 0.4s; }

.stamp {
    position: absolute; top: 1.5rem; left: 0; right: 0; margin: 0 auto;
    font-family: var(--font-sans); width: max-content;
    font-size: 0.7rem; font-weight: 800; padding: 0.3rem 1rem;
    border-radius: 100px; opacity: 0; letter-spacing: 2px;
    text-transform: uppercase; transition: all 0.3s;
    pointer-events: none; z-index: 100;
}
.stamp.correct { color: var(--success); opacity: 1; transform: translateY(-5px); }
.stamp.wrong { color: var(--error); opacity: 1; transform: translateY(-5px); }
.stamp.pass { color: var(--gold); opacity: 1; transform: translateY(-5px); }

.success-flash {
    position: absolute; inset: 0; background: var(--accent);
    opacity: 0; pointer-events: none; z-index: 100;
    transition: opacity 0.3s;
    border-radius: 48px; /* Matches card corner */
}
.success-flash.active { opacity: 0.15; }

.card-letter {
    font-family: var(--font-sans); font-size: 2.5rem; font-weight: 900;
    color: var(--accent); letter-spacing: -1px;
    margin-bottom: 0.5rem; z-index: 1;
    align-self: center;
}

.card-clue {
    font-family: var(--font-serif); font-size: 2.2rem; color: var(--text);
    margin-bottom: 2.5rem; line-height: 1.3; font-weight: 500; z-index: 1;
    position: relative; text-wrap: balance;
    letter-spacing: -0.5px; text-align: center;
}

.input-display {
    width: 100%; max-width: 320px;
    height: 4.5rem;
    font-family: var(--font-sans); 
    font-size: clamp(1.4rem, 8vw, 2.4rem); 
    font-weight: 700;
    color: var(--text);
    display: flex; align-items: center; justify-content: center;
    gap: 2px;
    border-bottom: 2px solid rgba(230, 126, 34, 0.15);
    padding-bottom: 0.5rem;
    transition: border-color 0.3s;
}
.input-display span { display: inline-block; }
.input-display span.new-letter { animation: letterPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.input-display span.hint-letter { animation: letterPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); color: var(--accent); }
.input-display span.hint-remove { animation: letterRemove 0.15s ease-in forwards; }
@keyframes letterPop {
    0% { transform: scale(0.5); opacity: 0; filter: blur(4px); }
    100% { transform: scale(1); opacity: 1; filter: blur(0); }
}
@keyframes letterRemove {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0); opacity: 0; }
}

[data-theme="dark"] .input-display {
    border-bottom-color: var(--text);
}

.placeholder { color: var(--dim); font-size: 0.8rem; font-weight: 500; letter-spacing: 2px; opacity: 0.5; }
[data-theme="dark"] .placeholder { color: rgba(255,255,255,0.3); }

.actions {
    display: flex; gap: 1rem; width: 100%; z-index: 10;
}

.action-btn {
    flex: 1; padding: 1.2rem; font-family: var(--font-sans); font-size: 0.8rem; font-weight: 700;
    letter-spacing: 2px; text-transform: uppercase; border-radius: 100px; cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); 
    background: rgba(0,0,0,0.03); 
    border: 1px solid rgba(0,0,0,0.05); color: var(--text); opacity: 0.8;
    position: relative; overflow: visible;
}
[data-theme="dark"] .action-btn { background: rgba(255,255,255,0.05); }
.action-btn:hover { background: var(--text); color: var(--bg); opacity: 1; transform: translateY(-2px); }
.action-btn:active { transform: translateY(0) scale(0.98); }

.start-bg-letter {
    position: absolute;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-family: var(--font-serif); font-size: 35rem; font-style: italic;
    color: var(--text); opacity: 0.03; pointer-events: none; z-index: -1;
}

.brand-badge {
    font-size: 0.7rem; font-weight: 800; letter-spacing: 3px; color: var(--accent);
    margin-bottom: 1rem; text-transform: uppercase;
}

.separator {
    width: 40px; height: 2px; background: var(--accent); margin: 1.5rem auto;
}

.shortcut-sticker {
    position: absolute; bottom: -8px; right: -8px;
    height: 20px; background: var(--text); color: var(--bg);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.6rem; font-weight: 800; border: 1px solid var(--card-bg);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 5;
}

.nav-controls { position: relative; } /* For absolute time penalty */

.keyboard {
    width: 100%; max-width: 600px; margin: 1rem auto 1rem; display: flex; flex-direction: column; gap: 8px; z-index: 100;
    background: rgba(0,0,0,0.04); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    padding: 1.5rem 1rem; border-radius: 40px; border: 1px solid rgba(0,0,0,0.05);
}
[data-theme="dark"] .keyboard { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); }

.keyboard-row { display: flex; justify-content: center; gap: 6px; width: 100%; }
.keyboard button {
    font-family: var(--font-sans); font-size: 1.1rem; font-weight: 500;
    border: 1px solid rgba(0,0,0,0.03); background: var(--card-bg); color: var(--text);
    border-radius: 100px; padding: 1.2rem 0; flex: 1; max-width: 42px;
    cursor: pointer; text-transform: uppercase; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.02); transform: translateY(0);
}
.keyboard button:hover { background: var(--text); color: var(--bg); transform: translateY(-2px); }
.keyboard button:active, .keyboard button.key-active { 
    background: rgba(0,0,0,0.05);
    transform: scale(0.94);
    box-shadow: none;
    transition: all 0.1s ease;
}

[data-theme="dark"] .keyboard button:active, [data-theme="dark"] .keyboard button.key-active {
    background: rgba(255,255,255,0.1);
}
.keyboard button.key-large { flex: 1.5; max-width: 65px; font-size: 0.8rem; font-weight: 600; letter-spacing: 1px;}

.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: none; align-items: center; justify-content: center;
    z-index: 1000; opacity: 0; transition: opacity 0.5s ease;
    pointer-events: none;
}
[data-theme="dark"] .overlay { background: rgba(10, 10, 10, 0.95); }
.overlay.active { display: flex; opacity: 1; pointer-events: auto; }

.overlay-content, .end-content { 
    text-align: center; max-width: 600px; padding: 3.5rem 3rem;
    background: var(--card-bg); border-radius: 40px;
    box-shadow: 0 40px 100px rgba(0,0,0,0.2);
    border: 1px solid rgba(230, 126, 34, 0.1);
}

.brand-huge { font-family: var(--font-serif); font-size: 4rem; font-style: italic; color: var(--text); margin-bottom: 1rem; line-height: 1; }

.stats-grid { display: flex; gap: 1rem; margin-bottom: 2rem; justify-content: center; flex-wrap: wrap;}
.stat-box { display: flex; flex-direction: column; align-items: center; padding: 1.5rem 1rem; background: rgba(150,150,150,0.05); border-radius: 12px; min-width: 100px; position: relative;}
.stat-box.high-score { background: rgba(212, 181, 134, 0.1); border: 1px solid var(--gold); }
.stat-num { font-family: var(--font-serif); font-size: 2.5rem; font-weight: 600; color: var(--text); line-height: 1;}
.stat-label { font-family: var(--font-sans); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--dim); margin-top: 0.8rem;}
.stat-best { position: absolute; top: -10px; background: var(--text); color: var(--bg); font-size: 0.6rem; padding: 0.2rem 0.5rem; border-radius: 10px; text-transform: uppercase; letter-spacing: 1px;}

.desc { font-size: 1.2rem; color: var(--dim); margin-bottom: 2rem; font-family: var(--font-serif); }

.end-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;}
.btn-primary {
    background: var(--text); border: none; color: var(--bg); padding: 1.2rem 2.5rem;
    font-family: inherit; font-size: 0.9rem; font-weight: 600; letter-spacing: 2px;
    border-radius: 100px; cursor: pointer; transition: all 0.3s;
}
.btn-secondary {
    background: transparent; border: 1px solid var(--text); color: var(--text); padding: 1.2rem 2.5rem;
    font-family: inherit; font-size: 0.9rem; font-weight: 600; letter-spacing: 2px;
    border-radius: 100px; cursor: pointer; transition: all 0.3s; display: flex; align-items: center; gap: 0.5rem;
}
.btn-primary:hover, .btn-secondary:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }

@media (min-width: 768px) {
    .card-clue { font-size: 2.2rem; }
    .input-display { font-size: 2.8rem; }
    .keyboard button { padding: 1.2rem 0; max-width: 48px; font-size: 1.2rem; }
    .keyboard button.key-large { max-width: 75px; font-size: 0.9rem; }
    .card-stack { height: 380px; }
}

/* HUD Insight Tutorial Reimagined with Animations */
.tutorial-insight {
    position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%);
    background: rgba(255,255,255,0.85); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--accent); border-radius: 100px;
    padding: 0.8rem 2.5rem; z-index: 4000; width: auto; min-width: 480px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    display: flex; flex-direction: column; gap: 0.4rem; overflow: hidden;
    animation: insightSpringUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
[data-theme="dark"] .tutorial-insight { background: rgba(15,15,15,0.9); border-color: var(--accent); }

.insight-content { display: flex; align-items: center; gap: 1.5rem; }
.insight-step-num { 
    font-family: var(--font-serif); font-size: 0.8rem; opacity: 0.6; font-style: italic; color: var(--accent);
    animation: stepPulse 2s infinite ease-in-out;
}
.tutorial-insight p { 
    font-size: 0.95rem; font-weight: 600; color: var(--text); flex: 1; letter-spacing: 0.3px;
    animation: textFadeIn 0.5s ease-out backwards;
}

.insight-keys { display: flex; align-items: center; gap: 0.6rem; animation: textFadeIn 0.5s 0.2s ease-out backwards; }
.key-tag { 
    font-size: 0.65rem; font-weight: 800; background: var(--accent); color: white;
    padding: 3px 8px; border-radius: 4px; font-family: monospace;
}
.key-label { font-size: 0.6rem; font-weight: 800; letter-spacing: 1px; opacity: 0.6; }

@keyframes insightSpringUp {
    0% { transform: translate(-50%, 100%) scale(0.9); opacity: 0; }
    100% { transform: translate(-50%, 0) scale(1); opacity: 1; }
}
@keyframes stepPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
}
@keyframes textFadeIn {
    from { transform: translateY(5px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Editorial Museum: Minimalist Ad Break */
.editorial-overlay {
    background: rgba(15, 15, 16, 0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    opacity: 0; pointer-events: none; transition: opacity 0.5s ease;
    display: flex; align-items: center; justify-content: center;
    padding: 2rem; z-index: 2000;
}
[data-theme="light"] .editorial-overlay { background: rgba(253, 252, 251, 0.7); }

.editorial-overlay.active { opacity: 1; pointer-events: auto; }

.editorial-card {
    background: var(--card-bg);
    border-radius: 48px;
    width: 100%; max-width: 960px;
    display: flex; overflow: hidden;
    box-shadow: 0 40px 100px rgba(0,0,0,0.1), inset 0 0 0 1px rgba(230, 126, 34, 0.05);
    transform: translateY(20px); opacity: 0;
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
}
[data-theme="dark"] .editorial-card {
    box-shadow: 0 40px 100px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(243, 156, 18, 0.1);
}

.editorial-overlay.active .editorial-card { transform: translateY(0); opacity: 1; }

.editorial-visual {
    flex: 1.2; position: relative;
    background: #000;
}
.editorial-visual img { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; }

.editorial-content {
    flex: 1; padding: 4rem 3rem; display: flex; flex-direction: column; justify-content: center;
    position: relative;
}

.editorial-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.editorial-tag { font-size: 0.7rem; font-weight: 800; letter-spacing: 3px; color: var(--accent); }
.editorial-timer {
    width: 44px; height: 44px; border-radius: 50%;
    border: 1.5px solid rgba(230, 126, 34, 0.3); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-sans); font-size: 1.2rem; font-weight: 800;
    background: transparent; padding: 0; cursor: default;
    transition: all 0.3s; outline: none;
}
.editorial-timer.can-close {
    cursor: pointer; border-color: rgba(150, 150, 150, 0.3); color: var(--text); opacity: 0.5;
}
.editorial-timer.can-close:hover {
    opacity: 1; transform: scale(1.1); background: rgba(150, 150, 150, 0.05);
}

.editorial-headline { font-family: var(--font-serif); font-size: 4rem; letter-spacing: -2px; line-height: 1; color: var(--text); margin-bottom: 1.5rem; }
.editorial-desc { font-size: 1rem; line-height: 1.6; color: var(--text); opacity: 0.6; margin-bottom: auto; font-weight: 400; text-wrap: balance; }

.editorial-footer {
    margin-top: 2.5rem; padding-top: 2rem;
    border-top: 1px solid rgba(150, 150, 150, 0.2);
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.5rem;
}
[data-theme="dark"] .editorial-footer { border-color: rgba(255, 255, 255, 0.1); }

.editorial-note {
    font-size: 0.95rem; line-height: 1.6; color: var(--text); opacity: 0.8;
    text-wrap: balance; font-weight: 400; letter-spacing: 0.2px; margin-bottom: 0.5rem;
}

.editorial-actions { display: flex; gap: 1rem; width: 100%; justify-content: center; }

.editorial-actions .btn-primary { padding: 1.2rem 3rem; border-radius: 100px; flex: 1; max-width: 200px; }
.editorial-actions .btn-secondary {
    padding: 1.2rem 3rem; border-radius: 100px; background: transparent;
    border: 1px solid rgba(150,150,150,0.3); color: var(--text);
    flex: 1; max-width: 200px; transition: all 0.3s;
}
[data-theme="dark"] .editorial-actions .btn-secondary { border-color: rgba(255,255,255,0.2); }
.editorial-actions .btn-secondary:disabled { opacity: 0.3; cursor: not-allowed; filter: grayscale(1); border-color: transparent; }

@media (max-width: 900px) {
    .editorial-card { flex-direction: column; border-radius: 36px; max-height: 85vh; overflow-y: auto; }
    .editorial-visual { height: 250px; flex: none; }
    .editorial-content { padding: 2.5rem 2rem; flex: none; }
    .editorial-headline { font-size: 3rem; }
    .editorial-actions { flex-direction: column-reverse; }
    .editorial-actions .btn-primary, .editorial-actions .btn-secondary { max-width: 100%; width: 100%; }
}










