:root {
    --bg-deep: #0a0a0c;
    --bg-surface: rgba(255, 255, 255, 0.05);
    --accent-primary: #8b5cf6;
    --accent-secondary: #06b6d4;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0; padding: 0; box-sizing: border-box;
    font-family: 'Inter', system-ui, sans-serif;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    height: 100vh;
}

body.lock-scroll {
    overflow: hidden !important;
    scroll-snap-type: none !important;
}

#app { width: 100%; height: 100vh; }

.screen {
    height: 100vh; width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    position: relative; overflow: hidden; padding: 1rem;
}

.glass-card {
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 100%; max-width: 450px;
    margin: 0 auto; text-align: center;
    z-index: 10; transition: var(--transition-smooth);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    word-break: break-word;
}

.lock-btn {
    position: fixed; top: 1.5rem; right: 1.5rem; z-index: 2000;
    background: var(--bg-surface); border: 1px solid var(--glass-border);
    color: white; width: 45px; height: 45px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; backdrop-filter: blur(8px);
}

.lock-btn.locked {
    background: var(--accent-secondary);
    border-color: white;
    box-shadow: 0 0 15px var(--accent-secondary);
}

.category-nav {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 2000;
    display: flex; justify-content: center; gap: 0.2rem;
    background: rgba(0,0,0,0.6); padding: 0.2rem;
    backdrop-filter: blur(15px); border-bottom: 1px solid var(--glass-border);
}

.cat-tab {
    min-width: 30px; height: 30px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: none;
    color: var(--text-secondary); cursor: pointer; font-size: 1rem;
}

.cat-tab.active { background: var(--accent-primary); color: white; }

.side-controls {
    position: fixed; top: 5rem; right: 1.5rem; z-index: 1800;
    display: flex; flex-direction: column; gap: 0.8rem; align-items: center;
}

.side-btn {
    width: 40px; height: 40px; background: var(--bg-surface);
    border: 1px solid var(--glass-border); border-radius: 50%;
    color: white; display: flex; align-items: center; justify-content: center;
    cursor: pointer; backdrop-filter: blur(8px); font-size: 1.2rem;
}

.side-btn.liked { color: var(--accent-secondary); border-color: var(--accent-secondary); }

.activity-label {
    writing-mode: vertical-rl; text-orientation: mixed;
    color: var(--text-secondary); font-size: 0.7rem;
    text-transform: uppercase; letter-spacing: 2px;
    margin-top: 0.5rem; opacity: 0.6;
}

.scroll-hint {
    position: absolute; bottom: 2rem;
    animation: bounce 2s infinite;
    color: var(--text-secondary); font-size: 0.8rem;
    text-transform: uppercase; letter-spacing: 2px; z-index: 500;
}

.play-mode-btn {
    background: var(--accent-secondary); color: white;
    padding: 0.3rem 0.8rem; border-radius: 12px;
    font-size: 0.7rem; font-weight: 800;
    cursor: pointer; margin-top: 0.5rem;
}

.instruction-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 50;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center; padding: 2rem;
    transition: opacity 0.4s ease;
}

.instruction-overlay h3 { color: var(--accent-secondary); margin-bottom: 0.5rem; }
.instruction-overlay p { font-size: 0.9rem; color: white; opacity: 0.8; }

.glass-card:hover { transform: translateY(-5px); border-color: var(--accent-primary); }

h1 {
    font-size: 2.5rem; font-weight: 800;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

p { color: var(--text-secondary); line-height: 1.6; }

.activity-container {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
}

/* Inline Notification System */
.inline-notify {
    position: fixed; top: 3.5rem; left: 50%;
    transform: translate(-50%, -20px);
    background: var(--bg-surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--accent-primary);
    color: white; padding: 0.5rem 1.5rem;
    border-radius: 20px; font-size: 0.8rem;
    font-weight: 600; z-index: 5000;
    opacity: 0; pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.inline-notify.visible { opacity: 1; transform: translate(-50%, 0); }
.inline-notify.xp { border-color: var(--accent-secondary); color: var(--accent-secondary); }

.level-badge {
    position: fixed; top: 1.5rem; left: 1.5rem;
    background: var(--accent-primary); padding: 0.5rem 1rem;
    border-radius: 20px; font-weight: 800; font-size: 0.8rem;
    box-shadow: 0 0 20px var(--accent-primary); z-index: 1000;
}

.glass-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(20px);
    z-index: 2000; display: flex; align-items: center;
    justify-content: center; overflow-y: auto; padding: 2rem;
}

.stats-content {
    background: var(--bg-surface); border: 1px solid var(--glass-border);
    border-radius: 32px; padding: 3rem; max-width: 800px;
    width: 100%; position: relative;
}

.close-overlay {
    position: absolute; top: 1.5rem; right: 1.5rem;
    background: none; border: none; color: white;
    font-size: 2rem; cursor: pointer;
}

.global-loader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-deep); z-index: 9999;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    transition: opacity 0.8s ease;
}

.spinner {
    width: 50px; height: 50px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite; margin-bottom: 1rem;
}

@keyframes spin { to { transform: rotate(360deg); } }
.global-loader.hidden { opacity: 0; pointer-events: none; }

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

.tab-loader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(5px);
    z-index: 1900; display: flex; align-items: center;
    justify-content: center; opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}

.tab-loader.visible { opacity: 1; pointer-events: all; }
