* { margin:0; padding:0; box-sizing:border-box; }

:root {
    --bg: #14142a;
    --pink: #FF6BF0;
    --cyan: #66EEFF;
    --green: #66FF66;
    --purple: #BB66FF;
    --amber: #FFD060;
    --panel-bg: rgba(20,20,42,0.88);
    --font-mono: 'Share Tech Mono', monospace;
    --font-display: 'Orbitron', sans-serif;
}

body {
    background: var(--bg);
    color: #f0f0f5;
    font-family: var(--font-mono);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

#scene-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
}

#scene-container canvas { display: block; }

/* OVERLAY */
.overlay {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(10,10,16,0.95);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
}

.onboard-card {
    text-align: center;
    padding: 60px 40px;
}

.onboard-title {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 900;
    color: var(--cyan);
    text-shadow: 0 0 40px var(--cyan), 0 0 80px var(--cyan), 0 0 120px rgba(0,255,255,0.3);
    letter-spacing: 0.15em;
}

.onboard-subtitle {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--pink);
    text-shadow: 0 0 20px var(--pink);
    letter-spacing: 0.5em;
    margin-top: 8px;
}

.onboard-desc {
    color: #aaa;
    font-size: 0.95rem;
    margin: 30px 0 40px;
    line-height: 1.6;
}

/* UI Panels */
.ui-panel { pointer-events: auto; }

/* Top Bar */
#top-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 52px;
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(102,238,255,0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
}

.club-name {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.1rem;
    color: var(--cyan);
    text-shadow: 0 0 10px var(--cyan);
    letter-spacing: 0.1em;
}

.top-stats {
    display: flex;
    align-items: center;
    gap: 24px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-label {
    font-size: 0.75rem;
    color: #aab;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 6px rgba(255,255,255,0.5);
}

.vibe-ring {
    position: relative;
    width: 32px; height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vibe-svg {
    width: 32px; height: 32px;
    transform: rotate(-90deg);
}

.vibe-bg {
    fill: none;
    stroke: #444466;
    stroke-width: 3;
}

.vibe-fill {
    fill: none;
    stroke: var(--green);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 0.5s, stroke 0.5s;
}

.vibe-text {
    position: absolute;
    font-size: 0.5rem;
    font-weight: 700;
    color: #fff;
    font-family: var(--font-display);
}

.eq-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 18px;
}

.eq-bar {
    width: 3px;
    background: var(--cyan);
    border-radius: 1px;
    animation: eqBounce 0.5s ease-in-out infinite alternate;
    box-shadow: 0 0 4px var(--cyan);
}
.eq-bar:nth-child(1) { height: 8px; animation-delay: 0s; }
.eq-bar:nth-child(2) { height: 14px; animation-delay: 0.1s; }
.eq-bar:nth-child(3) { height: 10px; animation-delay: 0.2s; }
.eq-bar:nth-child(4) { height: 16px; animation-delay: 0.15s; }

@keyframes eqBounce {
    from { transform: scaleY(0.4); }
    to { transform: scaleY(1); }
}

.top-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Buttons */
.neon-btn {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 8px 18px;
    background: transparent;
    color: var(--cyan);
    border: 1px solid var(--cyan);
    cursor: pointer;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.2s;
    text-shadow: 0 0 6px var(--cyan);
    box-shadow: 0 0 8px rgba(0,255,255,0.2), inset 0 0 8px rgba(0,255,255,0.1);
}

.neon-btn:hover {
    background: rgba(0,255,255,0.15);
    box-shadow: 0 0 20px rgba(0,255,255,0.4), inset 0 0 15px rgba(0,255,255,0.2);
}

.neon-btn.small { padding: 6px 12px; font-size: 0.7rem; }

.pulse-btn {
    animation: pulseGlow 2s ease-in-out infinite;
    font-size: 1.1rem;
    padding: 16px 40px;
    border-color: var(--pink);
    color: var(--pink);
    text-shadow: 0 0 10px var(--pink);
    box-shadow: 0 0 20px rgba(255,16,240,0.3), inset 0 0 10px rgba(255,16,240,0.15);
}

.pulse-btn:hover {
    background: rgba(255,16,240,0.2);
    box-shadow: 0 0 40px rgba(255,16,240,0.5);
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(255,16,240,0.3), inset 0 0 10px rgba(255,16,240,0.15); }
    50% { box-shadow: 0 0 40px rgba(255,16,240,0.5), inset 0 0 20px rgba(255,16,240,0.25); }
}

.icon-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.2);
    color: #bbc;
    cursor: pointer;
    width: 36px; height: 36px;
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.2s;
}
.icon-btn:hover { border-color: var(--cyan); color: var(--cyan); }

/* Inspector */
.inspector-panel {
    position: fixed;
    top: 52px; right: 0; bottom: 0;
    width: 300px;
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    border-left: 3px solid var(--pink);
    padding: 20px;
    overflow-y: auto;
    z-index: 90;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.close-btn {
    position: absolute;
    top: 10px; right: 10px;
    background: none; border: none;
    color: #666; font-size: 1.4rem;
    cursor: pointer;
    transition: color 0.2s;
}
.close-btn:hover { color: var(--pink); }

.inspector-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    margin: 10px auto 16px;
    border: 2px solid var(--pink);
    box-shadow: 0 0 20px rgba(255,16,240,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.inspector-name {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 0 10px rgba(255,255,255,0.4);
}

.inspector-badge {
    text-align: center;
    margin: 8px 0;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    display: inline-block;
    width: auto;
    margin-left: auto; margin-right: auto;
    display: block;
    background: rgba(255,16,240,0.15);
    border: 1px solid rgba(255,16,240,0.3);
    color: var(--pink);
    letter-spacing: 0.1em;
}

.inspector-status {
    text-align: center;
    color: #aab;
    font-style: italic;
    font-size: 0.8rem;
    margin: 12px 0 16px;
}

.inspector-stats { margin: 12px 0; }

.stat-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.bar-label {
    font-size: 0.65rem;
    color: #aab;
    width: 90px;
    flex-shrink: 0;
    letter-spacing: 0.05em;
}

.bar-track {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.12);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.stamina-fill { background: linear-gradient(90deg, #ff4444, #ffaa00, #39FF14); }
.hydration-fill { background: linear-gradient(90deg, #0044ff, #00aaff, #00ffff); }
.vibe-fill { background: linear-gradient(90deg, #8B00FF, #FF10F0); }
.ear-fill { background: linear-gradient(90deg, #004444, #00aaaa, #00FFFF); }

.bar-val {
    font-size: 0.7rem;
    width: 28px;
    text-align: right;
    color: #ccccdd;
    font-family: var(--font-display);
}

.inspector-target {
    font-size: 0.75rem;
    color: #889;
    padding: 8px 0;
}

.inspector-divider {
    border-top: 1px solid rgba(255,255,255,0.08);
    margin: 12px 0;
}

.inspector-actions {
    display: flex;
    gap: 6px;
}

.action-btn {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 6px 4px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    color: #bbc;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    letter-spacing: 0.05em;
}

.action-btn:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    background: rgba(0,255,255,0.1);
}

/* Build Panel */
.build-panel {
    position: fixed;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 580px;
    max-width: 95vw;
    z-index: 90;
}

.build-toggle {
    text-align: center;
    padding: 6px 20px;
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,16,240,0.3);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    color: var(--pink);
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    width: 100px;
    margin: 0 auto;
    display: block;
    transition: all 0.2s;
    text-shadow: 0 0 8px var(--pink);
}
.build-toggle:hover { background: rgba(255,16,240,0.1); }

.build-content {
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    border-top: 2px solid var(--pink);
    padding: 12px 16px;
}

.build-content.collapsed { display: none; }

.build-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}

.tab-btn {
    font-family: var(--font-display);
    font-size: 0.65rem;
    padding: 4px 14px;
    background: none;
    border: none;
    color: #778;
    cursor: pointer;
    letter-spacing: 0.15em;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.tab-btn.active { color: var(--pink); border-bottom-color: var(--pink); }

.build-items {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.build-item {
    flex-shrink: 0;
    width: 76px; height: 82px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    gap: 4px;
}

.build-item:hover {
    border-color: var(--pink);
    background: rgba(255,16,240,0.1);
    box-shadow: 0 0 12px rgba(255,16,240,0.2);
}

.build-item.selected {
    border-color: var(--cyan);
    background: rgba(0,255,255,0.12);
    box-shadow: 0 0 16px rgba(0,255,255,0.3);
}

.build-item .item-icon { font-size: 1.6rem; }
.build-item .item-name {
    font-size: 0.5rem;
    color: #aab;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.2;
}

/* Build indicator */
.build-indicator {
    position: fixed;
    top: 62px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--panel-bg);
    border: 1px solid var(--cyan);
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 0.75rem;
    z-index: 100;
    display: flex;
    gap: 12px;
    color: var(--cyan);
    text-shadow: 0 0 6px var(--cyan);
}

.build-cancel { color: #889; }

/* Footer */
.footer-brand {
    position: fixed;
    bottom: 4px;
    left: 8px;
    font-size: 0.55rem;
    color: #556;
    z-index: 80;
    pointer-events: auto;
    display: flex;
    gap: 10px;
}

.footer-brand a {
    color: rgba(255,107,240,0.5);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-brand a:hover {
    color: var(--pink);
    text-shadow: 0 0 8px var(--pink);
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,16,240,0.3); border-radius: 2px; }

/* Mobile */
@media (max-width: 768px) {
    .top-stats { gap: 12px; }
    .stat-label { font-size: 0.6rem; }
    .club-name { font-size: 0.85rem; }
    .inspector-panel { width: 100%; top: auto; bottom: 0; height: 50vh; border-left: none; border-top: 3px solid var(--pink); }
    .build-panel { width: 100%; }
    .onboard-title { font-size: 2.2rem; }
    .onboard-subtitle { font-size: 1rem; letter-spacing: 0.3em; }
}