/* =============================================
   สไตล์พื้นฐาน
   ============================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* =============================================
   การแจ้งเตือนและข้อความ
   ============================================= */
.error-notification {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid rgba(255, 107, 107, 0.3);
    text-align: left;
}

.success-notification {
    background: rgba(46, 213, 115, 0.2);
    color: #2ed573;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid rgba(46, 213, 115, 0.3);
    text-align: left;
}

/* =============================================
   พื้นหลังแอนิเมชัน
   ============================================= */
/* ดาวระยิบระยับ */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

.star:nth-child(1) { width: 2px; height: 2px; top: 20%; left: 20%; animation-delay: 0s; }
.star:nth-child(2) { width: 3px; height: 3px; top: 30%; left: 60%; animation-delay: 1s; }
.star:nth-child(3) { width: 2px; height: 2px; top: 50%; left: 10%; animation-delay: 2s; }
.star:nth-child(4) { width: 4px; height: 4px; top: 70%; left: 80%; animation-delay: 0.5s; }
.star:nth-child(5) { width: 2px; height: 2px; top: 10%; left: 70%; animation-delay: 1.5s; }
.star:nth-child(6) { width: 3px; height: 3px; top: 80%; left: 30%; animation-delay: 2.5s; }
.star:nth-child(7) { width: 2px; height: 2px; top: 40%; left: 90%; animation-delay: 0.8s; }
.star:nth-child(8) { width: 3px; height: 3px; top: 60%; left: 40%; animation-delay: 1.8s; }

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* ภูเขา */
.mountains {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    z-index: 2;
}

.mountain {
    position: absolute;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
}

.mountain:nth-child(1) {
    left: 0;
    width: 200px;
    height: 150px;
    clip-path: polygon(0% 100%, 50% 20%, 100% 100%);
}

.mountain:nth-child(2) {
    left: 150px;
    width: 250px;
    height: 200px;
    clip-path: polygon(0% 100%, 40% 0%, 100% 100%);
}

.mountain:nth-child(3) {
    right: 100px;
    width: 180px;
    height: 120px;
    clip-path: polygon(0% 100%, 60% 30%, 100% 100%);
}

.mountain:nth-child(4) {
    right: 0;
    width: 220px;
    height: 160px;
    clip-path: polygon(0% 100%, 30% 10%, 100% 100%);
}

/* ต้นไม้ */
.trees {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20%;
    z-index: 3;
}

.tree {
    position: absolute;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.tree:nth-child(1) { left: 5%; width: 40px; height: 80px; }
.tree:nth-child(2) { left: 15%; width: 60px; height: 100px; }
.tree:nth-child(3) { left: 25%; width: 50px; height: 90px; }
.tree:nth-child(4) { right: 20%; width: 45px; height: 85px; }
.tree:nth-child(5) { right: 10%; width: 55px; height: 95px; }
.tree:nth-child(6) { right: 5%; width: 35px; height: 70px; }

/* =============================================
   ฟอร์มเข้าสู่ระบบ
   ============================================= */
.login-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    width: 400px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    z-index: 10;
    position: relative;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-title {
    font-size: 2rem;
    color: white;
    margin-bottom: 30px;
    font-weight: 300;
    letter-spacing: 2px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.form-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.input-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px 0;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
}

.remember-me input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #9c88ff;
}

.forgot-password {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: white;
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #9c88ff 0%, #8c7ae6 100%);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(156, 136, 255, 0.4);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(156, 136, 255, 0.6);
}

.register-link {
    margin-top: 25px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.register-link a {
    color: #9c88ff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.register-link a:hover {
    color: white;
}

/* =============================================
   การแสดงผลบนอุปกรณ์เคลื่อนที่
   ============================================= */
@media (max-width: 480px) {
    .login-container {
        width: 90%;
        padding: 30px 20px;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
}