body, html {
margin: 0; padding: 0; width: 100%; height: 100%;
background-color: #050505;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
font-family: 'Press Start 2P', monospace;
overflow: hidden;
touch-action: none;
overscroll-behavior: none;
user-select: none;
-webkit-user-select: none;
}
header { margin-bottom: 20px; display: flex; justify-content: center; align-items: center; width: 100%; z-index: 100; flex-shrink: 0; }
.pulsating-logo { max-width: 90vw; max-height: 80px; height: auto; object-fit: contain; }
#tv-bezel {
position: relative;
width: 95vw; height: auto;
max-width: 1200px;
aspect-ratio: 16 / 9;
background: #000;
border-radius: 3% / 5%;
box-shadow: 0 0 20px #000, inset 0 0 60px rgba(0,0,0,0.9);
overflow: hidden;
flex-shrink: 1;
transition: transform 0.05s ease-out;
display: flex;
}
@media (min-aspect-ratio: 16/9) { #tv-bezel { width: auto; height: calc(100vh - 140px); } }
@media (max-aspect-ratio: 16/9) { #tv-bezel { width: 95vw; height: auto; } }
canvas { display: block; width: 100%; height: 100%; object-fit: contain; }
#crt-glass {
position: absolute; top: 0; left: 0; width: 100%; height: 100%;
pointer-events: none; z-index: 50;
background: radial-gradient(circle at center, transparent 55%, rgba(0,0,0,0.5) 100%);
box-shadow: inset 0 0 50px rgba(0,0,0,0.8);
border: 4px solid #111; border-radius: 3% / 5%;
}
#ui-layer {
position: absolute; top: 0; left: 0; width: 100%; height: 100%;
z-index: 40; pointer-events: none; color: #fff; text-shadow: 3px 3px 0 #000;
box-sizing: border-box; padding: 25px 35px;
}
#health-hud { position: absolute; top: max(25px, env(safe-area-inset-top, 0px)); left: max(35px, env(safe-area-inset-left, 0px)); display: flex; align-items: center; gap: 15px; }
.pixel-heart { width: 30px; height: 30px; background-color: #d11141; clip-path: polygon(50% 100%, 0 40%, 0 0, 40% 0, 50% 20%, 60% 0, 100% 0, 100% 40%); filter: drop-shadow(3px 3px 0px #000); }
.health-bar-bg { width: 280px; height: 26px; background: #000; border: 4px solid #fff; outline: 4px solid #000; box-shadow: 4px 4px 0 #000; position: relative; }
#health-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #cc0000 0%, #ffcc00 50%, #00ff00 100%); transition: width 0.2s ease-out; }
#shield-hud { position: absolute; top: max(65px, env(safe-area-inset-top, 0px) + 40px); left: max(35px, env(safe-area-inset-left, 0px)); display: flex; align-items: center; gap: 10px; opacity: 0; transition: opacity 0.3s; }
#shield-hud.active { opacity: 1; }
.shield-icon { width: 24px; height: 24px; background: #00aaff; clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); filter: drop-shadow(2px 2px 0 #000); animation: shieldPulse 1s infinite; }
@keyframes shieldPulse { 0%,100%{filter:drop-shadow(2px 2px 0 #000) brightness(1);} 50%{filter:drop-shadow(2px 2px 0 #000) brightness(1.5);} }
#shield-timer { font-size: 10px; color: #00aaff; text-shadow: 2px 2px 0 #000; }
#score-display { position: absolute; top: max(25px, env(safe-area-inset-top, 0px)); right: max(35px, env(safe-area-inset-right, 0px)); font-size: 24px; letter-spacing: 1px; }
#level-display { position: absolute; bottom: max(25px, env(safe-area-inset-bottom, 0px)); width: 100%; left: 0; text-align: center; font-size: 20px; letter-spacing: 2px; text-shadow: none; }
#hud-buttons {
position: absolute; bottom: max(16px, env(safe-area-inset-bottom, 0px)); right: max(20px, env(safe-area-inset-right, 0px));
display: flex; gap: 6px; z-index: 100; pointer-events: auto;
}
.hud-btn {
font-family: 'Press Start 2P', monospace; font-size: 14px; color: #fff; background: rgba(0,0,0,0.35);
border: 2px solid rgba(255,255,255,0.5); padding: 6px 8px; cursor: pointer; opacity: 0.6;
text-shadow: 2px 2px 0 #000; transition: opacity 0.2s; min-width: 38px;
}
.hud-btn:hover, .hud-btn:focus-visible { opacity: 1; }
.hud-btn.off { text-decoration: line-through; opacity: 0.35; }
#pause-btn { display: none; }
body.playing #pause-btn { display: inline-block; }
#duck-btn {
position: absolute; left: max(18px, env(safe-area-inset-left, 0px)); bottom: max(18px, env(safe-area-inset-bottom, 0px));
width: 72px; height: 72px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.6);
background: rgba(0,0,0,0.3); color: #fff; font-size: 26px; z-index: 90; pointer-events: auto;
touch-action: none;
}
body.touch.playing #duck-btn { display: block !important; }
#wings-display { font-size: 12px; color: #ffb81c; text-align: right; margin-top: 8px; }
.wing-icon { display: inline-block; width: 14px; height: 10px; background: #e8641b; border-radius: 50%; box-shadow: 6px 0 0 -2px #f5ecd7; vertical-align: middle; margin-right: 4px; }
.sauce-icon { display: inline-block; width: 10px; height: 16px; background: #ff5a1f; border-radius: 3px; border-top: 4px solid #fff; vertical-align: middle; }
#magnet-hud { position: absolute; top: max(100px, env(safe-area-inset-top, 0px) + 75px); left: max(35px, env(safe-area-inset-left, 0px)); font-size: 10px; color: #ff5a1f; display: flex; gap: 8px; align-items: center; }
#combo-hud { position: absolute; top: 33%; left: 50%; transform: translateX(-50%); text-align: center; }
#combo-text { font-size: 22px; color: #ffb81c; text-shadow: 3px 3px 0 #c60c30, 5px 5px 0 #000; }
#combo-text.pop { animation: comboPop 0.25s ease-out; }
@keyframes comboPop { 0% { transform: scale(1.6); } 100% { transform: scale(1); } }
#combo-bar { width: 160px; height: 6px; background: rgba(0,0,0,0.5); margin: 8px auto 0; border: 2px solid #000; }
#combo-fill { height: 100%; width: 100%; background: #ffb81c; }
.creator { display: flex; flex-direction: column; align-items: center; margin-bottom: 14px; }
.creator p { font-size: 10px !important; color: #aaa; margin-bottom: 8px !important; text-shadow: none; letter-spacing: 2px; }
.creator img { max-width: 85%; max-height: 60px; width: auto; height: auto; object-fit: contain; }
.game-title { margin-top: 0; margin-bottom: 10px; }
.menu-panel p.howto { font-size: 10px; line-height: 2; margin-bottom: 10px; text-shadow: 2px 2px 0 #000; }
.menu-panel p.sub-cyan { color: #00ffff; font-size: 10px; margin-bottom: 10px; text-shadow: 2px 2px 0 #000; }
#menu-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 10px; }
.menu-btn { font-size: 10px !important; color: #fff; }
#bank-line { font-size: 10px !important; color: #ffb81c; margin: 10px 0 0 !important; }
.sub-panel { z-index: 70; }
.panel-title { color: #ffb81c; font-size: 22px; margin: 0 0 20px; text-shadow: 3px 3px 0 #c60c30; }
.setting-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; margin: 10px auto; max-width: 420px; gap: 10px; }
.opt-btn { font-size: 11px !important; min-width: 150px; }
.setting-note { font-size: 8px !important; color: #aaa; line-height: 1.8 !important; margin: 16px 0 !important; }
#skin-preview { width: 240px; height: 150px; background: #7ab0e6; border: 3px solid #fff; display: block; margin: 0 auto 12px; image-rendering: auto; }
.skin-selector { display: flex; justify-content: center; align-items: center; gap: 15px; margin-bottom: 10px; }
#skin-name { width: 200px; font-size: 13px; color: #ffb81c; }
#skin-status { font-size: 10px !important; min-height: 14px; }
.lb-tabs { display: flex; justify-content: center; gap: 6px; margin-bottom: 14px; }
.lb-tab { font-family: 'Press Start 2P', monospace; font-size: 9px; padding: 8px 10px; background: #222; color: #aaa; border: 2px solid #555; cursor: pointer; }
.lb-tab.active { background: #00338d; color: #fff; border-color: #fff; }
@media (prefers-reduced-motion: reduce) {
.blink { animation: none; }
#health-fill { transition: none; }
}
.menu-panel {
position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
background: rgba(0,0,0,0.85); border: 4px solid #fff; outline: 4px solid #000;
padding: 40px; text-align: center; box-shadow: 10px 10px 0 #000;
pointer-events: auto; z-index: 60; width: 80%; max-width: 700px;
box-sizing: border-box; max-height: 90vh; overflow-y: auto;
}
.game-title { color: #ffb81c; font-size: 48px; margin-bottom: 20px; text-shadow: 4px 4px 0 #c60c30; }
.menu-panel p { font-size: 14px; line-height: 2; margin-bottom: 15px; }
.blink { animation: blinker 1s infinite; color: #00ff00; cursor: pointer; }
@keyframes blinker { 50% { opacity: 0; } }
.hidden { display: none !important; }
#level-selector { margin: 15px 0; display: flex; justify-content: center; align-items: center; gap: 15px; position: relative; z-index: 60;}
.lvl-btn {
background: #00338d; color: #fff; border: 2px solid #fff;
font-family: 'Press Start 2P', monospace; font-size: 18px;
padding: 10px 15px; cursor: pointer; box-shadow: 3px 3px 0 #000;
transition: transform 0.1s, box-shadow 0.1s, background 0.1s;
}
.lvl-btn:active { transform: translate(3px, 3px); box-shadow: none; }
.lvl-btn:hover { background: #c60c30; }
#lvl-display-text { font-size: 13px; color: #fff; width: 280px; text-shadow: 2px 2px 0 #000; line-height: 1.4; white-space: nowrap; overflow: hidden; }
#lvl-display-name { color: #ffb81c; font-size: 13px; display: inline; }
:fullscreen header, :-webkit-full-screen header { display: none !important; }
:fullscreen #tv-bezel, :-webkit-full-screen #tv-bezel {
width: 100vw !important; height: 100vh !important; max-width: none !important;
border-radius: 0 !important; box-shadow: none !important; border: none !important; aspect-ratio: auto !important;
}
:fullscreen #crt-glass, :-webkit-full-screen #crt-glass { border-radius: 0 !important; border: none !important; }
@media (max-width: 800px) {
#health-hud { top: max(15px, env(safe-area-inset-top, 0px)); left: max(15px, env(safe-area-inset-left, 0px)); gap: 10px; }
.health-bar-bg { width: 140px; height: 16px; border-width: 2px; outline-width: 2px; }
.pixel-heart { width: 20px; height: 20px; }
#score-display { font-size: 14px; top: max(15px, env(safe-area-inset-top, 0px)); right: max(15px, env(safe-area-inset-right, 0px)); }
#level-display { font-size: 12px; bottom: max(15px, env(safe-area-inset-bottom, 0px)); }
.game-title { font-size: 32px; text-shadow: 3px 3px 0 #c60c30;}
.menu-panel p { font-size: 10px; line-height: 1.6; }
#ui-layer { padding: 15px; }
.menu-panel { padding: 20px; width: 95%; }
#hud-buttons { bottom: max(12px, env(safe-area-inset-bottom, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); }
.hud-btn { font-size: 11px; padding: 5px 6px; min-width: 30px; }
#combo-text { font-size: 14px; }
#wings-display { font-size: 9px; margin-top: 5px; }
#magnet-hud { top: max(70px, env(safe-area-inset-top, 0px) + 55px); left: max(15px, env(safe-area-inset-left, 0px)); font-size: 8px; }
.panel-title { font-size: 16px; }
.setting-row { font-size: 9px; }
.opt-btn { min-width: 110px; font-size: 9px !important; }
#level-selector { gap: 10px; margin: 10px 0; }
.lvl-btn { font-size: 14px; padding: 8px 12px; box-shadow: 2px 2px 0 #000; }
#lvl-display-text { font-size: 9px; width: 220px; }
#lvl-display-name { font-size: 9px; }
#btn-main-menu { font-size: 10px !important; margin-top: 15px; }
#shield-hud { top: max(45px, env(safe-area-inset-top, 0px) + 30px); left: max(15px, env(safe-area-inset-left, 0px)); }
#shield-timer { font-size: 8px; }
#tv-bezel {
width: 100vw !important; flex: 1 !important; max-width: none !important;
border-radius: 0 !important; box-shadow: none !important; border: none !important; aspect-ratio: auto !important;
}
#crt-glass { border-radius: 0 !important; border: none !important; }
}
@media screen and (max-height: 600px) and (orientation: landscape) {
header { display: none !important; }
.menu-panel { padding: 15px 30px; }
.game-title { font-size: 28px; margin-bottom: 10px; }
.menu-panel p { margin-bottom: 10px; line-height: 1.4;}
}
#ui-layer:has(.sub-panel:not(.hidden)) #start-screen,
#ui-layer:has(#leaderboard-panel:not(.hidden)) #start-screen { visibility: hidden; }
.sub-panel { background: rgba(0,0,0,0.94); }
.menu-panel, #leaderboard-panel { max-height: 94% !important; }
@media screen and (max-height: 600px) and (orientation: landscape) {
#tv-bezel { height: 100vh !important; width: min(100vw, calc(100vh * 16 / 9)) !important; max-width: none !important; aspect-ratio: auto !important; border-radius: 0 !important; }
#crt-glass { border-radius: 0 !important; }
.creator { display: none; }
.menu-panel p.sub-cyan { display: none; }
.menu-panel p.howto { font-size: 8px; line-height: 1.7; margin-bottom: 6px; }
.game-title { font-size: 24px !important; margin-bottom: 6px !important; }
#level-selector { margin: 6px 0; }
.menu-panel .blink { margin-top: 8px !important; margin-bottom: 4px; font-size: 10px; }
#menu-buttons { margin-top: 4px; }
.menu-btn { padding: 7px 10px !important; font-size: 8px !important; }
#bank-line { margin-top: 6px !important; font-size: 8px !important; }
}
#level-display { transition: opacity 0.8s; }
#level-display.faded { opacity: 0; }
#touch-pad { display: none; }
@media (orientation: portrait) and (max-width: 800px) {
body.playing #tv-bezel {
flex: none !important; width: 100vw !important; height: auto !important;
aspect-ratio: 4 / 3 !important; max-height: 62vh;
}
body.playing #level-display { font-size: 9px; bottom: 8px; }
body.playing #hud-buttons { bottom: 6px; right: 6px; }
body.playing.touch #duck-btn { display: none !important; }
body.playing.touch #touch-pad {
display: flex; justify-content: space-between; align-items: center; gap: 16px;
width: 100vw; box-sizing: border-box; padding: 22px 22px max(22px, env(safe-area-inset-bottom, 0px));
}
.pad-btn {
flex: 1; max-width: 46vw; height: min(28vh, 170px); border-radius: 22px;
font-family: 'Press Start 2P', monospace; font-size: 34px; color: #fff;
display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
border: 3px solid rgba(255,255,255,0.7); box-shadow: 0 6px 0 #000; touch-action: none;
-webkit-tap-highlight-color: transparent; user-select: none;
}
.pad-btn span { font-size: 12px; letter-spacing: 2px; }
#pad-jump { background: #00338d; }
#pad-duck { background: #3a3a3a; flex: 0.75; }
.pad-btn.down { transform: translateY(5px); box-shadow: 0 1px 0 #000; filter: brightness(1.25); }
}
