660 lines
13 KiB
CSS
660 lines
13 KiB
CSS
* { box-sizing: border-box; }
|
|
|
|
:root {
|
|
--menu-overlay-dark: rgba(1, 6, 20, 0.52);
|
|
--menu-overlay-edge: rgba(1, 6, 20, 0.8);
|
|
--menu-focus: #8cefff;
|
|
}
|
|
|
|
html {
|
|
min-height: 100%;
|
|
-webkit-text-size-adjust: 100%;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
min-height: 100vh;
|
|
min-height: 100dvh;
|
|
overflow: hidden;
|
|
font-family: "Segoe UI", system-ui, sans-serif;
|
|
color: #fff;
|
|
}
|
|
|
|
.menu-bg {
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.menu-bg-img {
|
|
position: absolute;
|
|
inset: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
object-position: center;
|
|
}
|
|
|
|
.menu-bg::after {
|
|
content: "";
|
|
position: absolute;
|
|
inset: 0;
|
|
background:
|
|
radial-gradient(circle at 50% 48%, rgba(0, 196, 255, 0.16), transparent 52%),
|
|
linear-gradient(to bottom, rgba(2, 9, 28, 0.2), rgba(2, 9, 28, 0.36));
|
|
pointer-events: none;
|
|
}
|
|
|
|
.menu-char-layer {
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: 1;
|
|
pointer-events: none;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
.menu-char-img {
|
|
width: 100%;
|
|
height: 100%;
|
|
max-height: 75vh;
|
|
object-fit: contain;
|
|
object-position: center;
|
|
}
|
|
|
|
.menu-vignette {
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: 2;
|
|
pointer-events: none;
|
|
background: radial-gradient(ellipse at center, transparent 20%, var(--menu-overlay-dark) 66%, var(--menu-overlay-edge) 100%);
|
|
}
|
|
|
|
.menu-ui {
|
|
position: relative;
|
|
z-index: 3;
|
|
min-height: 100vh;
|
|
min-height: 100dvh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding:
|
|
max(0.5rem, env(safe-area-inset-top))
|
|
max(0.5rem, env(safe-area-inset-right))
|
|
max(0.5rem, env(safe-area-inset-bottom))
|
|
max(0.5rem, env(safe-area-inset-left));
|
|
}
|
|
|
|
.menu-btn-back {
|
|
position: absolute;
|
|
top: clamp(0.65rem, 2.2vw, 1.8rem);
|
|
left: clamp(0.65rem, 2.2vw, 1.8rem);
|
|
z-index: 10;
|
|
border: none;
|
|
background: none;
|
|
padding: 0;
|
|
cursor: pointer;
|
|
transition: transform 160ms ease, filter 160ms ease;
|
|
}
|
|
|
|
.menu-btn-back-img {
|
|
display: block;
|
|
width: clamp(46px, 5vw, 70px);
|
|
height: auto;
|
|
object-fit: contain;
|
|
filter: drop-shadow(0 0 10px rgba(0, 228, 255, 0.35));
|
|
}
|
|
|
|
.menu-logo {
|
|
position: absolute;
|
|
top: clamp(0.8rem, 4.5vh, 2.4rem);
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
z-index: 5;
|
|
width: min(56vw, 640px);
|
|
max-width: 92%;
|
|
}
|
|
|
|
.menu-logo-img {
|
|
display: block;
|
|
width: 100%;
|
|
height: auto;
|
|
object-fit: contain;
|
|
}
|
|
|
|
.menu-buttons {
|
|
position: relative;
|
|
z-index: 5;
|
|
width: 100%;
|
|
padding-inline: clamp(0.75rem, 2vw, 1.25rem);
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: clamp(10px, 1.9vh, 18px);
|
|
margin-top: clamp(7.5rem, 18vh, 15.5rem);
|
|
}
|
|
|
|
.menu-btn-create,
|
|
.menu-btn-join,
|
|
.menu-btn-exit {
|
|
border: none;
|
|
background: none;
|
|
padding: 0;
|
|
cursor: pointer;
|
|
width: clamp(265px, 33vw, 360px);
|
|
max-width: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: transform 140ms ease, filter 140ms ease, opacity 140ms ease;
|
|
}
|
|
|
|
.menu-btn-exit {
|
|
margin-top: clamp(0.9rem, 3.5vh, 2.25rem);
|
|
}
|
|
|
|
.menu-btn-create-img,
|
|
.menu-btn-join-img,
|
|
.menu-btn-exit-img {
|
|
display: block;
|
|
width: 100%;
|
|
height: auto;
|
|
object-fit: contain;
|
|
}
|
|
|
|
.menu-btn-create:hover,
|
|
.menu-btn-join:hover,
|
|
.menu-btn-exit:hover,
|
|
.menu-btn-back:hover {
|
|
transform: translateY(-2px);
|
|
filter: brightness(1.05);
|
|
}
|
|
|
|
.menu-btn-create:active,
|
|
.menu-btn-join:active,
|
|
.menu-btn-exit:active,
|
|
.menu-btn-back:active {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.menu-btn-create:focus-visible,
|
|
.menu-btn-join:focus-visible,
|
|
.menu-btn-exit:focus-visible,
|
|
.menu-btn-back:focus-visible {
|
|
outline: 2px solid var(--menu-focus);
|
|
outline-offset: 3px;
|
|
border-radius: 10px;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Desktop exact image size (1920x1080 target) */
|
|
|
|
|
|
|
|
* { box-sizing: border-box; }
|
|
|
|
:root {
|
|
--menu-overlay-dark: rgba(1, 6, 20, 0.52);
|
|
--menu-overlay-edge: rgba(1, 6, 20, 0.8);
|
|
--menu-focus: #8cefff;
|
|
}
|
|
|
|
html {
|
|
min-height: 100%;
|
|
-webkit-text-size-adjust: 100%;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
min-height: 100vh;
|
|
min-height: 100dvh;
|
|
overflow: hidden;
|
|
font-family: "Segoe UI", system-ui, sans-serif;
|
|
color: #fff;
|
|
}
|
|
|
|
/* ---- Background Layers ---- */
|
|
.menu-bg {
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.menu-bg-img {
|
|
position: absolute;
|
|
inset: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
object-position: center;
|
|
}
|
|
|
|
.menu-bg::after {
|
|
content: "";
|
|
position: absolute;
|
|
inset: 0;
|
|
background:
|
|
radial-gradient(circle at 50% 48%, rgba(0, 196, 255, 0.16), transparent 52%),
|
|
linear-gradient(to bottom, rgba(2, 9, 28, 0.2), rgba(2, 9, 28, 0.36));
|
|
pointer-events: none;
|
|
}
|
|
|
|
.menu-char-layer {
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: 1;
|
|
pointer-events: none;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
.menu-char-img {
|
|
width: 100%;
|
|
height: 100%;
|
|
max-height: 75vh;
|
|
object-fit: contain;
|
|
object-position: center;
|
|
}
|
|
|
|
.menu-vignette {
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: 2;
|
|
pointer-events: none;
|
|
background:
|
|
radial-gradient(ellipse at center, transparent 20%, var(--menu-overlay-dark) 66%, var(--menu-overlay-edge) 100%);
|
|
}
|
|
|
|
/* ---- UI Layer ---- */
|
|
.menu-ui {
|
|
position: relative;
|
|
z-index: 3;
|
|
min-height: 100vh;
|
|
min-height: 100dvh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding:
|
|
max(0.5rem, env(safe-area-inset-top))
|
|
max(0.5rem, env(safe-area-inset-right))
|
|
max(0.5rem, env(safe-area-inset-bottom))
|
|
max(0.5rem, env(safe-area-inset-left));
|
|
}
|
|
|
|
/* ---- Back button ---- */
|
|
.menu-btn-back {
|
|
position: absolute;
|
|
top: clamp(0.65rem, 2.2vw, 1.8rem);
|
|
left: clamp(0.65rem, 2.2vw, 1.8rem);
|
|
z-index: 10;
|
|
border: none;
|
|
background: none;
|
|
padding: 0;
|
|
cursor: pointer;
|
|
transition: transform 160ms ease, filter 160ms ease;
|
|
}
|
|
|
|
.menu-btn-back-img {
|
|
display: block;
|
|
width: clamp(46px, 5vw, 70px);
|
|
height: auto;
|
|
object-fit: contain;
|
|
filter: drop-shadow(0 0 10px rgba(0, 228, 255, 0.35));
|
|
}
|
|
|
|
/* ---- Logo ---- */
|
|
.menu-logo {
|
|
position: absolute;
|
|
top: clamp(0.8rem, 4.5vh, 2.4rem);
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
z-index: 5;
|
|
width: min(56vw, 640px);
|
|
max-width: 92%;
|
|
}
|
|
|
|
.menu-logo-img {
|
|
display: block;
|
|
width: 100%;
|
|
height: auto;
|
|
object-fit: contain;
|
|
}
|
|
|
|
/* ---- Main buttons ---- */
|
|
.menu-buttons {
|
|
position: relative;
|
|
z-index: 5;
|
|
width: 100%;
|
|
padding-inline: clamp(0.75rem, 2vw, 1.25rem);
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: clamp(10px, 1.9vh, 18px);
|
|
margin-top: clamp(7.5rem, 18vh, 15.5rem);
|
|
}
|
|
|
|
.menu-btn-create,
|
|
.menu-btn-join,
|
|
.menu-btn-exit {
|
|
border: none;
|
|
background: none;
|
|
padding: 0;
|
|
cursor: pointer;
|
|
width: clamp(265px, 33vw, 360px);
|
|
max-width: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: transform 140ms ease, filter 140ms ease, opacity 140ms ease;
|
|
}
|
|
|
|
.menu-btn-exit {
|
|
margin-top: clamp(0.9rem, 3.5vh, 2.25rem);
|
|
}
|
|
|
|
.menu-btn-create-img,
|
|
.menu-btn-join-img,
|
|
.menu-btn-exit-img {
|
|
display: block;
|
|
width: 100%;
|
|
height: auto;
|
|
object-fit: contain;
|
|
}
|
|
|
|
.menu-btn-create:hover,
|
|
.menu-btn-join:hover,
|
|
.menu-btn-exit:hover,
|
|
.menu-btn-back:hover {
|
|
transform: translateY(-2px);
|
|
filter: brightness(1.05);
|
|
}
|
|
|
|
.menu-btn-create:active,
|
|
.menu-btn-join:active,
|
|
.menu-btn-exit:active,
|
|
.menu-btn-back:active {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.menu-btn-create:focus-visible,
|
|
.menu-btn-join:focus-visible,
|
|
.menu-btn-exit:focus-visible,
|
|
.menu-btn-back:focus-visible {
|
|
outline: 2px solid var(--menu-focus);
|
|
outline-offset: 3px;
|
|
border-radius: 10px;
|
|
}
|
|
|
|
/* ---- Tablet ---- */
|
|
|
|
|
|
/* ---- Phone portrait ---- */
|
|
|
|
|
|
/* ---- Phone landscape ---- */
|
|
|
|
|
|
/* ---- Very short landscape ---- */
|
|
|
|
|
|
|
|
|
|
/* ---- Desktop only tuning (1920x1080 target) ---- */
|
|
|
|
* { box-sizing: border-box; }
|
|
|
|
html {
|
|
min-height: 100%;
|
|
-webkit-text-size-adjust: 100%;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
height: 100vh;
|
|
height: 100dvh;
|
|
overflow: hidden;
|
|
font-family: 'Segoe UI', system-ui, sans-serif;
|
|
color: #fff;
|
|
}
|
|
|
|
/* ---- พื้นหลัง ---- */
|
|
.menu-bg {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
z-index: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.menu-bg-img {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
object-position: center;
|
|
}
|
|
|
|
/* ---- ตัวละคร (เหมือน Login) ---- */
|
|
.menu-char-layer {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
z-index: 1;
|
|
pointer-events: none;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
.menu-char-img {
|
|
width: 100%;
|
|
height: 100%;
|
|
max-height: 72vh;
|
|
object-fit: contain;
|
|
object-position: center;
|
|
}
|
|
|
|
/* ---- Vignette fade สีดำ ---- */
|
|
.menu-vignette {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
z-index: 2;
|
|
pointer-events: none;
|
|
background: radial-gradient(ellipse at center, transparent 0%, transparent 30%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.6) 70%, rgba(0, 0, 0, 0.85) 85%, rgba(0, 0, 0, 0.95) 100%);
|
|
}
|
|
|
|
/* ---- ชั้น UI ทั้งหมด ---- */
|
|
.menu-ui {
|
|
position: relative;
|
|
z-index: 3;
|
|
height: 100vh;
|
|
height: 100dvh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* ---- ปุ่มย้อนกลับ มุมซ้ายบน ---- */
|
|
.menu-btn-back {
|
|
position: absolute;
|
|
top: clamp(0.5rem, 2vw, 2rem);
|
|
left: clamp(0.5rem, 2vw, 2rem);
|
|
padding: 0;
|
|
border: none;
|
|
background: none;
|
|
cursor: pointer;
|
|
z-index: 10;
|
|
}
|
|
|
|
.menu-btn-back-img {
|
|
display: block;
|
|
width: clamp(64px, 6vw, 96px);
|
|
height: auto;
|
|
object-fit: contain;
|
|
}
|
|
|
|
/* ---- Logo กลางบน ---- */
|
|
.menu-logo {
|
|
position: absolute;
|
|
top: clamp(1rem, 6vh, 5rem);
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
z-index: 5;
|
|
width: clamp(360px, 55vw, 1060px);
|
|
max-width: 90%;
|
|
}
|
|
|
|
.menu-logo-img {
|
|
display: block;
|
|
width: 100%;
|
|
height: auto;
|
|
object-fit: contain;
|
|
}
|
|
|
|
/* ---- ปุ่มหลัก 3 ปุ่มกลาง ---- */
|
|
.menu-buttons {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
gap: 0;
|
|
z-index: 5;
|
|
margin-top: auto;
|
|
margin-bottom: 0;
|
|
background-color: unset;
|
|
background: unset;
|
|
width: 100%;
|
|
padding: 0 clamp(1rem, 4vw, 2rem);
|
|
padding-top: 0;
|
|
padding-bottom: 100px;
|
|
}
|
|
|
|
.menu-btn-create,
|
|
.menu-btn-join,
|
|
.menu-btn-exit {
|
|
padding: 0;
|
|
border: none;
|
|
background: none;
|
|
cursor: pointer;
|
|
width: clamp(380px, 34vw, 520px);
|
|
max-width: 100%;
|
|
transition: transform 0.15s, opacity 0.15s;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
.menu-btn-exit {
|
|
margin-top: clamp(0.5rem, 2vh, 2rem);
|
|
}
|
|
|
|
.menu-btn-create:hover,
|
|
.menu-btn-join:hover,
|
|
.menu-btn-exit:hover {
|
|
transform: scale(1.05);
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.menu-btn-create:active,
|
|
.menu-btn-join:active,
|
|
.menu-btn-exit:active {
|
|
transform: scale(0.98);
|
|
}
|
|
|
|
.menu-btn-create-img,
|
|
.menu-btn-join-img,
|
|
.menu-btn-exit-img {
|
|
display: block;
|
|
width: 100%;
|
|
height: auto;
|
|
object-fit: contain;
|
|
}
|
|
|
|
/* ---- Responsive หน้าจอเล็ก (portrait) ---- */
|
|
|
|
|
|
|
|
|
|
/* ---- Responsive หน้าจอใหญ่ ---- */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* ==================================================
|
|
Mobile Landscape — ทุกขนาด
|
|
================================================== */
|
|
|
|
/* ---- Landscape ทั่วไป (932px และต่ำกว่า) ---- */
|
|
|
|
|
|
/* ---- Landscape เล็กมาก (height <= 400px) ---- */
|
|
|
|
|
|
/* ---- Landscape จิ๋ว (height <= 360px) ---- */
|
|
|
|
|
|
/* ---- Unified UI scale lock (desktop + shrink) ---- */
|
|
.menu-ui {
|
|
--mm-scale: 1;
|
|
}
|
|
|
|
.menu-btn-back {
|
|
top: calc(20px * var(--mm-scale)) !important;
|
|
left: calc(20px * var(--mm-scale)) !important;
|
|
}
|
|
|
|
.menu-btn-back-img {
|
|
width: calc(96px * var(--mm-scale)) !important;
|
|
}
|
|
|
|
.menu-logo {
|
|
top: calc(52px * var(--mm-scale)) !important;
|
|
width: calc(1060px * var(--mm-scale)) !important;
|
|
max-width: none !important;
|
|
}
|
|
|
|
.menu-buttons {
|
|
margin-top: calc(320px * var(--mm-scale)) !important;
|
|
padding-bottom: calc(100px * var(--mm-scale)) !important;
|
|
gap: calc(14px * var(--mm-scale)) !important;
|
|
}
|
|
|
|
.menu-btn-create,
|
|
.menu-btn-join,
|
|
.menu-btn-exit {
|
|
width: calc(520px * var(--mm-scale)) !important;
|
|
}
|
|
|
|
.menu-btn-exit {
|
|
margin-top: calc(16px * var(--mm-scale)) !important;
|
|
}
|