Files
2026-05-27 08:02:22 +00:00

646 lines
16 KiB
CSS

* { box-sizing: border-box; }
html {
min-height: 100%;
-webkit-text-size-adjust: 100%;
}
body {
margin: 0;
min-height: 100vh;
min-height: 100dvh;
overflow-x: hidden;
font-family: 'Kanit', 'Prompt', 'Sarabun', 'Segoe UI', system-ui, sans-serif;
color: #fff;
background: #0a0b1e;
}
@font-face {
font-family: 'NotoSansThai';
src: url('../FONTS/NotoSansThai-Medium.ttf') format('truetype');
font-weight: 500;
font-style: normal;
font-display: swap;
}
.join-bg {
position: fixed;
inset: 0;
z-index: 0;
overflow: hidden;
}
.join-bg-img {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
}
.join-char-layer {
position: fixed;
inset: 0;
z-index: 0;
pointer-events: none;
display: flex;
justify-content: center;
align-items: center;
}
.join-char-img {
width: 100%;
height: 100%;
max-height: 72vh;
object-fit: contain;
object-position: center;
filter: brightness(0.62);
}
.join-vignette {
position: fixed;
inset: 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%);
}
.join-ui {
position: relative;
z-index: 3;
min-height: 100vh;
min-height: 100dvh;
display: flex;
flex-direction: column;
padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}
.join-back-section {
position: static;
}
.join-btn-back {
position: fixed;
top: max(clamp(0.5rem, 2vw, 2rem), env(safe-area-inset-top));
left: max(clamp(0.5rem, 2vw, 2rem), env(safe-area-inset-left));
padding: 0;
border: none;
background: transparent;
cursor: pointer;
z-index: 20;
-webkit-tap-highlight-color: transparent;
}
.join-btn-back-img {
display: block;
width: clamp(40px, 10vw, 60px);
height: auto;
object-fit: contain;
}
.join-content {
width: 100%;
max-width: min(96vw, 720px);
margin: 0 auto;
padding: clamp(44px, 9vh, 76px) clamp(14px, 3.5vw, 22px) clamp(24px, 5vh, 40px);
display: flex;
flex-direction: column;
align-items: center;
gap: clamp(0.85rem, 2.5vw, 1.35rem);
}
.join-header {
text-align: center;
}
.join-title-img {
--join-title-height: 14cqh; /* ปรับความสูง txt-joinroom ที่นี่ */
display: block;
height: var(--join-title-height);
width: calc(var(--join-title-height) * 535 / 137);
max-width: 88vw;
margin-inline: auto;
aspect-ratio: 535 / 137;
object-fit: contain;
image-rendering: -webkit-optimize-contrast;
filter: drop-shadow(0 0 16px rgba(191, 0, 255, 0.55));
margin-top: 0cqh;
}
.join-title-line {
--line-height: 5cqh; /* ปรับความสูง line.png ที่นี่ */
display: block;
height: var(--line-height);
width: min(calc(var(--line-height) * 1018 / 6), 100%);
max-width: none;
aspect-ratio: 1018 / 6;
object-fit: contain;
margin: -2cqh auto -3.5cqh;
}
/* กล่องหลักตาม mock — bg-pop */
.join-panel {
width: 100%;
padding: 0px;
border-radius: 10px;
background-image: url('IMAGE/bg-pop.png');
background-size: 100% 100%;
background-repeat: no-repeat;
background-position: center;
container-type: inline-size;
}
.join-tabs {
display: flex;
flex-direction: row;
justify-content: center;
align-items: flex-end;
--join-tab-overlap: 0px;
gap: clamp(0.5rem, 2vw, 1rem);
margin-bottom: clamp(8px, 1.2cqh, 14px);
width: 100%;
}
.join-tab + .join-tab {
margin-left: var(--join-tab-overlap);
}
.join-tab {
padding: 0;
border: none;
background: transparent;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
flex: 0 1 auto;
}
.join-tab:focus-visible {
outline: 2px solid #00ffff;
outline-offset: 4px;
}
.join-tab-img {
display: block;
width: clamp(140px, 38vw, 220px);
height: auto;
image-rendering: -webkit-optimize-contrast;
}
.join-view--hidden {
display: none !important;
}
#join-public-view {
display: flex;
width: 100%;
height: 100%;
}
#join-private-view {
height: 100%;
min-height: min(48vh, 420px);
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
padding: clamp(8px, 2vh, 16px) 0;
container-type: inline-size;
}
/* พื้นที่สกรอล + แถบเลื่อนตาม asset */
.join-list-scroll {
--join-scrollbar-width: clamp(12px, 3.8cqw, 25px); /* ปรับความอ้วน scrollbar ที่นี่ */
--join-scrollbar-thumb-inset: clamp(2px, 0.8cqw, 6px);
--join-scrollbar-right-offset: clamp(4px, 2.2cqw, 17px); /* ขยับราง+แท่ง scrollbar ไปซ้าย/ขวา */
position: relative;
width: 100%;
height: 95%;
min-height: 0;
padding-right: calc(var(--join-scrollbar-width) + var(--join-scrollbar-thumb-inset) + 2px);
margin-top: 1cqh;
margin-right: var(--join-scrollbar-right-offset);
}
.join-list-scroll::after {
content: '';
position: absolute;
top: 0;
right: var(--join-scrollbar-right-offset);
width: var(--join-scrollbar-width);
height: 100%;
background: url('IMAGE/join-room-scrollbar-bg.png') center top / 100% 100% no-repeat;
pointer-events: none;
opacity: 0.95;
border-radius: 6px;
}
.join-scrollbar-thumb {
position: absolute;
right: calc(var(--join-scrollbar-right-offset) + var(--join-scrollbar-thumb-inset));
top: var(--join-scrollbar-thumb-inset);
width: calc(var(--join-scrollbar-width) - (var(--join-scrollbar-thumb-inset) * 2));
min-height: clamp(18px, 4.2cqh, 40px);
border-radius: 999px;
pointer-events: none;
background:
linear-gradient(180deg, rgba(80, 255, 255, 0.95) 0%, rgba(0, 210, 255, 0.95) 100%);
border: clamp(1px, 0.25cqw, 2px) solid rgba(120, 255, 255, 0.9);
box-shadow:
0 0 10px rgba(0, 255, 255, 0.65),
inset 0 0 6px rgba(255, 255, 255, 0.35);
transform: translateY(0);
opacity: 0;
transition: opacity 120ms ease;
}
.join-list {
--join-list-shift-x: 2cqw; /* ขยับรายการห้องไปทางขวา */
--join-room-row-stack-offset: -3cqh; /* ปรับระยะห่างแนวตั้งระหว่างห้อง (ติดลบได้) */
height: 100%;
max-height: 100%;
overflow-y: auto;
overflow-x: hidden;
padding-right: 4px;
margin-left: var(--join-list-shift-x);
display: flex;
flex-direction: column;
/* gap: clamp(0.25rem, 1vw, 0.45rem); */
}
.join-room-row + .join-room-row {
margin-top: var(--join-room-row-stack-offset);
}
.join-list::-webkit-scrollbar {
width: 0;
height: 0;
}
.join-list {
scrollbar-width: none;
scrollbar-color: rgba(0, 255, 255, 1) rgba(0, 40, 60, 0.4);
}
.join-list-status {
--join-list-status-font-size: 3.5cqw; /* ปรับขนาดฟอนต์สถานะห้องสาธารณะ */
padding: 1rem;
font-size: var(--join-list-status-font-size);
font-family: 'NotoSansThai', 'Kanit', 'Sarabun', 'Segoe UI', sans-serif;
color: rgba(255, 255, 255, 0.85);
text-align: center;
margin-top: 2cqh;
}
/* แถวห้อง — bg-room-name */
.join-room-row {
width: 100%;
}
.join-room-row-inner {
--join-room-row-height: 16.5cqh; /* ปรับความสูง bg-room-name ได้ที่นี่ */
--join-room-card-padding-y: 1.6cqh; /* ปรับ padding บน/ล่างของกล่องห้อง */
--join-room-card-padding-x: 4cqw; /* ปรับ padding ซ้าย/ขวาของกล่องห้อง */
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
gap: clamp(0.35rem, 1.2vw, 0.75rem);
height: var(--join-room-row-height);
width: calc(var(--join-room-row-height) * (910 / 160));
max-width: 100%;
aspect-ratio: 910 / 160;
padding: var(--join-room-card-padding-y) var(--join-room-card-padding-x);
background-image: url('IMAGE/bg-room-name.png');
background-size: 100% 100%;
background-repeat: no-repeat;
background-position: center;
}
.join-room-name {
--join-room-name-font-size: 2.5cqw; /* ปรับขนาดฟอนต์ชื่อห้อง */
flex: 1 1 auto;
min-width: 0;
font-size: var(--join-room-name-font-size);
font-weight: 700;
font-family: 'NotoSansThai', 'Kanit', 'Sarabun', 'Segoe UI', sans-serif;
color: #fff;
text-shadow: 0 0 8px rgba(0, 255, 255, 0.25);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
padding-left: 1em;
line-height: 1.3;
}
.join-room-players {
--join-room-players-font-size: 2.5cqw; /* ปรับขนาดฟอนต์จำนวนผู้เล่น */
flex: 0 0 auto;
font-size: var(--join-room-players-font-size);
font-weight: 600;
font-family: 'NotoSansThai', 'Kanit', 'Sarabun', 'Segoe UI', sans-serif;
color: #fff;
white-space: nowrap;
line-height: 1.3;
}
.join-room-btn {
flex: 0 0 auto;
padding: 0;
border: none;
background: transparent;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
}
.join-room-btn:disabled {
cursor: not-allowed;
opacity: 0.5;
filter: none;
}
.join-room-btn-img {
--join-room-btn-height: 12cqh; /* ปรับความสูงปุ่มเข้าร่วมในรายการห้อง */
display: block;
height: var(--join-room-btn-height);
width: calc(var(--join-room-btn-height) * (198 / 119));
aspect-ratio: 198 / 119;
max-width: 100%;
image-rendering: -webkit-optimize-contrast;
transform: translateX(1.5cqw);
}
/* แท็บห้องส่วนตัว — ฟอร์ม */
.join-private-form {
--join-private-row-width: 100%;
--join-private-label-width: 25%; /* ปรับความกว้างคอลัมน์ label */
--join-private-pass-scale: 1.15; /* ทำให้ PASSWORD ใหญ่กว่า ROOM ID */
--join-private-input-width: 70%; /* ปรับความกว้าง textfield */
--join-private-row-gap: 0;
--join-private-shift-x: -2cqw; /* ขยับฟอร์มไปทางขวา */
display: flex;
flex-direction: column;
width: min(96%, 94cqw);
max-width: 100%;
gap: clamp(0.6rem, 2.2cqw, 2.2cqw);
padding-top: 0;
margin: auto;
transform: translateX(var(--join-private-shift-x));
}
.join-private-row + .join-private-row {
margin-top: -4cqh; /* ค่าติดลบได้ */
}
.join-private-row {
display: flex;
align-items: center;
justify-content: flex-end;
width: var(--join-private-row-width);
margin-inline: auto;
gap: var(--join-private-row-gap);
}
.join-private-label-img {
--join-private-label-shift-x: 2.5cqw; /* ขยับ label ไปทางขวา */
display: block;
width: 100%;
height: auto;
aspect-ratio: 211 / 83;
object-fit: contain;
image-rendering: -webkit-optimize-contrast;
flex: 0 0 var(--join-private-label-width);
max-width: var(--join-private-label-width);
margin-left: auto;
transform: translateX(var(--join-private-label-shift-x));
}
.join-private-label-img--pass {
--join-private-label-shift-x: 2.5cqw;
width: calc(100% * var(--join-private-pass-scale));
height: auto;
aspect-ratio: 228 / 84;
flex: 0 0 calc(var(--join-private-label-width) * var(--join-private-pass-scale));
max-width: calc(var(--join-private-label-width) * var(--join-private-pass-scale));
margin-left: auto;
}
.join-textfield-wrap {
position: relative;
flex: 0 0 var(--join-private-input-width);
width: 100%;
min-width: 0;
aspect-ratio: 613 / 141;
height: auto;
max-width: var(--join-private-input-width);
}
.join-textfield-wrap--narrow {
flex: 0 0 var(--join-private-input-width);
width: 100%;
max-width: var(--join-private-input-width);
}
.join-textfield-wrap::before {
content: '';
position: absolute;
inset: 0;
background-image: url('IMAGE/textfield.png');
background-size: 100% 100%;
background-repeat: no-repeat;
background-position: center;
pointer-events: none;
z-index: 1;
}
.join-textfield-input,
input.join-textfield-input,
#join-private-room-id.join-textfield-input {
position: relative;
z-index: 2;
width: 100% !important;
height: 100% !important;
padding-top: clamp(0.28rem, 0.9cqw, 0.55rem) !important;
padding-bottom: clamp(0.28rem, 0.9cqw, 0.55rem) !important;
padding-left: clamp(0.65rem, 1.8cqw, 1.15rem) !important;
padding-right: clamp(0.65rem, 1.8cqw, 1.15rem) !important;
border: none !important;
background: transparent !important;
color: #fff;
font-size: clamp(0.5rem, 2.4cqw, 3cqw);
font-weight: 600;
font-family: 'NotoSansThai', 'Kanit', 'Sarabun', 'Segoe UI', sans-serif;
line-height: 1.5;
outline: none;
box-sizing: border-box;
}
#join-private-room-id.join-textfield-input {
padding-left: 2.5em !important;
}
.join-textfield-input--code,
#join-private-password.join-textfield-input {
padding-left: 0 !important;
padding-right: 0 !important;
}
.join-textfield-input--code {
text-align: center;
font-family: 'NotoSansThai', 'Kanit', 'Sarabun', 'Segoe UI', sans-serif;
letter-spacing: 0.18em;
font-size: clamp(0.5rem, 2.7cqw, 3cqw);
}
.join-textfield-input::placeholder {
color: rgba(255, 255, 255, 0.35);
}
.join-private-submit {
align-self: center;
padding: 0;
margin-top: clamp(0.4rem, 1.5cqh, 0.9rem);
border: none;
background: transparent;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
}
.join-private-submit:disabled {
cursor: not-allowed;
opacity: 0.6;
}
.join-private-submit-img {
--join-private-submit-height: 16cqh; /* ปรับความสูงปุ่มเข้าร่วมได้ที่นี่ */
display: block;
height: var(--join-private-submit-height);
width: calc(var(--join-private-submit-height) * (404 / 141));
aspect-ratio: 404 / 141;
max-width: 100%;
image-rendering: -webkit-optimize-contrast;
transform: translateX(4cqw);
}
@media (max-width: 520px) {
.join-private-form {
--join-private-label-width: 100%;
--join-private-input-width: 100%;
}
.join-private-row {
justify-content: center;
width: 100%;
gap: 0.35rem;
flex-wrap: wrap;
}
.join-private-label-img,
.join-private-label-img--pass {
margin-left: 0;
max-width: 100%;
}
.join-textfield-wrap {
width: min(100%, 86vw);
max-width: 100%;
}
.join-room-row-inner {
flex-wrap: wrap;
justify-content: center;
text-align: center;
}
.join-room-name,
.join-room-players {
width: 100%;
text-align: center;
}
.join-room-btn {
margin-top: 0.25rem;
}
}
@media (min-width: 1025px) {
html,
body {
height: 100%;
overflow: hidden;
}
body {
min-height: 100dvh;
max-height: 100dvh;
}
.join-btn-back-img {
width: 112px;
height: 139px;
}
.join-ui {
justify-content: center;
align-items: center;
height: 100dvh;
min-height: 100dvh;
max-height: 100dvh;
overflow: hidden;
}
.join-content {
position: relative;
z-index: 40;
isolation: isolate;
width: min(calc(95dvh * 1), 90vw);
max-width: min(calc(95dvh * 1), 90vw);
height: auto;
min-height: 0;
max-height: none;
aspect-ratio: 1 / 1;
margin: 0 auto;
padding: 2.1dvh 0 1.4dvh;
justify-content: flex-start;
container-type: size;
overflow: hidden;
gap: 1.2cqh;
}
.join-panel {
--join-panel-height: 70cqh; /* ปรับความสูง bg-pop ที่นี่ */
height: var(--join-panel-height);
width: calc(var(--join-panel-height) * 1008 / 681);
max-width: 100%;
aspect-ratio: 1008 / 681;
padding: 2.4cqh 2.2cqw 2.2cqh;
background-size: 100% 100%;
}
#join-private-view {
min-height: 0;
height: 100%;
}
.join-tabs {
--join-tab-height: 14.5cqh; /* ปรับความสูงปุ่มห้องสาธารณะ/ส่วนตัวที่นี่ */
--join-tab-overlap: -3cqh; /* ติดลบได้: ปุ่มจะซ้อนกันมากขึ้น */
margin-bottom: -4cqh;
}
.join-tab {
flex: 0 0 auto;
height: var(--join-tab-height);
width: calc(var(--join-tab-height) * 499 / 143);
aspect-ratio: 499 / 143;
}
.join-tab-img {
width: 100%;
height: 100%;
aspect-ratio: 499 / 143;
object-fit: contain;
}
}