@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600&display=swap');

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-light: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.8);
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Prompt', sans-serif; }

body { 
    background-color: var(--bg-light); 
    color: var(--text-main); 
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
ul { list-style: none; }

/* Header & Navigation */
header {
    width: 100%; 
    padding: 1.2rem 10%; 
    display: flex;
    justify-content: space-between; 
    align-items: center;
    background-color: var(--glass); 
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo { 
    font-size: 1.5rem; 
    font-weight: 600; 
    color: var(--primary); 
    letter-spacing: -0.5px;
}

.desktop-menu { display: flex; gap: 2.5rem; align-items: center; }
.desktop-menu li a { 
    font-weight: 400; 
    color: var(--text-muted); 
    font-size: 0.95rem;
}
.desktop-menu li a:hover { color: var(--primary); }

.hamburger { display: none; cursor: pointer; font-size: 1.5rem; color: var(--text-main); }

/* Mobile Menu */
.mobile-menu-overlay {
    position: fixed; top: 0; right: -100%; width: 100%; height: 100vh;
    background-color: var(--white); z-index: 1001; transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2rem;
    display: flex; flex-direction: column;
}
.mobile-menu-overlay.active { right: 0; }
.close-btn { align-self: flex-end; font-size: 2rem; cursor: pointer; margin-bottom: 2rem; }
.mobile-links { display: flex; flex-direction: column; gap: 1.5rem; text-align: center; font-size: 1.2rem; }

/* Main Landing / Container */
.hero-section {
    padding: 120px 20px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-main);
    background: linear-gradient(to right, #1e293b, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-section p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Forms (Login/Register) */
.container { 
    display: flex; 
    justify-content: center; 
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 40px 20px; 
}

.register-box {
    background: var(--white); 
    padding: 3rem; 
    width: 100%; 
    max-width: 450px;
    box-shadow: var(--shadow); 
    border-radius: 1.5rem;
}

.register-box h2 { 
    text-align: center; 
    margin-bottom: 2rem; 
    font-weight: 600;
    color: var(--text-main);
}

.form-group { margin-bottom: 1.5rem; }
.form-group label { 
    display: block; 
    margin-bottom: 0.5rem; 
    font-weight: 500; 
    font-size: 0.9rem;
    color: var(--text-main);
}

.form-group input, .form-group textarea {
    width: 100%; 
    padding: 0.8rem 1rem; 
    border: 1.5px solid #e2e8f0; 
    border-radius: 0.75rem; 
    font-size: 1rem;
    transition: all 0.2s ease;
    outline: none;
    background-color: #fcfcfc;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    background-color: var(--white);
}

.btn-submit {
    width: 100%; 
    padding: 1rem; 
    background-color: var(--primary); 
    color: white;
    border: none; 
    border-radius: 0.75rem; 
    font-size: 1rem; 
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-submit:hover { 
    background-color: var(--primary-hover); 
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.alert { 
    padding: 1rem; 
    margin-bottom: 1.5rem; 
    border-radius: 0.75rem; 
    font-size: 0.9rem;
    text-align: center; 
}
.alert.success { background-color: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert.error { background-color: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* Responsive */
@media screen and (max-width: 768px) {
    header { padding: 1rem 5%; }
    .desktop-menu { display: none; }
    .hamburger { display: block; }
    .hero-section h1 { font-size: 2.2rem; }
    .register-box { padding: 2rem; }
}

/* ตั้งค่าเริ่มต้น: ซ่อนปุ่มกลับสำหรับมือถือในหน้าจอคอมพิวเตอร์ */
.mobile-nav-back {
    display: none;
}

.mobile-nav-back a {
    color: var(--primary);
    font-weight: 500;
    font-size: 0.95rem;
}

/* ส่วนปรับแต่งเมื่อเป็นหน้าจอมือถือ */
@media screen and (max-width: 768px) {
    /* .desktop-menu จะถูกสั่ง display: none; โดยโค้ดเดิมของคุณอยู่แล้ว */
    
    /* สั่งให้ปุ่มกลับหน้าหลักแสดงผลเฉพาะบนมือถือ */
    .mobile-nav-back {
        display: block;
    }
}