Files
justice/www/html/Login/style.css
T

590 lines
13 KiB
CSS

* { box-sizing: border-box; }
/* โทนสีตาม reference – ฟ้าไฟฟ้า / navy */
:root {
--jd-cyan: #00d4ff;
--jd-cyan-soft: rgba(0, 212, 255, 0.35);
--jd-panel-bg: rgba(6, 12, 26, 0.6);
--jd-panel-border: rgba(43, 210, 255, 0.85);
}
html {
min-height: 100%;
-webkit-text-size-adjust: 100%;
}
body {
margin: 0;
min-height: 100vh;
min-height: 100dvh;
font-family: 'Segoe UI', system-ui, sans-serif;
color: #fff;
overflow-x: hidden;
/* padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); */
/* background: var(--jd-navy); */
}
/* ชั้นที่ 1: พื้นหลัง (รักษา ratio ไม่ยืด) */
/* พื้นหลังหลังสุด ใช้ <img> แทน background-image */
.login-bg {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 0;
overflow: hidden;
}
.login-bg::after {
content: "";
position: absolute;
inset: 0;
background:
radial-gradient(circle at 50% 44%, rgba(0, 180, 255, 0.2), transparent 52%),
linear-gradient(to bottom, rgba(2, 6, 18, 0.1), rgba(2, 6, 18, 0.35));
pointer-events: none;
}
.login-bg-img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
}
/* ชั้นที่ 2: ตัวละคร – ใช้ screen ให้พื้นดำของรูปโปร่ง ไม่เป็นกล่องดำ */
.login-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;
}
.login-char-img {
width: 100%;
height: 100%;
max-height: 72vh;
object-fit: contain;
object-position: center;
}
/* โลโก้ – ใส่แค่ screen ให้ดำโปร่ง ไม่ใส่ filter เพื่อไม่ให้สีจาง */
.login-logo-layer {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 5;
display: flex;
justify-content: center;
align-items: flex-start;
padding: clamp(1.5rem, 5vw, 2.5rem) 1rem 0;
pointer-events: none;
box-sizing: border-box;
}
/* ชั้นที่ 3: ข้อความ + พาเนล (อยู่บนโลโก้) */
.login-page {
position: relative;
z-index: 10;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-end;
padding: clamp(8.5rem, 12vh, 11rem) 1rem clamp(3.2rem, 7.5vh, 6.5rem);
background: transparent;
}
/* จองพื้นที่ header (ชั่วคราวไม่มีโลโก้ – ลดความสูง) */
.login-brand {
position: relative;
z-index: 1;
text-align: center;
margin-bottom: 1.5rem;
background: none !important;
padding: 0;
min-height: 2rem;
}
.brand-jd {
margin: 0;
padding: 0;
line-height: 0;
background: none !important;
border: none;
box-shadow: none;
}
.brand-jd-blend {
display: inline-block;
line-height: 0;
background: none !important;
}
/* โลโก้ – ไม่มี filter สีเต็ม มีแค่ screen ที่ layer แม่ให้ดำโปร่ง */
.brand-jd-img {
display: block;
width: min(56vw, 680px);
max-width: 100%;
height: auto;
}
/* ซ่อนเพราะโลโก้รูปมี JUSTICE DIVERS อยู่แล้ว */
.brand-tagline {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
/* ตาม reference: พาเนล navy โปร่ง ขอบ + เรืองฟ้าไฟฟ้า */
.login-panel {
position: relative;
z-index: 1;
width: 100%;
max-width: clamp(440px, 40vw, 620px);
min-height: clamp(290px, 30vh, 340px);
background: var(--jd-panel-bg);
border: 1px solid var(--jd-panel-border);
border-radius: clamp(15px, 1.5vw, 20px);
padding: clamp(1.15rem, 1.4vw, 1.55rem) clamp(1.5rem, 2.2vw, 2.2rem) clamp(1.1rem, 1.3vw, 1.45rem);
box-sizing: border-box;
box-shadow:
0 0 0 1px rgba(170, 243, 255, 0.12),
0 18px 45px rgba(0, 0, 0, 0.38),
0 0 30px var(--jd-cyan-soft),
0 0 62px rgba(0, 212, 255, 0.12),
inset 0 0 0 1px rgba(255, 255, 255, 0.08);
backdrop-filter: blur(6px);
-webkit-backdrop-filter: blur(6px);
}
/* ตาม mock: หัวข้อกลาง พอดี */
.panel-title {
margin: 0 0 0.6rem 0;
text-align: center;
line-height: 0;
}
.panel-title-img {
display: block;
width: 56%;
max-width: 56%;
height: auto;
margin: 0 auto;
object-fit: contain;
object-position: center;
}
/* ปุ่ม FB / Google: แถวเดียวเต็มความกว้างพาเนล (100%) แบ่งซ้าย–ขวาเท่ากัน */
.login-actions {
display: flex;
flex-direction: row;
align-items: stretch;
justify-content: center;
gap: clamp(0.45rem, 1.3vw, 0.7rem);
width: 100%;
max-width: 100%;
margin: 0 auto;
}
/* ปุ่มโซเชียลใช้รูป – ครึ่งแถวต่อปุ่ม รวมแถว = 100% */
.btn-social {
flex: 1 1 0;
width: auto;
min-width: 0;
min-height: clamp(50px, 5.6vw, 60px);
padding: 0;
border: none;
background: transparent;
cursor: pointer;
transition: transform 0.15s, opacity 0.15s;
display: flex;
align-items: center;
justify-content: center;
}
.btn-social:hover {
transform: translateY(-2px);
opacity: 0.95;
}
.btn-social:active { transform: translateY(0); }
.btn-social-img {
display: block;
width: 100%;
height: auto;
max-height: 100%;
object-fit: contain;
object-position: center;
}
/* ตาม mock: เส้นคั่น + "หรือ" กลาง */
.login-or {
text-align: center;
margin: clamp(0.4rem, 0.8vw, 0.6rem) 0;
line-height: 0;
}
.login-or-img {
display: block;
width: 100%;
max-width: 100%;
height: auto;
margin: 0 auto;
object-fit: contain;
object-position: center;
}
/* ปุ่ม Guest: เต็มแนวคิดแบบ 100% แต่เว้นซ้าย–ขวาอย่างละ 20% (= กว้างปุ่ม 60% กลาง) */
.btn-guest {
width: 58%;
max-width: 58%;
min-height: clamp(44px, 5vh, 52px);
margin-left: 21%;
margin-right: 21%;
padding: clamp(0.4rem, 0.8vw, 0.55rem) 0.5rem;
border: none;
border-radius: clamp(10px, 1vw, 12px);
background-color: transparent;
background-image: url('btn-guest.png');
background-repeat: no-repeat;
background-position: center;
background-size: contain;
color: #fff;
cursor: pointer;
transition: transform 0.15s, opacity 0.15s;
display: block;
box-sizing: border-box;
}
.btn-guest:hover {
opacity: 0.95;
transform: translateY(-1px);
}
/* นโยบายความเป็นส่วนตัว – ตัวอักษร/รูปเล็กลง */
.login-legal {
margin: clamp(0.5rem, 0.75vw, 0.65rem) 0 0 0;
text-align: center;
line-height: 1.35;
font-size: clamp(0.6rem, 2.4vw, 0.72rem);
color: rgba(255, 255, 255, 0.85);
}
.login-legal a {
display: inline;
color: var(--jd-cyan);
text-decoration: underline;
text-underline-offset: 2px;
}
.login-legal a:hover {
opacity: 0.9;
}
.btn-social:focus-visible,
.btn-guest:focus-visible,
.login-legal a:focus-visible {
outline: 2px solid #7ce9ff;
outline-offset: 2px;
border-radius: 10px;
}
.login-legal-img {
display: block;
width: auto;
max-width: min(72%, 240px);
height: auto;
margin: 0 auto;
object-fit: contain;
object-position: center;
}
/* ========== Responsive: มือถือ / แท็บเล็ต / แนวตั้ง–แนวนอน ========== */
/* มือถือ / แท็บเล็ก (≤768px): แถวเดียวเต็มความกว้าง ปรับ gap / ความสูง */
@media (max-width: 768px) {
.login-actions {
flex-direction: row;
gap: clamp(0.3rem, 2vw, 0.55rem);
}
.btn-social {
flex: 1 1 0;
width: auto;
min-width: 0;
min-height: clamp(44px, 11vw, 52px);
}
.btn-social-img {
max-height: 100%;
}
}
/* มือถือ แนวตั้ง (portrait) */
@media (max-width: 480px) {
.login-page {
justify-content: center;
padding: max(1rem, env(safe-area-inset-top)) 0.75rem max(1rem, env(safe-area-inset-bottom));
}
.login-brand {
min-height: clamp(80px, 20vw, 120px);
margin-bottom: 1rem;
}
.login-logo-layer {
padding: clamp(0.75rem, 3vw, 1rem) 0.5rem 0;
}
.login-panel {
max-width: 100%;
padding: 1rem 1rem 1.15rem;
border-radius: 12px;
}
.panel-title { margin-bottom: 0.5rem; }
.login-actions {
gap: 0.4rem;
}
.btn-social {
min-height: 48px;
}
.btn-social-img {
max-height: 90%;
}
.login-or { margin: 0.4rem 0; }
.btn-guest {
width: 62%;
max-width: 62%;
margin-left: 19%;
margin-right: 19%;
min-height: 48px;
}
.login-legal { margin-top: 0.45rem; }
.panel-title-img,
.login-or-img {
max-width: 100%;
}
.login-legal-img {
max-width: min(68%, 200px);
}
.login-char-img {
max-height: 85vh;
}
}
/* มือถือ แนวนอน (landscape) – พาเนลกะทัดรัด ปุ่ม FB+Google แถวเดียวเต็มความกว้าง */
@media (max-width: 896px) and (orientation: landscape) {
.login-page {
padding: max(0.35rem, env(safe-area-inset-top)) 0.75rem max(0.35rem, env(safe-area-inset-bottom));
min-height: 100dvh;
min-height: 100svh;
justify-content: center;
align-items: center;
}
.login-brand {
min-height: clamp(40px, 12vh, 72px);
margin-bottom: 0.35rem;
}
.login-logo-layer {
overflow: hidden;
/* ดึงโลโก้ห่างจากขอบบน: safe-area + ระยะ breath */
padding: max(0.75rem, calc(env(safe-area-inset-top, 0px) + 0.45rem)) max(0.5rem, env(safe-area-inset-right)) 0 max(0.5rem, env(safe-area-inset-left));
align-items: flex-start;
}
.login-logo-layer .brand-jd-img {
max-width: min(68vw, calc(100vw - 1rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
max-height: min(10dvh, 10svh, 48px);
width: auto;
height: auto;
object-fit: contain;
object-position: center top;
margin: 0 auto;
}
.login-panel {
max-width: min(360px, 88vw);
width: 100%;
padding: 0.65rem 1rem 0.75rem;
margin: 0 auto;
}
.panel-title { margin-bottom: 0.35rem; }
.panel-title-img {
max-width: 55%;
}
.login-actions {
flex-direction: row;
align-items: stretch;
gap: 0.35rem;
}
.btn-social {
flex: 1 1 0;
width: auto;
min-width: 0;
min-height: 42px;
}
.btn-social-img {
max-height: 90%;
}
.login-or { margin: 0.25rem 0; }
.btn-guest {
width: 62%;
max-width: 62%;
min-height: 42px;
margin-left: 19%;
margin-right: 19%;
}
.login-legal {
margin-top: 0.3rem;
font-size: clamp(0.52rem, 1.8vh, 0.62rem);
}
.login-legal-img {
max-width: min(65%, 180px);
}
.login-char-img {
max-height: min(58vh, 100dvh - 120px);
object-position: center bottom;
}
}
/* แนวนอนจอเตี้ย (มือถือ/แท็บกว้าง): จำกัดโลโก้ไม่ล้นซ้าย–ขวา */
@media (orientation: landscape) and (max-height: 520px) {
.login-logo-layer {
overflow: hidden;
padding: max(0.75rem, calc(env(safe-area-inset-top, 0px) + 0.45rem)) max(0.5rem, env(safe-area-inset-right)) 0 max(0.5rem, env(safe-area-inset-left));
}
.login-logo-layer .brand-jd-img {
max-width: min(65vw, calc(100vw - 1rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
max-height: min(10dvh, 10svh, 50px);
width: auto;
height: auto;
object-fit: contain;
object-position: center top;
margin: 0 auto;
}
}
/* แท็บเล็ต แนวตั้ง */
@media (min-width: 481px) and (max-width: 768px) {
.login-page {
padding: 1.5rem 1rem;
}
.login-panel {
max-width: 400px;
}
.login-actions {
width: 100%;
}
.panel-title-img,
.login-or-img {
max-width: 340px;
}
.login-legal-img {
max-width: min(70%, 210px);
}
.btn-guest {
width: 62%;
max-width: 62%;
margin-left: 19%;
margin-right: 19%;
}
.login-char-img {
max-height: 78vh;
}
}
/* แท็บเล็ต แนวนอน */
@media (min-width: 769px) and (max-width: 1024px) {
.login-panel {
max-width: 460px;
}
.login-actions {
width: 100%;
}
.panel-title-img,
.login-or-img {
max-width: 360px;
}
.login-legal-img {
max-width: min(72%, 220px);
}
.btn-guest {
width: 62%;
max-width: 62%;
margin-left: 19%;
margin-right: 19%;
}
}
/* จอเล็กมาก – แถวเดียวคงไว้ ลดช่องว่างระหว่างปุ่ม */
@media (max-width: 360px) {
.login-panel {
padding: 1rem 0.75rem;
}
.login-actions {
flex-direction: row;
gap: 0.28rem;
}
.btn-social {
flex: 1 1 0;
min-width: 0;
}
.btn-social-img {
max-height: 44px;
}
}