Files
ssessesse-ki-battle/src/client/home.css
T

179 lines
8.4 KiB
CSS

/* Home and room entry only; all selectors are scoped to the player app. */
body.player-app:is([data-screen=home], [data-screen=join]) .app {
position: relative;
width: 100%;
max-width: none;
padding: 0;
}
body.player-app:is([data-screen=home], [data-screen=join]) main { min-height: 100svh; padding: 0; }
body.player-app .home {
flex: 1;
grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
gap: 0;
max-width: none;
margin: 0;
align-items: stretch;
}
body.player-app .home-stage {
min-height: 100svh;
padding: 0;
border: 0;
border-radius: 0;
background: linear-gradient(125deg, #ffbd43, #ff8b26 75%);
clip-path: polygon(0 0, 100% 0, 83% 100%, 0 100%);
}
body.player-app .home-stage::before {
inset: 16% auto auto -28%;
width: 660px;
height: 660px;
border: 2px solid #fff4ce80;
border-radius: 50%;
background: radial-gradient(circle, #fff3c14d 1px, transparent 1.5px) 0 0 / 12px 12px;
}
body.player-app .home-stage::after {
inset: 0;
width: auto;
height: auto;
border: 0;
transform: none;
background: repeating-linear-gradient(118deg, transparent 0 120px, #fff4ce35 121px 123px, transparent 124px 220px);
}
body.player-app .home h1 {
position: absolute;
z-index: 3;
top: max(40px, env(safe-area-inset-top));
left: max(36px, env(safe-area-inset-left));
margin: 0;
color: #202122;
font-size: clamp(54px, 6.2vw, 104px);
line-height: 1.12;
letter-spacing: -.055em;
text-align: left;
transform: rotate(-5deg);
text-shadow: 3px 4px 0 #ffe6a3;
}
body.player-app .home h1 span { display: block; }
body.player-app .home h1 span:last-child { font-size: .82em; }
body.player-app #home-fighters {
position: absolute;
inset: 0;
display: block;
width: 100%;
max-width: none;
margin: 0;
padding: 0;
}
body.player-app .home-fighter { position: absolute; max-width: none; filter: drop-shadow(8px 8px 0 #70391b25); }
body.player-app .home-fighter:first-child { width: 89%; left: -15%; top: max(230px, 30%); z-index: 2; transform: rotate(-9deg); }
body.player-app .home-fighter:last-child { width: 73%; right: -8%; top: max(250px, 33%); z-index: 1; transform: scaleX(-1) rotate(-8deg); }
body.player-app .home-fighter .character { animation: none; }
body.player-app .home-fighter .ground-shadow, body.player-app .home-versus { display: none; }
body.player-app .home-fighter-teleport { width: 54%; left: 34%; top: max(80px, 10%); z-index: 0; transform: rotate(4deg); }
body.player-app .home-entering .home-fighter-left { animation: home-slide-left .65s cubic-bezier(.16, 1, .3, 1) both; }
body.player-app .home-entering .home-fighter-right { animation: home-slide-right .65s .25s cubic-bezier(.16, 1, .3, 1) both; }
body.player-app .home-entering .home-fighter-teleport { animation: home-teleport-in .45s .9s steps(1, end) both; }
body.player-app .home-entering .home-fighter-teleport::after {
content: '';
position: absolute;
inset: 5% 22% 12%;
pointer-events: none;
background: repeating-linear-gradient(90deg, transparent 0 13%, #fff4ce 14% 16%, transparent 17% 25%);
animation: home-teleport-streaks .45s .9s ease-out both;
}
@keyframes home-slide-left {
from { translate: -120% 0; opacity: 0; }
to { translate: 0 0; opacity: 1; }
}
@keyframes home-slide-right {
from { translate: 120% 0; opacity: 0; }
to { translate: 0 0; opacity: 1; }
}
@keyframes home-teleport-in {
0% { opacity: 0; }
20% { opacity: .65; translate: 0 -12px; }
35% { opacity: 0; }
50% { opacity: 1; translate: 0 0; }
65% { opacity: .3; }
80%, 100% { opacity: 1; translate: 0 0; }
}
@keyframes home-teleport-streaks {
0%, 100% { opacity: 0; scale: 1 .8; }
20% { opacity: .9; scale: 1 1.2; }
}
@media (prefers-reduced-motion: reduce) {
body.player-app .home-entering .home-fighter { animation: none; }
body.player-app .home-entering .home-fighter-teleport::after { display: none; }
}
body.player-app .home-menu {
position: relative;
z-index: 4;
align-self: center;
width: 100%;
min-width: 0;
margin-left: -24px;
padding: 64px max(32px, 4vw) 120px 0;
}
body.player-app .home-actions, body.player-app .home-actions .split { display: grid; gap: 14px; }
body.player-app .home-actions button {
display: flex;
justify-content: space-between;
align-items: center;
gap: 16px;
min-height: 80px;
padding: 20px 28px;
font-size: clamp(22px, 2.3vw, 32px);
letter-spacing: -.035em;
text-align: left;
}
body.player-app .home-actions > .primary { min-height: 108px; padding: 24px 28px; font-size: clamp(30px, 3.1vw, 44px); }
body.player-app .home-actions svg { flex: 0 0 28px; width: 28px; height: 28px; }
body.player-app .home-actions > .primary svg { flex-basis: 36px; width: 36px; height: 36px; }
body.player-app .home .stats { margin-top: 32px; padding-top: 20px; border-top: 2px solid #242526; }
body.player-app .home .stat-mode { padding: 0 20px; }
body.player-app .home .stat-mode:first-child { padding-left: 0; }
body.player-app .home .stat-mode + .stat-mode { border-left: 1px solid #d6d6d6; }
body.player-app .home .stat-mode > span { font-size: 13px; color: #242526; }
body.player-app .home .stat-mode > div { gap: 24px; color: #606060; }
body.player-app .home .stat-mode strong { color: #242526; font-size: 30px; }
body.player-app .home .join-form { margin-top: 24px; padding: 20px; background: #fff; border: 2px solid #242526; box-shadow: 5px 5px 0 #2425261c; }
body.player-app .home .join-form > .quiet { margin: 14px auto 0; }
body.player-app:is([data-screen=home], [data-screen=join]) #notice:not(:empty) { position: absolute; bottom: 90px; right: 4vw; width: 36%; margin: 0; }
body.player-app:is([data-screen=home], [data-screen=join]) #reconnect { position: absolute; bottom: 150px; right: 4vw; }
@media (max-width: 1050px) and (min-width: 761px) {
body.player-app .home-fighter:first-child { width: 106%; left: -23%; }
body.player-app .home-fighter:last-child { width: 88%; right: -16%; }
body.player-app .home h1 { left: 24px; }
body.player-app .home-menu { margin-left: -12px; padding-right: 24px; }
body.player-app .home-actions button { padding-inline: 20px; }
}
@media (max-width: 760px) {
body.player-app:is([data-screen=home], [data-screen=join]) main { min-height: 0; }
body.player-app .home { grid-template-columns: minmax(0, 1fr); }
body.player-app .home-stage { height: clamp(300px, 48vw, 390px); min-height: 0; clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%); }
body.player-app .home-stage::before { width: 420px; height: 420px; }
body.player-app .home h1 { top: max(22px, env(safe-area-inset-top)); left: max(22px, env(safe-area-inset-left)); font-size: clamp(44px, 8vw, 60px); }
body.player-app .home-fighter:first-child { width: 65%; left: 8%; top: 110px; }
body.player-app .home-fighter:last-child { width: 54%; right: -4%; top: 115px; }
body.player-app .home-fighter-teleport { width: 40%; left: 43%; top: -5px; }
body.player-app .home-menu { width: min(100%, 520px); margin: -4px auto 0; padding: 0 max(20px, env(safe-area-inset-right)) 20px max(20px, env(safe-area-inset-left)); }
body.player-app .home-actions, body.player-app .home-actions .split { gap: 12px; }
body.player-app .home-actions button { min-height: 60px; padding: 13px 20px; font-size: 23px; }
body.player-app .home-actions > .primary { min-height: 78px; padding: 16px 20px; font-size: 31px; }
body.player-app .home-actions svg { width: 23px; height: 23px; flex-basis: 23px; }
body.player-app .home-actions > .primary svg { width: 29px; height: 29px; flex-basis: 29px; }
body.player-app .home .stats { margin-top: 24px; padding-top: 16px; }
body.player-app .home .stat-mode { padding-inline: 16px; }
body.player-app .home .stat-mode strong { font-size: 26px; }
body.player-app .home .stat-mode > div { gap: 20px; }
body.player-app .home .join-form { padding: 14px; }
body.player-app:is([data-screen=home], [data-screen=join]) #notice:not(:empty),
body.player-app:is([data-screen=home], [data-screen=join]) #reconnect { position: static; width: auto; margin: 12px 20px; }
}
@media (max-width: 380px) {
body.player-app .home-stage { height: 270px; }
body.player-app .home-actions button { min-height: 54px; padding-block: 10px; font-size: 21px; }
body.player-app .home-actions > .primary { min-height: 68px; font-size: 28px; }
body.player-app .home .stat-mode > div { gap: 16px; }
}
.online-count { position: absolute; top: max(16px, env(safe-area-inset-top)); right: max(20px, env(safe-area-inset-right)); z-index: 5; color: #45534a; font-size: 13px; font-variant-numeric: tabular-nums; }