/* ============================================
   AR - A Aventura Spectrum
   Complete Styles - Mobile-First Responsive
   ============================================ */

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

:root {
    --primary: #F2C12E;
    --primary-dark: #D4A420;
    --primary-glow: rgba(242, 193, 46, 0.5);
    --secondary: #4A555C;
    --secondary-light: #6B7A83;
    --danger: #E74C3C;
    --danger-glow: rgba(231, 76, 60, 0.5);
    --success: #2ECC71;
    --success-glow: rgba(46, 204, 113, 0.5);
    --bg-dark: #0a0a0f;
    --bg-card: rgba(20, 20, 30, 0.85);
    --text-light: #f0f0f0;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

html, body {
    width: 100%; height: 100%;
    overflow: hidden;
    background: var(--bg-dark);
    color: var(--text-light);
    font-family: 'Rajdhani', sans-serif;
}

body {
    display: flex; justify-content: center; align-items: center; text-align: center;
    -webkit-user-select: none; user-select: none;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(242,193,46,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(74,85,92,0.1) 0%, transparent 50%),
        linear-gradient(180deg, #0a0a0f 0%, #151520 100%);
}

/* --- BG PARTICLES --- */
.bg-particles { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; z-index: 0; }
.bg-particles::before {
    content: ''; position: absolute; width: 300px; height: 300px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    top: 10%; left: 10%; animation: float 15s ease-in-out infinite; opacity: 0.3;
}
.bg-particles::after {
    content: ''; position: absolute; width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(74,85,92,0.3) 0%, transparent 70%);
    bottom: 10%; right: 10%; animation: float 20s ease-in-out infinite reverse; opacity: 0.3;
}
@keyframes float {
    0%, 100% { transform: translate(0,0) scale(1); }
    25% { transform: translate(30px,-30px) scale(1.1); }
    50% { transform: translate(-20px,20px) scale(0.9); }
    75% { transform: translate(20px,10px) scale(1.05); }
}

/* --- MAIN WRAPPER --- */
.main-wrapper {
    position: relative; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    width: 95%; height: 95%; padding: 10px; z-index: 1;
}

h1 {
    font-family: 'Orbitron', sans-serif; font-weight: 900; color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow), 0 0 30px var(--primary-glow), 2px 2px 0 var(--secondary);
    margin-bottom: 15px; font-size: clamp(22px, 4vw, 38px); letter-spacing: 3px;
    animation: titlePulse 3s ease-in-out infinite;
}
@keyframes titlePulse {
    0%, 100% { text-shadow: 0 0 10px var(--primary-glow), 0 0 30px var(--primary-glow), 2px 2px 0 var(--secondary); }
    50% { text-shadow: 0 0 20px var(--primary-glow), 0 0 50px var(--primary-glow), 2px 2px 0 var(--secondary); }
}

/* --- GAME CONTAINER --- */
#gameContainer {
    position: relative;
    background: linear-gradient(145deg, #0d0d15 0%, #1a1a2e 100%);
    border: 2px solid var(--glass-border); border-radius: 20px;
    aspect-ratio: 800 / 600; width: 90%; max-width: 90%; max-height: 100%;
    display: flex; justify-content: center; align-items: center;
    box-shadow: 0 0 40px rgba(0,0,0,0.5), 0 0 80px rgba(242,193,46,0.1), inset 0 0 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

canvas { width: 100%; height: 100%; display: none; border-radius: 18px; }

/* --- FULLSCREEN MODE --- */
:fullscreen .main-wrapper,
:-webkit-full-screen .main-wrapper {
    width: 100%; height: 100%; padding: 0;
}
:fullscreen #gameContainer,
:-webkit-full-screen #gameContainer {
    width: 100%; max-width: 100%; max-height: 100%;
    border-radius: 0; border: none;
}
:fullscreen canvas,
:-webkit-full-screen canvas {
    border-radius: 0;
}
:fullscreen h1,
:-webkit-full-screen h1 { display: none; }

/* --- SCREENS --- */
#startScreen, #highscoresScreen {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(ellipse at center, rgba(26,26,46,0.98) 0%, rgba(10,10,15,0.99) 100%);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    gap: clamp(8px, 2vh, 18px); z-index: 10; padding: 20px;
    border-radius: 18px; animation: fadeIn 0.5s ease-out;
}
@keyframes fadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

#logo { width: 18%; max-width: 100px; filter: drop-shadow(0 0 20px var(--primary-glow)); animation: logoPulse 2s ease-in-out infinite; }
@keyframes logoPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 20px var(--primary-glow)); }
    50% { transform: scale(1.05); filter: drop-shadow(0 0 30px var(--primary-glow)); }
}

h2 { font-family: 'Orbitron', sans-serif; font-size: clamp(18px, 3vh, 26px); color: var(--text-light); text-shadow: 0 0 10px rgba(255,255,255,0.3); }
.subtitle { color: #ccc; font-style: italic; font-size: clamp(15px, 2.5vh, 20px); opacity: 0.9; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }

/* --- INPUT --- */
#playerNameInput {
    padding: 14px 20px; border: 2px solid var(--primary); border-radius: 12px;
    background: var(--bg-card); color: var(--text-light); font-family: 'Rajdhani', sans-serif;
    font-size: clamp(16px, 2.5vh, 20px); font-weight: 500; text-align: center;
    width: 65%; max-width: 320px; box-shadow: 0 0 15px rgba(242,193,46,0.2); transition: all 0.3s ease;
}
#playerNameInput:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 25px var(--primary-glow); background: rgba(30,30,45,0.9); }
#playerNameInput::placeholder { color: rgba(255,255,255,0.4); }
.button-container { display: flex; gap: 12px; width: 100%; justify-content: center; flex-wrap: wrap; align-items: center; }
#startButton { animation: btnBlink 1.5s ease-in-out 3s infinite; }
#contactButton { animation: btnBlink 1.5s ease-in-out 2s infinite; }

/* --- BUTTONS --- */
.game-btn {
    padding: 14px 28px; font-family: 'Orbitron', sans-serif; font-size: clamp(14px, 2.5vh, 18px); font-weight: 700;
    border: none; border-radius: 12px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; letter-spacing: 1px; text-decoration: none;
}
.game-btn::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); transition: left 0.5s ease; }
.game-btn:hover::before { left: 100%; }
.btn-primary { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: #1a1a2e; box-shadow: 0 4px 15px rgba(242,193,46,0.4), inset 0 1px 0 rgba(255,255,255,0.3); }
.btn-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 8px 25px rgba(242,193,46,0.5); }
.btn-secondary { background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%); color: var(--text-light); box-shadow: 0 4px 15px rgba(74,85,92,0.4); }
.btn-secondary:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 8px 25px rgba(74,85,92,0.5); }
.btn-danger { background: linear-gradient(135deg, var(--danger) 0%, #c0392b 100%); color: var(--text-light); box-shadow: 0 4px 15px rgba(231,76,60,0.4); }
.btn-danger:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 8px 25px rgba(231,76,60,0.5); }

/* --- CONTROLS INFO --- */
.controls-info {
    padding: 10px 20px; background: var(--glass); border: 1px solid var(--glass-border);
    border-radius: 15px; font-size: clamp(10px, 1.5vh, 13px); backdrop-filter: blur(10px); line-height: 1.6;
}
.controls-info p { margin: 2px 0; opacity: 0.9; }
.controls-info strong { color: var(--primary); }

.copyright { position: absolute; bottom: 15px; width: 100%; text-align: center; font-size: clamp(10px, 1.5vh, 12px); color: rgba(255,255,255,0.4); z-index: 25; letter-spacing: 1px; }

/* --- HIGHSCORES --- */
#highscoresScreen { z-index: 15; }
#highscoresList {
    font-size: clamp(14px, 2.5vh, 18px); max-height: 45%; overflow-y: auto; text-align: left;
    padding: 20px; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 15px;
    width: 80%; max-width: 400px; backdrop-filter: blur(10px);
}
#highscoresList::-webkit-scrollbar { width: 8px; }
#highscoresList::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 4px; }
#highscoresList::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }
.highscore-entry { margin: 12px 0; padding: 10px 15px; background: rgba(255,255,255,0.03); border-radius: 10px; border-left: 3px solid var(--primary); transition: all 0.3s ease; }
.highscore-entry:hover { background: rgba(255,255,255,0.08); transform: translateX(5px); }
.highscore-rank { font-family: 'Orbitron', sans-serif; font-weight: bold; color: var(--primary); }
.highscore-avatar { font-style: italic; color: rgba(255,255,255,0.6); font-size: 0.85em; display: block; margin-top: 4px; }
.season-banner {
    margin: 0 0 14px 0; padding: 10px 14px; border-radius: 10px;
    background: linear-gradient(135deg, rgba(242,193,46,0.15), rgba(242,193,46,0.05));
    border: 1px solid rgba(242,193,46,0.4); text-align: center;
}
.season-title { font-family: 'Orbitron', sans-serif; color: var(--primary); font-size: 0.95em; margin-bottom: 4px; }
.season-reset { color: #fff; font-size: 0.85em; margin-bottom: 4px; }
.season-note { color: rgba(255,255,255,0.55); font-size: 0.75em; font-style: italic; }

/* --- END GAME --- */
#endGameButtons {
    position: absolute; top: 30px; left: 50%; transform: translateX(-50%);
    display: none; flex-direction: column; align-items: center; gap: 15px; z-index: 20;
    animation: slideDown 0.5s ease-out;
}
@keyframes slideDown { from { opacity: 0; transform: translateX(-50%) translateY(-20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
#contact-prompt { color: var(--primary); font-style: italic; font-size: clamp(14px, 2.5vh, 18px); text-shadow: 0 2px 10px rgba(0,0,0,0.8); }

/* --- PAUSE OVERLAY --- */
#pauseOverlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.75); display: none; flex-direction: column;
    justify-content: center; align-items: center; gap: 20px; z-index: 50;
    border-radius: 18px; backdrop-filter: blur(5px);
}
#pauseOverlay.active { display: flex; }
#pauseOverlay h2 { font-family: 'Orbitron', sans-serif; font-size: clamp(24px, 4vh, 36px); color: var(--primary); text-shadow: 0 0 20px var(--primary-glow); }
.pause-resume-btn {
    padding: 10px 30px; font-size: 16px; cursor: pointer;
    display: none; /* only show on touch devices */
}
@media (hover: none) and (pointer: coarse) {
    .pause-resume-btn { display: inline-block; }
}
/* === Boss Swap Overlay === */
#bossSwapOverlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); display: none; flex-direction: column;
    justify-content: center; align-items: center; gap: 12px; z-index: 55;
    border-radius: 18px; backdrop-filter: blur(8px);
}
#bossSwapOverlay.active { display: flex; }
#bossSwapOverlay h2 {
    font-family: 'Orbitron', sans-serif; font-size: clamp(18px, 3vh, 28px);
    color: var(--primary); text-shadow: 0 0 20px var(--primary-glow);
}
.swap-question {
    color: #fff; font-size: clamp(12px, 2vh, 16px); text-align: center;
    font-family: 'Rajdhani', sans-serif;
}
.swap-question strong { color: var(--primary); }
.swap-advantages {
    background: rgba(255,255,255,0.05); border-radius: 10px; padding: 8px 16px;
    border: 1px solid rgba(46,204,113,0.3);
}
.swap-advantages p {
    color: #2ecc71; font-family: 'Orbitron', sans-serif;
    font-size: clamp(10px, 1.5vh, 13px); font-weight: 700; margin-bottom: 4px;
}
.swap-advantages ul { list-style: none; padding: 0; margin: 0; }
.swap-advantages li {
    color: #fff; font-family: 'Rajdhani', sans-serif;
    font-size: clamp(11px, 1.8vh, 14px); padding: 2px 0;
}
.swap-advantages li::before { content: '✅ '; }
.swap-preview { margin: 5px 0; }
.swap-andreia-img {
    height: clamp(50px, 10vh, 90px);
    filter: drop-shadow(0 0 15px rgba(242,193,46,0.5));
    animation: personBreathe 3s ease-in-out infinite;
}
.swap-buttons { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.pause-info { color: rgba(255,255,255,0.7); font-size: clamp(13px, 2vh, 16px); }
.pause-info strong { color: var(--primary); }

.pause-controls { max-width: 480px; width: 90%; }
.pause-keys-grid { display: flex; flex-direction: column; gap: 6px; }
.key-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.key-item { display: flex; align-items: center; gap: 8px; padding: 5px 10px; background: rgba(255,255,255,0.05); border-radius: 8px; min-width: 180px; }
.key-cap {
    font-family: 'Orbitron', sans-serif; font-size: clamp(10px, 1.5vh, 13px); font-weight: 700;
    color: var(--primary); background: rgba(242,193,46,0.1); border: 1px solid rgba(242,193,46,0.3);
    padding: 3px 8px; border-radius: 5px; min-width: 45px; text-align: center;
}
.key-desc { font-size: clamp(10px, 1.5vh, 13px); color: rgba(255,255,255,0.7); }

/* --- MOBILE CONTROLS --- */
#mobileControls {
    position: absolute; bottom: 0; left: 0; right: 0; width: 100%; height: 130px;
    display: none; justify-content: space-between; align-items: center;
    padding: 15px 20px; z-index: 30; pointer-events: none;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
}
#mobileControls * { pointer-events: auto; }
#mobileControls.active { display: flex; }

/* Force hide mobile controls on desktop */
@media (hover: hover) and (pointer: fine) {
    #mobileControls, #mobileControls.active { display: none !important; }
}

/* Joystick cross layout */
.mobile-joystick {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.joy-mid-row { display: flex; gap: 2px; align-items: center; }
.joy-center {
    width: 20px; height: 20px; border-radius: 50%;
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
}
.joy-btn {
    width: 52px; height: 52px; border-radius: 14px;
    background: linear-gradient(145deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.08) 100%);
    border: 2px solid rgba(255,255,255,0.4); color: white;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(10px); box-shadow: 0 4px 15px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
    transition: all 0.08s ease; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.joy-btn svg { width: 32px; height: 32px; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.4)); }
.joy-btn:active, .joy-btn.pressed { transform: scale(0.9); background: linear-gradient(145deg, rgba(242,193,46,0.6) 0%, rgba(242,193,46,0.25) 100%); border-color: var(--primary); box-shadow: 0 0 20px rgba(242,193,46,0.5); }
.joy-up { border-radius: 14px 14px 6px 6px; }
.joy-down { border-radius: 6px 6px 14px 14px; }
.joy-left { border-radius: 14px 6px 6px 14px; }
.joy-right { border-radius: 6px 14px 14px 6px; }

.mobile-actions { display: flex; gap: 12px; align-items: center; }

.jump-btn {
    width: 105px; height: 105px; border-radius: 50%;
    background: linear-gradient(145deg, rgba(242,193,46,0.45) 0%, rgba(242,193,46,0.15) 100%);
    border: 3px solid var(--primary); color: white;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    backdrop-filter: blur(10px); box-shadow: 0 0 30px rgba(242,193,46,0.35), 0 4px 15px rgba(0,0,0,0.4);
    transition: all 0.08s ease; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.jump-btn svg { width: 38px; height: 38px; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.4)); }
.jump-btn span { font-family: 'Orbitron', sans-serif; font-size: 10px; font-weight: bold; letter-spacing: 1px; }
.jump-btn:active, .jump-btn.pressed { transform: scale(0.9); background: linear-gradient(145deg, rgba(242,193,46,0.75) 0%, rgba(242,193,46,0.4) 100%); box-shadow: 0 0 40px rgba(242,193,46,0.6); }

.shoot-btn {
    width: 60px; height: 60px; border-radius: 15px;
    background: linear-gradient(145deg, rgba(46,204,113,0.5) 0%, rgba(46,204,113,0.2) 100%);
    border: 2px solid #2ecc71; color: white;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    backdrop-filter: blur(10px); box-shadow: 0 0 20px rgba(46,204,113,0.3), 0 4px 15px rgba(0,0,0,0.4);
    transition: all 0.08s ease; -webkit-tap-highlight-color: transparent; touch-action: manipulation; font-size: 20px;
}
.shoot-btn .ammo-count { font-family: 'Orbitron', sans-serif; font-size: 12px; font-weight: bold; color: #2ecc71; }
.shoot-btn:active, .shoot-btn.pressed { transform: scale(0.9); background: linear-gradient(145deg, rgba(46,204,113,0.8) 0%, rgba(46,204,113,0.4) 100%); box-shadow: 0 0 30px rgba(46,204,113,0.6); }
.shoot-btn.no-ammo { opacity: 0.5; border-color: #666; background: linear-gradient(145deg, rgba(100,100,100,0.3) 0%, rgba(100,100,100,0.1) 100%); }
.shoot-btn.no-ammo .ammo-count { color: #666; }

.help-btn {
    width: 55px; height: 55px; border-radius: 14px;
    background: linear-gradient(145deg, rgba(241,196,15,0.5) 0%, rgba(241,196,15,0.2) 100%);
    border: 2px solid #F1C40F; color: white;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    backdrop-filter: blur(10px); box-shadow: 0 0 20px rgba(241,196,15,0.3), 0 4px 15px rgba(0,0,0,0.4);
    transition: all 0.08s ease; -webkit-tap-highlight-color: transparent; touch-action: manipulation; font-size: 18px;
}
.help-btn .help-label { font-family: 'Orbitron', sans-serif; font-size: 8px; font-weight: bold; letter-spacing: 0.5px; }
.help-btn:active, .help-btn.pressed { transform: scale(0.9); background: linear-gradient(145deg, rgba(241,196,15,0.8) 0%, rgba(241,196,15,0.4) 100%); box-shadow: 0 0 30px rgba(241,196,15,0.6); }

.secret-btn {
    width: 55px; height: 55px; border-radius: 14px;
    background: linear-gradient(145deg, rgba(155,89,182,0.5) 0%, rgba(155,89,182,0.2) 100%);
    border: 2px solid #9B59B6; color: white;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    backdrop-filter: blur(10px); box-shadow: 0 0 20px rgba(155,89,182,0.3), 0 4px 15px rgba(0,0,0,0.4);
    transition: all 0.08s ease; -webkit-tap-highlight-color: transparent; touch-action: manipulation; font-size: 18px;
}
.secret-btn .secret-label { font-family: 'Orbitron', sans-serif; font-size: 8px; font-weight: bold; letter-spacing: 0.5px; }
.secret-btn:active, .secret-btn.pressed { transform: scale(0.9); background: linear-gradient(145deg, rgba(155,89,182,0.8) 0%, rgba(155,89,182,0.4) 100%); box-shadow: 0 0 30px rgba(155,89,182,0.6); }

.pause-btn {
    width: 50px; height: 50px; border-radius: 12px;
    background: linear-gradient(145deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.05) 100%);
    border: 2px solid rgba(255,255,255,0.3); color: white;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(10px); font-size: 22px;
    -webkit-tap-highlight-color: transparent; touch-action: manipulation;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4); transition: all 0.08s ease;
}
.pause-btn:active, .pause-btn.pressed { transform: scale(0.9); background: rgba(255,255,255,0.15); }

/* --- ORIENTATION WARNING --- */
#orientation-warning {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
    color: var(--text-light); display: none; justify-content: center; align-items: center;
    z-index: 100; text-align: center;
}
.warning-content { display: flex; flex-direction: column; align-items: center; gap: 25px; padding: 30px; }
.warning-content svg { width: 100px; height: 100px; color: var(--primary); filter: drop-shadow(0 0 20px var(--primary-glow)); animation: rotatePhone 3s ease-in-out infinite; }
@keyframes rotatePhone { 0%, 100% { transform: rotate(-30deg); } 50% { transform: rotate(30deg); } }
.warning-content p { font-size: 22px; max-width: 80%; font-family: 'Orbitron', sans-serif; }

/* --- LOADING --- */
#loadingMessage { font-family: 'Orbitron', sans-serif; font-size: clamp(16px, 3vh, 20px); color: var(--primary); animation: loadingPulse 1.5s ease-in-out infinite; }
@keyframes loadingPulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
.loading-bar { width: 60%; max-width: 300px; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; margin-top: 15px; }
.loading-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-dark)); border-radius: 3px; width: 0%; animation: loadingProgress 2s ease-out forwards; }
@keyframes loadingProgress { to { width: 100%; } }

/* --- ANIMATIONS --- */
@keyframes shake { 0%, 100% { transform: translateX(0); } 10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); } 20%, 40%, 60%, 80% { transform: translateX(5px); } }
.shake { animation: shake 0.5s ease-in-out; }

/* ============================================
   INTRO OFFICE SCENE
   ============================================ */
#introScreen {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(ellipse at center, rgba(26,26,46,0.98) 0%, rgba(10,10,15,0.99) 100%);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    gap: 10px; z-index: 12; padding: 20px; border-radius: 18px; animation: fadeIn 0.8s ease-out;
}
.intro-office { display: flex; flex-direction: column; align-items: center; gap: 15px; width: 90%; max-width: 600px; }

.office-scene {
    position: relative; width: 100%; height: clamp(225px, 44vh, 425px);
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 60%, #2c3e50 100%);
    border-radius: 15px; border: 2px solid var(--glass-border); overflow: hidden;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.5);
}

/* Video as FULL BACKGROUND of the entire intro screen */
.intro-bg-video {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; border-radius: 18px; z-index: 0;
}
/* Dark overlay on top of video so content is readable */
.intro-bg-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5, 5, 15, 0.55);
    border-radius: 18px; z-index: 1;
}
/* All intro content sits above the video */
.intro-office { z-index: 2; position: relative; }

/* Wall */
.office-scene::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 75%;
    background: linear-gradient(180deg, #1e2a3a 0%, #1a2535 100%);
    z-index: 0;
}
/* Floor */
.office-scene::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 25%;
    background: linear-gradient(180deg, #4a3f35 0%, #3d3429 50%, #352e25 100%);
    border-top: 2px solid rgba(255,255,255,0.08); z-index: 0;
}

/* === WINDOW with sky, sun, clouds, light rays === */
.office-window {
    position: absolute; top: 5%; left: 3%; width: 22%; height: 50%; z-index: 1;
}
.window-frame {
    width: 100%; height: 100%;
    border: 3px solid #8B7D6B; border-radius: 3px;
    overflow: hidden; position: relative;
    box-shadow: 0 0 10px rgba(0,0,0,0.4), inset 0 0 5px rgba(0,0,0,0.2);
}
.window-sky {
    width: 100%; height: 100%;
    background: linear-gradient(180deg, #4A90D9 0%, #87CEEB 60%, #B0E0FF 100%);
    position: relative;
}
.window-sun {
    position: absolute; top: 12%; right: 15%;
    width: 22%; aspect-ratio: 1; border-radius: 50%;
    background: radial-gradient(circle, #FFF7A0 0%, #FFD700 50%, #FFA500 100%);
    box-shadow: 0 0 15px #FFD700, 0 0 30px rgba(255,215,0,0.4);
    animation: sunPulse 4s ease-in-out infinite;
}
@keyframes sunPulse { 0%,100% { box-shadow: 0 0 15px #FFD700, 0 0 30px rgba(255,215,0,0.4); } 50% { box-shadow: 0 0 25px #FFD700, 0 0 50px rgba(255,215,0,0.5); } }
.window-cloud {
    position: absolute; background: rgba(255,255,255,0.8); border-radius: 10px; height: 18%;
}
.window-cloud.c1 { width: 35%; top: 30%; left: -10%; animation: cloudDrift 12s linear infinite; }
.window-cloud.c2 { width: 25%; top: 50%; left: 40%; animation: cloudDrift 18s linear infinite reverse; opacity: 0.6; }
@keyframes cloudDrift { from { transform: translateX(-20px); } to { transform: translateX(80px); } }
.window-divider-h { position: absolute; top: 50%; left: 0; width: 100%; height: 3px; background: #8B7D6B; z-index: 1; }
.window-divider-v { position: absolute; top: 0; left: 50%; width: 3px; height: 100%; background: #8B7D6B; z-index: 1; }

/* Sun rays entering the room */
.sun-rays {
    position: absolute; top: 0; left: 100%; width: 250%; height: 120%;
    background: linear-gradient(120deg,
        rgba(255,215,0,0.12) 0%, rgba(255,215,0,0.05) 30%,
        transparent 60%);
    z-index: 1; pointer-events: none;
    animation: raysPulse 5s ease-in-out infinite;
}
@keyframes raysPulse { 0%,100% { opacity: 0.6; } 50% { opacity: 1; } }

/* === DOOR (right side) - Nuno enters from here === */
.office-door {
    position: absolute; top: 8%; right: 2%; width: 12%; height: 67%; z-index: 1;
}
.door-exit-sign {
    position: absolute; top: -8%; left: 50%; transform: translateX(-50%);
    background: #2ecc71; color: #fff;
    font-family: 'Orbitron', sans-serif; font-size: clamp(4px, 0.7vw, 8px);
    font-weight: 900; padding: 1px 6px; border-radius: 2px;
    letter-spacing: 1px; z-index: 2;
    box-shadow: 0 0 8px rgba(46,204,113,0.5), 0 1px 3px rgba(0,0,0,0.4);
    text-shadow: 0 0 4px rgba(46,204,113,0.8);
}
.door-frame {
    width: 100%; height: 100%;
    border: 3px solid #6D5D4B; border-bottom: none;
    border-radius: 3px 3px 0 0; background: #4a3f35;
}
.door-panel {
    width: 85%; height: 95%; margin: 3% auto 0;
    background: linear-gradient(180deg, #7B6B5A 0%, #6B5B4A 100%);
    border-radius: 2px; border: 1px solid #5D4E3E;
    position: relative;
}
/* Peephole - see the street outside */
.door-peephole {
    position: absolute; top: 22%; left: 50%; transform: translateX(-50%);
    width: clamp(6px, 1vw, 11px); aspect-ratio: 1; border-radius: 50%;
    background: #333; border: 1px solid #555;
    overflow: hidden; box-shadow: inset 0 0 3px rgba(0,0,0,0.8);
}
.peephole-view {
    width: 100%; height: 100%; border-radius: 50%;
    background: radial-gradient(circle,
        #87CEEB 0%, #87CEEB 30%,
        #5a9e5a 40%, #4a8a4a 50%,
        #888 55%, #777 65%,
        rgba(0,0,0,0.6) 85%, rgba(0,0,0,0.9) 100%
    );
}
/* Mail slot at bottom of door */
.door-mailslot {
    position: absolute; bottom: 12%; left: 50%; transform: translateX(-50%);
    width: 55%; height: clamp(4px, 0.7vh, 7px);
    background: #333; border-radius: 1px;
    border: 1px solid #555;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.6);
    overflow: visible;
}
.mailslot-flap {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, #8B7B6A 0%, #7B6B5A 100%);
    border-radius: 1px; border: 1px solid #6D5D4B;
    transform-origin: top center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.mailslot-letter {
    position: absolute; top: -40%; left: 25%;
    width: 50%; height: 80%;
    background: #f5f0e0; border: 1px solid #ddd;
    border-radius: 1px;
    transform: rotate(-5deg);
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    animation: letterPeek 4s ease-in-out infinite;
}
.mailslot-letter::after {
    content: ''; position: absolute; top: 30%; left: 15%; width: 70%; height: 1px;
    background: #ccc;
    box-shadow: 0 3px 0 #ccc, 0 6px 0 #ccc;
}
@keyframes letterPeek {
    0%, 100% { transform: rotate(-5deg) translateY(0); }
    50% { transform: rotate(-3deg) translateY(-2px); }
}

.door-handle {
    position: absolute; right: 10%; top: 48%;
    width: 12%; aspect-ratio: 1; border-radius: 50%;
    background: radial-gradient(circle, #D4A420 0%, #B8860B 100%);
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* === CABINET AREA (Kallax + vase) === */
.office-cabinet-area {
    position: absolute; bottom: 25%; left: 3%; width: 22%;
    display: flex; flex-direction: column; align-items: center;
    z-index: 1;
}
.office-cabinet { position: relative; width: 100%; }

/* Kallax-style white grid shelf (IKEA colmeia) */
.kallax-shelf {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 2px; padding: 3px;
    background: #f0ece4;
    border: 2px solid #e0dcd4; border-radius: 2px;
    box-shadow: 2px 3px 8px rgba(0,0,0,0.4), inset 0 0 3px rgba(0,0,0,0.1);
}
.kallax-cell {
    display: flex; gap: 2px; padding: 2px 3px;
    background: #f8f5ef;
    border: 1px solid #e8e4dc;
    align-items: flex-end; justify-content: center;
    min-height: clamp(14px, 2.8vh, 26px);
}
/* Right Kallax: 5 columns x 4 rows */
.kallax-right {
    grid-template-columns: repeat(5, 1fr);
}
/* Each dossier: black box with white spine - like real archive folders (ambar Classic style) */
.archive-dossier {
    flex: 1; height: 92%; position: relative;
    background: linear-gradient(90deg, #111 0%, #222 10%, #1a1a1a 20%, #252525 40%, #1a1a1a 60%, #222 80%, #181818 100%);
    border-radius: 1px 2px 0 0;
    border-top: 1px solid #3a3a3a;
    box-shadow: inset 0 -2px 3px rgba(0,0,0,0.5), 1px 0 1px rgba(0,0,0,0.4), inset 1px 0 0 rgba(255,255,255,0.05);
    min-width: 0;
}
/* Textured look on dossier body */
.archive-dossier::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-linear-gradient(0deg, transparent 0px, transparent 2px, rgba(0,0,0,0.1) 2px, rgba(0,0,0,0.1) 3px);
    opacity: 0.4; pointer-events: none;
}
/* White spine on front - taller and more visible */
.dossier-spine {
    position: absolute; top: 8%; left: 50%; transform: translateX(-50%);
    width: 65%; height: 60%;
    background: linear-gradient(180deg, #fff 0%, #f5f5f0 30%, #eee 70%, #e0e0d8 100%);
    border: 1px solid #bbb; border-radius: 1px;
    box-shadow: 0 0 2px rgba(0,0,0,0.15);
}
/* Label lines on spine (simulates ruled lines) */
.dossier-spine::after {
    content: ''; position: absolute; top: 55%; left: 15%; width: 70%; height: 30%;
    background: repeating-linear-gradient(0deg, transparent 0px, transparent 2px, #ccc 2px, #ccc 3px);
    opacity: 0.5;
}
/* Label text on spine - hidden */
.dossier-label {
    display: none;
}
/* Bottom hole on dossier (like real archive folders) */
.archive-dossier::after {
    content: ''; position: absolute; bottom: 8%; left: 50%; transform: translateX(-50%);
    width: 22%; aspect-ratio: 1; border-radius: 50%;
    background: #0a0a0a; border: 1px solid #333;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.8);
}
/* cabinet-label removed - no longer used */

/* Vase with flowers on top of cabinet */
.cabinet-vase {
    position: relative; width: 30%; height: clamp(20px, 4vh, 40px);
    margin-bottom: -2px; z-index: 2;
}
.vase-body {
    position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 60%; height: 55%;
    background: linear-gradient(180deg, #8B4513 0%, #6B3410 100%);
    border-radius: 2px 2px 4px 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.vase-flower {
    position: absolute; width: 20%; aspect-ratio: 1; border-radius: 50%;
    box-shadow: 0 0 3px rgba(0,0,0,0.2);
}
.vase-flower.f1 { background: #E74C3C; bottom: 50%; left: 30%; }
.vase-flower.f2 { background: #F39C12; bottom: 60%; left: 50%; }
.vase-flower.f3 { background: #E91E63; bottom: 50%; left: 65%; }
.vase-leaf {
    position: absolute; width: 15%; height: 35%;
    background: #27ae60; border-radius: 50%;
}
.vase-leaf.l1 { bottom: 40%; left: 20%; transform: rotate(-20deg); }
.vase-leaf.l2 { bottom: 40%; right: 15%; transform: rotate(20deg); }

/* Second cabinet near door (5x4) */
/* APECA associate frame above right cabinet */
.apeca-frame {
    position: absolute; bottom: 68%; right: 26%; width: clamp(28px, 4.5vw, 48px);
    z-index: 1;
}
.apeca-border {
    width: 100%; padding: 2px;
    background: linear-gradient(135deg, #8B6914 0%, #C9A84C 25%, #8B6914 50%, #C9A84C 75%, #8B6914 100%);
    border-radius: 2px;
    box-shadow: 1px 2px 6px rgba(0,0,0,0.5);
}
.apeca-inner {
    background: #f8f6f0; padding: clamp(2px, 0.4vh, 5px) clamp(2px, 0.3vw, 4px);
    display: flex; flex-direction: column; align-items: center; gap: 1px;
    border: 1px solid #d4c9a8;
}
.apeca-logo-img {
    width: 80%; height: auto;
}
.apeca-title {
    font-family: 'Georgia', serif; font-style: italic;
    font-size: clamp(2.5px, 0.4vw, 5px); color: #1a3a6e;
    font-weight: 700;
}
.apeca-name {
    font-family: 'Rajdhani', sans-serif; font-size: clamp(2px, 0.35vw, 4px);
    font-weight: 700; color: #1a1a1a; text-align: center;
}

.cabinet-right {
    position: absolute; bottom: 25%; right: 14%; width: 20%;
    z-index: 1;
}

/* Door play button */
.door-play-btn {
    position: absolute; top: 5%; left: 50%; transform: translateX(-50%);
    display: none;
    padding: 3px 10px; font-family: 'Orbitron', sans-serif;
    font-size: clamp(7px, 1.2vh, 11px); font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #1a1a2e; border: none; border-radius: 6px; cursor: pointer;
    box-shadow: 0 2px 8px rgba(242,193,46,0.4);
    transition: all 0.3s ease; z-index: 5;
    animation: btnBlink 1.5s ease-in-out 4s infinite;
}
.door-play-btn:hover {
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(242,193,46,0.6);
}

/* === WALL ITEMS: Logo centered, QR above right cabinet === */
.office-wall-items {
    position: absolute; top: 18%; left: 50%; transform: translateX(-50%);
    z-index: 1;
}
.office-logo-wall { position: relative; }
.wall-logo { height: clamp(22px, 4.5vh, 45px); filter: drop-shadow(0 0 15px var(--primary-glow)); animation: logoPulse 2s ease-in-out infinite; }

/* === CC Certificates on wall === */
.wall-certificates {
    position: absolute; top: 12%; left: 26%;
    display: flex; flex-direction: column; gap: clamp(6px, 1.5vh, 12px);
    z-index: 1;
}
.cc-certificate {
    display: flex; width: clamp(33px, 5.3vw, 56px); height: clamp(36px, 6.2vh, 58px);
    background: #f8f6f0; border-radius: 2px;
    box-shadow: 1px 2px 6px rgba(0,0,0,0.4), inset 0 0 1px rgba(0,0,0,0.1);
    overflow: hidden; border: 1px solid #ddd;
}
.cc-sidebar { display: none; }
.cc-occ-seal { display: none; }
.cc-body {
    flex: 1; padding: clamp(2px, 0.3vw, 4px);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 0;
}
.cc-title {
    font-family: 'Georgia', serif; font-style: italic;
    font-size: clamp(4px, 0.7vw, 8px); color: #2a8c7a;
    font-weight: 700; line-height: 1;
}
.cc-text {
    font-family: 'Rajdhani', sans-serif; font-size: clamp(1.5px, 0.25vw, 3px);
    color: #555; text-align: center; line-height: 1.1;
    display: none; /* too small to read, hide */
}
.cc-name {
    font-family: 'Rajdhani', sans-serif; font-size: clamp(3px, 0.5vw, 6px);
    font-weight: 700; color: #1a1a1a; text-align: center; line-height: 1;
    margin: 1px 0;
}
.cc-role {
    font-family: 'Rajdhani', sans-serif; font-size: clamp(2px, 0.35vw, 4px);
    color: #2a8c7a; font-weight: 700; text-align: center; line-height: 1;
    font-style: italic;
}
.cc-details {
    font-family: 'Rajdhani', sans-serif; font-size: clamp(1.5px, 0.25vw, 3px);
    color: #777; text-align: center; line-height: 1;
}
.cc-stamp {
    width: clamp(8px, 1.3vw, 14px); aspect-ratio: 1; border-radius: 50%;
    border: 1px solid #2a8c7a; margin-top: 1px;
    background: radial-gradient(circle, rgba(42,140,122,0.15) 0%, rgba(42,140,122,0.05) 60%, transparent 100%);
    box-shadow: 0 0 2px rgba(42,140,122,0.3);
}

.office-qrcode {
    position: absolute; right: 16%; top: 16%;
    z-index: 1;
}
.qr-img {
    height: clamp(30px, 6vh, 55px);
    border-radius: 4px; border: 2px solid rgba(242,193,46,0.5);
    box-shadow: 0 0 15px rgba(242,193,46,0.3);
    background: #fff; padding: 2px;
}

/* === DESK with dual monitors, keyboard, mouse === */
.office-desk { position: absolute; bottom: 0; left: 5%; width: 52%; height: 38%; z-index: 2; }
.desk-surface { position: absolute; bottom: 0; left: 0; width: 100%; height: 32%; background: linear-gradient(180deg, #8B6914 0%, #6B4F12 100%); border-radius: 3px 3px 5px 5px; box-shadow: 0 4px 8px rgba(0,0,0,0.4); }
.desk-monitor { position: absolute; bottom: 32%; }
.monitor-left { left: 10%; }
.monitor-right { left: 40%; }
.monitor-screen {
    width: clamp(38px, 6.5vw, 65px); height: clamp(22px, 4vw, 40px);
    background: linear-gradient(135deg, #1a3a5c 0%, #0d2137 100%);
    border: 2px solid #555; border-radius: 3px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 12px rgba(46,204,113,0.2);
}
.monitor-stand { width: 30%; height: 6px; margin: 0 auto; background: #555; border-radius: 0 0 2px 2px; }
.screen-text { font-family: 'Orbitron', monospace; font-size: clamp(5px, 0.9vw, 8px); color: #2ecc71; animation: screenBlink 2s ease-in-out infinite; }
@keyframes screenBlink { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; color: #f39c12; } }

/* Keyboard */
.desk-keyboard {
    position: absolute; bottom: 32%; left: 25%; width: 18%; height: 6%;
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 2px; border: 1px solid #444;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.desk-keyboard::after {
    content: ''; position: absolute; top: 20%; left: 8%; width: 84%; height: 60%;
    background: repeating-linear-gradient(90deg, #444 0px, #444 3px, #333 3px, #333 5px);
    border-radius: 1px; opacity: 0.6;
}
/* Mouse */
.desk-mouse {
    position: absolute; bottom: 32%; left: 48%; width: 4%; height: 6%;
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 40% 40% 45% 45%; border: 1px solid #444;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.desk-mouse::after {
    content: ''; position: absolute; top: 15%; left: 35%; width: 30%; height: 25%;
    background: #555; border-radius: 2px;
}

.desk-papers { position: absolute; bottom: 32%; right: 5%; width: 10%; height: 13%; background: #f0e6d2; border-radius: 1px; transform: rotate(-5deg); box-shadow: 2px 2px 4px rgba(0,0,0,0.3); }

/* Dossier on desk - ambar Classic style, lying flat with perspective */
.desk-dossier {
    position: absolute; bottom: 32%; right: 24%; width: 12%; height: 16%;
    transform: perspective(200px) rotateX(65deg) rotateZ(-8deg);
    transform-origin: bottom center;
    z-index: 1;
}
.desk-dossier-spine {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, #fff 0%, #f5f5f0 40%, #eee 80%, #e0e0d8 100%);
    border: 1px solid #bbb; border-radius: 2px;
    box-shadow: 1px 2px 4px rgba(0,0,0,0.35);
    display: flex; flex-direction: column; align-items: center;
    padding: 6% 10%;
}
.desk-dossier-side {
    position: absolute; top: 0; right: -20%; width: 20%; height: 100%;
    background: linear-gradient(90deg, #111 0%, #222 30%, #1a1a1a 60%, #181818 100%);
    border-radius: 0 2px 2px 0;
    border: 1px solid #333; border-left: none;
    box-shadow: 2px 1px 4px rgba(0,0,0,0.4);
}
/* Textured black side */
.desk-dossier-side::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-linear-gradient(0deg, transparent 0px, transparent 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 3px);
}
.desk-dossier-label-top {
    font-family: 'Rajdhani', sans-serif; font-size: clamp(3px, 0.55vw, 6px);
    font-weight: 700; color: #111; text-align: left; width: 100%;
}
.desk-dossier-label-lines {
    width: 80%; height: 30%; margin: 8% 0;
    background: repeating-linear-gradient(0deg, transparent 0px, transparent 3px, #ccc 3px, #ccc 4px);
    border: 1px solid #ddd;
}
.desk-dossier-label-bottom {
    font-family: 'Rajdhani', sans-serif; font-size: clamp(3px, 0.55vw, 6px);
    font-weight: 700; color: #111; text-align: left; width: 100%;
    margin-top: auto;
}
.desk-dossier-hole {
    position: absolute; bottom: 12%; left: 50%; transform: translateX(-50%);
    width: 18%; aspect-ratio: 1; border-radius: 50%;
    background: #888; border: 1px solid #999;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.4);
}

.desk-coffee { position: absolute; bottom: 32%; right: 18%; width: 5%; height: 9%; background: #8B4513; border-radius: 0 0 3px 3px; border-top: 2px solid #6B3410; }

/* Google Nest Mini on desk */
.desk-nest-mini {
    position: absolute; bottom: 32%; left: 55%; width: 7%; z-index: 1;
}
.nest-body {
    width: 100%; height: clamp(5px, 1vh, 10px);
    background: linear-gradient(180deg, #e8e8e8 0%, #d0d0d0 50%, #bbb 100%);
    border-radius: 50%; border: 1px solid #aaa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.nest-dots {
    position: absolute; top: 30%; left: 50%; transform: translateX(-50%);
    display: flex; gap: 1px;
}
.nest-dot {
    width: clamp(1px, 0.2vw, 2px); height: clamp(1px, 0.2vw, 2px);
    border-radius: 50%; background: #4285F4;
    animation: nestPulse 2s ease-in-out infinite;
}
.nest-dot:nth-child(2) { background: #EA4335; animation-delay: 0.2s; }
.nest-dot:nth-child(3) { background: #FBBC05; animation-delay: 0.4s; }
.nest-dot:nth-child(4) { background: #34A853; animation-delay: 0.6s; }
@keyframes nestPulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

/* Floor lamp (between window and desk) */
.office-lamp {
    position: absolute; bottom: 22%; left: 22%; z-index: 1;
    width: clamp(15px, 2.5vw, 28px);
}
.lamp-shade {
    width: 100%; height: clamp(10px, 1.8vh, 18px);
    background: linear-gradient(180deg, #d4a84b 0%, #b8922e 100%);
    border-radius: 50% 50% 0 0;
    border: 1px solid #a07e28;
    box-shadow: 0 -2px 8px rgba(242,193,46,0.3);
    position: relative; z-index: 2;
}
.lamp-light {
    position: absolute; top: clamp(8px, 1.5vh, 15px); left: 50%; transform: translateX(-50%);
    width: 200%; height: clamp(60px, 12vh, 120px);
    background: radial-gradient(ellipse at top, rgba(242,193,46,0.08) 0%, transparent 70%);
    pointer-events: none; z-index: 0;
}
.lamp-pole {
    width: 2px; height: clamp(35px, 7vh, 70px);
    background: linear-gradient(180deg, #888 0%, #666 100%);
    margin: 0 auto;
}
.lamp-base {
    width: 70%; height: clamp(3px, 0.5vh, 5px);
    background: linear-gradient(180deg, #555 0%, #333 100%);
    border-radius: 50%; margin: 0 auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* CCTV Camera (top right corner) */
.office-cctv {
    position: absolute; top: 3%; right: 5%;
    z-index: 2; width: clamp(18px, 3vw, 32px);
}
.cctv-mount {
    width: clamp(6px, 1vw, 10px); height: clamp(4px, 0.6vh, 6px);
    background: #444; margin: 0 auto;
    border-radius: 1px;
}
.cctv-arm {
    width: 2px; height: clamp(6px, 1vh, 10px);
    background: #555; margin: 0 auto;
    transform: rotate(-15deg); transform-origin: top center;
}
.cctv-body {
    width: 100%; height: clamp(8px, 1.4vh, 14px);
    background: linear-gradient(180deg, #333 0%, #222 50%, #1a1a1a 100%);
    border-radius: 3px 6px 6px 3px;
    border: 1px solid #444;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
    margin-left: -20%;
}
.cctv-lens {
    position: absolute; right: -3px; top: 50%; transform: translateY(-50%);
    width: clamp(4px, 0.7vw, 7px); height: clamp(4px, 0.7vw, 7px);
    background: radial-gradient(circle, #1a1a3a 30%, #111 70%);
    border-radius: 50%; border: 1px solid #555;
    box-shadow: inset 0 0 2px rgba(100,150,255,0.3);
}
.cctv-led {
    position: absolute; left: 3px; top: 25%;
    width: clamp(2px, 0.3vw, 3px); height: clamp(2px, 0.3vw, 3px);
    background: #e74c3c; border-radius: 50%;
    box-shadow: 0 0 4px rgba(231,76,60,0.8);
    animation: cctvBlink 1.5s ease-in-out infinite;
}
@keyframes cctvBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }

/* === TEAM characters === */
/* === Speech bubbles (BD style) === */
.speech-bubble {
    position: absolute; bottom: 105%; left: 50%; transform: translateX(-50%);
    background: #fff; color: #111;
    font-family: 'Rajdhani', sans-serif; font-size: clamp(5px, 0.9vw, 9px);
    font-weight: 700; text-align: center;
    padding: clamp(3px, 0.5vh, 6px) clamp(5px, 0.8vw, 10px);
    border-radius: 12px; border: 2px solid #111;
    white-space: nowrap;
    box-shadow: 2px 2px 0 #111;
    opacity: 0; pointer-events: none;
    z-index: 10;
    transition: opacity 0.3s ease;
}
/* BD tail/triangle pointing down */
.speech-bubble::after {
    content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 10px solid #fff;
    filter: drop-shadow(1px 2px 0 #111);
}
.speech-bubble::before {
    content: ''; position: absolute; bottom: -13px; left: 50%; transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 12px solid #111;
}
.speech-bubble.show { opacity: 1; }

.office-team {
    position: absolute; bottom: 22%; left: 48%; transform: translateX(-50%);
    display: flex; align-items: flex-end; gap: 0; z-index: 3;
}
.team-char { position: relative; }
.team-char img {
    height: clamp(66px, 13.2vh, 120px);
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.6));
}
#introAndreia { animation: personBreathe 3s ease-in-out infinite; z-index: 2; }
#introAndreia img { height: clamp(60px, 12.1vh, 110px); }
/* Rafael slides from left */
#introRafael {
    opacity: 0; transform: translateX(-80px);
    animation: slideInLeft 0.8s ease-out 2s forwards;
    z-index: 1;
}
/* Nuno enters from the door (right) */
#introNuno {
    opacity: 0; transform: translateX(120px);
    animation: slideInRight 1s ease-out 3s forwards;
    z-index: 1;
}
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-80px); } to { opacity: 1; transform: translateX(-5px); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(120px); } to { opacity: 1; transform: translateX(5px); } }
@keyframes personBreathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* Wave goodbye and exit animations */
.wave-exit-left {
    animation: waveExitLeft 1s ease-in forwards !important;
}
.wave-exit-right {
    animation: waveExitRight 1s ease-in forwards !important;
}
@keyframes waveExitLeft {
    0% { transform: translateX(-5px); opacity: 1; }
    15% { transform: translateX(-5px) rotate(-8deg); opacity: 1; }
    30% { transform: translateX(-5px) rotate(8deg); opacity: 1; }
    45% { transform: translateX(-5px) rotate(-8deg); opacity: 1; }
    60% { transform: translateX(-5px) rotate(0deg); opacity: 1; }
    100% { transform: translateX(-200px); opacity: 0; }
}
@keyframes waveExitRight {
    0% { transform: translateX(5px); opacity: 1; }
    15% { transform: translateX(5px) rotate(8deg); opacity: 1; }
    30% { transform: translateX(5px) rotate(-8deg); opacity: 1; }
    45% { transform: translateX(5px) rotate(8deg); opacity: 1; }
    60% { transform: translateX(5px) rotate(0deg); opacity: 1; }
    100% { transform: translateX(200px); opacity: 0; }
}

/* Door opening animation */
.office-door.door-open .door-panel {
    animation: doorSwing 0.8s ease-in-out forwards;
    transform-origin: left center;
}
@keyframes doorSwing {
    0% { transform: perspective(300px) rotateY(0deg); }
    100% { transform: perspective(300px) rotateY(-70deg); opacity: 0.5; }
}

.intro-dialogue { background: var(--bg-card); border: 2px solid var(--primary); border-radius: 12px; padding: 15px 25px; width: 90%; max-width: 500px; min-height: 60px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 20px rgba(242,193,46,0.15); }
.dialogue-text { font-size: clamp(13px, 2vh, 17px); color: var(--text-light); text-align: center; line-height: 1.5; }
.dialogue-text strong { color: var(--primary); }
.intro-next-btn { padding: 10px 30px; font-size: clamp(13px, 2vh, 16px); transition: all 0.3s ease; }
.intro-next-btn.blink {
    animation: btnBlink 1s ease-in-out infinite;
}
@keyframes btnBlink {
    0%, 100% { box-shadow: 0 4px 15px rgba(242,193,46,0.4); }
    50% { box-shadow: 0 0 30px rgba(242,193,46,0.9), 0 0 60px rgba(242,193,46,0.4); transform: scale(1.05); }
}

/* Intro buttons side by side */
.intro-buttons {
    display: flex; gap: 15px; align-items: center; justify-content: center;
}
.skip-intro-btn {
    padding: 10px 20px; font-size: clamp(12px, 1.8vh, 15px);
}

/* ============================================
   CHARACTER SELECT SCREEN
   ============================================ */
#charSelectScreen {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(ellipse at center, rgba(26,26,46,0.98) 0%, rgba(10,10,15,0.99) 100%);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    gap: clamp(10px, 2vh, 18px); z-index: 11; padding: 20px; border-radius: 18px;
    animation: fadeIn 0.5s ease-out;
}
/* Big character previews on left/right sides */
.char-big-preview {
    position: absolute; bottom: 5%; z-index: 0;
    opacity: 0.2; transition: opacity 0.5s ease;
    pointer-events: none;
}
.char-big-preview img {
    height: clamp(180px, 40vh, 380px);
    filter: drop-shadow(0 5px 20px rgba(0,0,0,0.6));
}
.char-big-left { left: 2%; }
.char-big-right { right: 2%; }
.char-big-preview.active {
    opacity: 0.7;
    animation: charBigPulse 2s ease-in-out infinite;
}
@keyframes charBigPulse {
    0%, 100% { filter: drop-shadow(0 5px 20px rgba(242,193,46,0.3)); }
    50% { filter: drop-shadow(0 5px 35px rgba(242,193,46,0.6)); }
}

.char-select-grid { display: flex; gap: 30px; justify-content: center; align-items: center; flex-wrap: wrap; z-index: 2; position: relative; }
.char-option {
    display: flex; flex-direction: column; align-items: center; gap: 10px; cursor: pointer;
    padding: 15px; border: 3px solid var(--glass-border); border-radius: 18px;
    background: var(--glass); transition: all 0.3s ease; min-width: 120px;
}
.char-option:hover { border-color: var(--primary); background: rgba(242,193,46,0.1); transform: translateY(-5px); box-shadow: 0 8px 25px rgba(242,193,46,0.3); }
.char-option.selected { border-color: var(--primary); background: rgba(242,193,46,0.15); box-shadow: 0 0 30px var(--primary-glow); }
.char-preview { width: clamp(70px, 12vh, 120px); height: clamp(85px, 15vh, 145px); display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.05); border-radius: 12px; overflow: hidden; }
.char-preview img { max-width: 90%; max-height: 90%; object-fit: contain; filter: drop-shadow(0 3px 8px rgba(0,0,0,0.5)); }
.char-name { font-family: 'Orbitron', sans-serif; font-size: clamp(12px, 1.8vh, 16px); font-weight: 700; color: var(--text-light); }

/* Power box */
.char-power-box {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 6px 10px; background: rgba(242,193,46,0.08);
    border: 1px solid rgba(242,193,46,0.25); border-radius: 8px;
    max-width: 180px;
}
.char-power-title {
    font-family: 'Orbitron', sans-serif; font-size: clamp(10px, 1.5vh, 14px);
    font-weight: 900; color: var(--primary); letter-spacing: 1px;
    text-shadow: 0 0 8px var(--primary-glow);
}
.char-power-desc {
    font-size: clamp(8px, 1.1vh, 11px); color: rgba(255,255,255,0.7);
    text-align: center; line-height: 1.4;
}
.char-confirm-hint {
    display: none;
    font-size: clamp(8px, 1.1vh, 11px); color: var(--success);
    font-weight: 700; margin-top: 4px;
    animation: btnBlink 1s ease-in-out infinite;
}
.char-helper-info {
    display: flex; align-items: center; gap: 15px;
    padding: 12px 20px; background: var(--glass);
    border: 1px solid var(--glass-border); border-radius: 12px;
    max-width: 500px; z-index: 2; position: relative;
}
.helper-team-sprites {
    display: flex; align-items: flex-end; gap: 2px; flex-shrink: 0;
}
.helper-preview {
    height: clamp(42px, 7.2vh, 66px); width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
/* Andreia 8% shorter (now in the middle) */
.helper-andreia { height: clamp(38px, 6.6vh, 60px); }
.helper-text { display: flex; flex-direction: column; gap: 4px; }
.helper-text p { font-size: clamp(11px, 1.5vh, 14px); color: rgba(255,255,255,0.8); line-height: 1.4; }
.helper-text strong { color: var(--primary); }
.helper-extra {
    font-size: clamp(10px, 1.3vh, 13px); color: var(--primary);
    font-weight: 700; font-style: italic;
}

/* ============================================
   REDESIGNED START SCREEN
   ============================================ */
.start-top { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.start-top #logo { width: clamp(50px, 10vh, 90px); }
.start-top h2 { font-size: clamp(16px, 2.5vh, 24px); margin: 0; }
.start-top .subtitle { font-size: clamp(12px, 1.8vh, 16px); margin: 0; }

.start-enemies { display: flex; align-items: center; justify-content: center; gap: 15px; margin: 5px 0; }
.enemy-card { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.enemy-card img { width: clamp(35px, 7vh, 60px); height: clamp(35px, 7vh, 60px); object-fit: contain; border: 2px solid var(--primary); border-radius: 10px; background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.03)); padding: 5px; box-shadow: 0 0 12px var(--primary-glow); }
.enemy-card span { font-family: 'Orbitron', sans-serif; font-size: clamp(10px, 1.5vh, 14px); font-weight: bold; color: var(--primary); }
.vs-text { font-family: 'Orbitron', sans-serif; font-size: clamp(14px, 2.5vh, 22px); font-weight: 900; color: var(--danger); text-shadow: 0 0 10px var(--danger-glow); }
.start-form { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }
.start-form label { font-family: 'Orbitron', sans-serif; font-size: clamp(12px, 1.8vh, 16px); color: var(--text-light); }

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    .controls-info { display: none; }
    .main-wrapper { width: 100%; height: 100%; padding: 2px; }
    h1 { margin-bottom: 2px; }
    #gameContainer { width: 100%; max-width: 100%; max-height: calc(100% - 5px); border-radius: 12px; border-width: 1px; }
    canvas { max-height: calc(100% - 100px); }
    h1 { font-size: clamp(12px, 2.5vw, 18px); margin-bottom: 3px; letter-spacing: 0.5px; }

    #startScreen { padding: 5px 10px; gap: 3px; }
    #startScreen .subtitle { font-size: 9px; }
    #startScreen #logo { width: 35px; max-width: 35px; }
    #startScreen h2 { font-size: 11px; }
    #startScreen #playerNameInput { padding: 6px 10px; font-size: 12px; width: 50%; max-width: 180px; border-radius: 6px; border-width: 1px; }
    #startScreen .button-container { gap: 8px; flex-wrap: nowrap; }
    #startScreen .game-btn { padding: 6px 12px; font-size: 10px; letter-spacing: 0; border-radius: 6px; }
    #startScreen .copyright { font-size: 7px; bottom: 3px; }
    .start-enemies { gap: 8px; }
    .enemy-card img { width: 30px; height: 30px; padding: 3px; border-width: 1px; }
    .enemy-card span { font-size: 8px; }
    .vs-text { font-size: 12px; }

    #highscoresScreen { padding: 10px; gap: 5px; }
    #highscoresScreen h2 { font-size: 14px; }
    #highscoresList { max-height: 55%; width: 85%; padding: 8px; font-size: 11px; border-radius: 8px; }
    .highscore-entry { margin: 4px 0; padding: 5px 8px; border-radius: 5px; }
    #highscoresScreen .game-btn { padding: 6px 14px; font-size: 10px; }

    #endGameButtons { gap: 6px; top: 10px; }
    #endGameButtons .game-btn { padding: 6px 12px; font-size: 10px; }
    #contact-prompt { font-size: 9px; }

    #mobileControls.active { height: 130px; padding: 8px 15px; }
    .mobile-actions { gap: 8px; }
    .joy-btn { width: 42px; height: 42px; border-radius: 10px; }
    .joy-btn svg { width: 24px; height: 24px; }
    .joy-center { width: 14px; height: 14px; }
    .jump-btn { width: 65px; height: 65px; }
    .jump-btn svg { width: 22px; height: 22px; }
    .jump-btn span { font-size: 6px; }
    .shoot-btn { width: 50px; height: 50px; border-radius: 12px; font-size: 16px; }
    .shoot-btn .ammo-count { font-size: 10px; }
    .help-btn { width: 45px; height: 45px; border-radius: 10px; font-size: 14px; }
    .help-btn .help-label { font-size: 6px; }
    .secret-btn { width: 45px; height: 45px; border-radius: 10px; font-size: 14px; }
    .secret-btn .secret-label { font-size: 6px; }
    .pause-btn { width: 38px; height: 38px; border-radius: 10px; font-size: 16px; }
    canvas { max-height: calc(100% - 130px); }

    /* Intro mobile - hide video bg, show office scene fully */
    .intro-bg-video { display: none !important; }
    .intro-bg-overlay { display: none !important; }
    .office-qrcode { display: none !important; }
    #introScreen { padding: 15px 8px 5px; gap: 3px; overflow-y: auto; justify-content: center; }
    .intro-office { width: 95%; max-width: 100%; gap: 5px; overflow: visible; }
    .office-scene { height: 55vh; flex-shrink: 0; overflow: visible; }
    .intro-dialogue { padding: 6px 12px; min-height: 30px; flex-shrink: 0; }
    .dialogue-text { font-size: clamp(9px, 1.4vh, 12px); }
    .intro-buttons { flex-shrink: 0; gap: 8px; }
    .intro-next-btn { padding: 5px 14px; font-size: 10px; }
    .skip-intro-btn { padding: 5px 14px; font-size: 10px; }
    #introScreen .copyright { position: relative; font-size: 7px; margin-top: 2px; flex-shrink: 0; }

    /* Char select mobile */
    #charSelectScreen { padding: 8px 8px 10px; gap: 4px; overflow-y: auto; justify-content: flex-start; }
    #charSelectScreen h2 { font-size: 13px; }
    #charSelectScreen .subtitle { font-size: 9px; margin-bottom: 2px; }
    .char-select-grid { gap: 10px; }
    .char-option { padding: 6px; min-width: 80px; border-radius: 10px; border-width: 2px; }
    .char-preview { width: 50px; height: 60px; border-radius: 8px; }
    .char-name { font-size: 9px; }
    .char-power-box { padding: 4px 6px; }
    .char-power-title { font-size: 9px; }
    .char-power-desc { font-size: 7px; }
    .char-helper-info { padding: 6px 10px; gap: 8px; max-width: 280px; margin-bottom: 8px; }
    .helper-preview { width: 30px; }
    .helper-andreia { height: clamp(28px, 5vh, 40px); }
    .char-helper-info p { font-size: 8px; line-height: 1.3; }
    .helper-extra { font-size: 7px; }
    /* Ensure copyright doesn't overlap helper info */
    #charSelectScreen .copyright { position: relative; margin-top: auto; font-size: 7px; flex-shrink: 0; }
    /* Hide big character previews on mobile */
    .char-big-preview { display: none !important; }

    /* Very small screens */
    @media (max-height: 350px) {
        h1 { font-size: 10px; margin-bottom: 2px; display: none; }
        #startScreen { gap: 2px; padding: 3px 8px; }
        #startScreen .game-btn { padding: 5px 10px; font-size: 9px; }
        #mobileControls.active { height: 110px; padding: 5px 10px; }
        .joy-btn { width: 34px; height: 34px; border-radius: 8px; }
        .joy-btn svg { width: 18px; height: 18px; }
        .joy-center { width: 10px; height: 10px; }
        .jump-btn { width: 55px; height: 55px; }
        .jump-btn svg { width: 20px; height: 20px; }
        .shoot-btn { width: 40px; height: 40px; font-size: 14px; border-radius: 8px; }
        .help-btn { width: 38px; height: 38px; border-radius: 8px; font-size: 12px; }
        .help-btn .help-label { font-size: 5px; }
        .secret-btn { width: 38px; height: 38px; border-radius: 8px; font-size: 12px; }
        .secret-btn .secret-label { font-size: 5px; }
        .mobile-actions { gap: 5px; }
        canvas { max-height: calc(100% - 110px); }
    }

    @media (orientation: portrait) {
        #orientation-warning { display: flex; }
        .main-wrapper { display: none; }
    }
}

/* --- PLAYERS COUNT BOX --- */
.players-count-box {
    margin: 14px auto 6px;
    padding: 8px 18px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: 0.3px;
    box-shadow: 0 0 18px rgba(242,193,46,0.08);
}
.players-count-box .players-count-value {
    color: var(--primary);
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    margin: 0 2px;
}
