: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;
}

#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;
}

/* Scroll Lock Button */
.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 Navigation */
.category-nav {
    position: fixed;
    top: 5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1500;
    display: flex;
    gap: 0.5rem;
    background: rgba(0,0,0,0.3);
    padding: 0.4rem;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    max-width: 95vw;
    overflow-x: auto;
    scrollbar-width: none;
}

.cat-tab {
    min-width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 1.2rem;
}

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

/* Activity Instructions Overlay */
.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.5s 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;
}

canvas {
    max-width: 100%;
    max-height: 100%;
}

.controls {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 100;
}

.btn-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: var(--transition-smooth);
}

.btn-icon:hover {
    background: var(--accent-primary);
    transform: scale(1.1);
}

.btn-icon.liked {
    color: #ef4444;
    border-color: #ef4444;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Activity Specific Styles */
.sketchpad-controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

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

@keyframes pulse {
    0% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.2); }
    100% { transform: translateX(-50%) scale(1); }
}

.pulse {
    animation: pulse 0.4s ease;
}

.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;
}

.xp-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--accent-secondary);
    font-weight: 800;
    font-size: 2rem;
    pointer-events: none;
    animation: fadeUp 1s ease-out forwards;
    z-index: 3000;
}

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

/* Stats Overlay */
.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;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-item {
    background: rgba(255,255,255,0.05);
    padding: 1.5rem;
    border-radius: 20px;
    text-align: center;
}

.stats-gallery {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
}

.stats-gallery img {
    width: 150px;
    height: 150px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.grat-list {
    list-style: none;
    margin-top: 1rem;
    text-align: left;
}

.grat-list li {
    background: rgba(255,255,255,0.03);
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 10px;
    border-left: 3px solid var(--accent-secondary);
}
