* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

body {
    overflow: hidden;
    background: #1a1a1a;
    font-family: 'Nunito', sans-serif;
    touch-action: none;
}

#canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: block;
}

#ui-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.5s ease;
}

#ui-overlay.zen {
    opacity: 0;
}

#ui-overlay > * {
    pointer-events: auto;
}

#header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: linear-gradient(180deg, rgba(20,20,20,0.9) 0%, rgba(20,20,20,0) 100%);
    transition: opacity 0.6s ease, transform 0.4s ease;
    z-index: 20;
}

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

#menu-btn {
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    font-size: 20px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

#menu-btn:hover { background: rgba(255,255,255,0.2); }

#header-title {
    flex: 1;
    text-align: center;
    color: rgba(255,255,255,0.9);
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.5px;
}

#header-right {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

#header-right button {
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    font-size: 16px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

#header-right button:hover { background: rgba(255,255,255,0.2); }

#activity-label {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    white-space: nowrap;
}

#activity-label.show {
    opacity: 1;
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.8);
    font-size: 28px;
    width: 44px;
    height: 80px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
}

.nav-arrow:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

#nav-left { left: 10px; }
#nav-right { right: 10px; }

#dots {
    position: absolute;
    bottom: 44px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 15;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.dot.active {
    background: #fff;
    transform: scale(1.3);
    box-shadow: 0 0 12px rgba(255,255,255,0.6);
}

#satisfaction-orb {
    position: absolute;
    bottom: 80px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255,200,255,0.3), rgba(120,80,200,0.2));
    border: 2px solid rgba(255,255,255,0.2);
    overflow: hidden;
    z-index: 15;
}

#orb-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0%;
    background: linear-gradient(180deg, #f9a8d4, #c084fc, #818cf8);
    transition: height 0.5s ease;
    border-radius: 0 0 50% 50%;
}

#orb-sparkle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    animation: sparkle-pulse 2s ease-in-out infinite;
}

@keyframes sparkle-pulse {
    0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(0.8); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

#footer {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    transition: opacity 0.4s;
}

#footer a {
    color: rgba(255,255,255,0.35);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

#footer a:hover { color: rgba(255,255,255,0.6); }

#activity-info {
    position: absolute;
    bottom: 80px;
    left: 20px;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    font-weight: 600;
    z-index: 15;
    pointer-events: none;
}

/* Menu */
#menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
}

#menu-overlay.open {
    display: flex;
}

#menu-panel {
    background: rgba(25,25,25,0.97);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    padding: 32px;
    width: min(400px, 90vw);
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}

#menu-panel h2 {
    color: #fff;
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 20px;
    text-align: center;
}

#menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.menu-item {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 20px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.menu-item:hover {
    background: rgba(255,255,255,0.12);
    transform: scale(1.03);
}

.menu-item.active {
    background: rgba(200,160,100,0.15);
    border-color: rgba(200,160,100,0.3);
}

.menu-item-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.menu-item-name {
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    font-weight: 700;
}

#menu-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

#menu-close:hover { background: rgba(255,255,255,0.2); }

@media (max-width: 500px) {
    .nav-arrow { width: 36px; height: 60px; font-size: 22px; }
    #nav-left { left: 6px; }
    #nav-right { right: 6px; }
    #header-title { font-size: 14px; }
}