/* ========================================
   COSMIC LOGIN PAGE - GLASSMORPHISM STYLE
   Theme: Tử Vi / Astrology
   ======================================== */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Wrapper */
.login-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Background Image */
.login-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/assets/images/login-bg.webp');
    /* OPTION 1: Luôn hiển thị đầy đủ ảnh (không crop) */
    /*background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1a1a2e; */
    /* Màu nền phụ cho phần trống */
    /* OPTION 2: Phủ kín màn hình (có thể crop) - Uncomment 2 dòng dưới và comment 3 dòng trên */
    background-size: cover;
    background-position: center;
    z-index: 1;
}

/* Optional: Add overlay để làm tối background một chút */
.login-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: 2;
}

/* Container */
.login-container {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Login Card - Glassmorphism */
.login-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 50px 40px;
    width: 100%;
    max-width: 460px;
    box-shadow: 
        0 8px 32px 0 rgba(31, 38, 135, 0.37),
        0 0 100px rgba(218, 165, 32, 0.15),
        inset 0 0 40px rgba(255, 255, 255, 0.05);
    animation: fadeInUp 0.8s ease-out;
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    text-shadow: 
        0 0 20px rgba(218, 165, 32, 0.5),
        0 0 40px rgba(218, 165, 32, 0.3);
    letter-spacing: 1px;
}

.login-subtitle {
    font-size: 25px;
    color: #FFD700;
    margin: 0;
    font-weight: 600;
    letter-spacing: 2px;
    text-shadow: 
        0 0 15px rgba(255, 215, 0, 0.6),
        0 0 30px rgba(255, 215, 0, 0.3);
}
/*.login-subtitle {
    font-size: 25px;
    color: #FFD700;
    margin: 0;
    font-weight: 700;
    letter-spacing: 3px;*/
    /* 3D Effect - Layered shadows */
    /*text-shadow:*/
    /* Layer 1: Depth effect (3D) */
    /*1px 1px 0 #CC9900, 2px 2px 0 #B38600, 3px 3px 0 #997300, 4px 4px 0 #806000, 5px 5px 0 #664D00,*/
    /* Layer 2: Glow effect */
    /*0 0 20px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.5), 0 0 60px rgba(255, 215, 0, 0.3),*/
    /* Layer 3: Soft shadow */
    /*6px 6px 10px rgba(0, 0, 0, 0.5);*/
    /* Transform for more depth */
    /*transform: translateZ(0);
    position: relative;
}*/
/* Form */
.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 24px;
}

/* Input Wrapper */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 18px;
    color: rgba(255, 255, 255, 0.6);
    pointer-events: none;
    z-index: 2;
}

/* Input Fields */
.form-input {
    width: 100%;
    padding: 16px 18px 16px 52px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #ffffff;
    font-size: 15px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

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

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

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    font-size: 14px;
}

/* Remember Me Checkbox */
.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #DAA520;
}

.checkbox-label {
    user-select: none;
}

/* Forgot Password Link */
.forgot-password {
    color: rgba(218, 165, 32, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #DAA520;
    text-shadow: 0 0 10px rgba(218, 165, 32, 0.5);
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #DAA520 0%, #B8860B 100%);
    border: none;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(218, 165, 32, 0.3), 0 0 30px rgba(218, 165, 32, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 25px rgba(218, 165, 32, 0.4),
        0 0 50px rgba(218, 165, 32, 0.3);
}

.btn-login:hover::before {
    width: 300px;
    height: 300px;
}

.btn-login:active {
    transform: translateY(0);
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 24px;
    overflow: hidden;
}

.login-footer p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* Author Credits with Scrolling Animation */
.author-credits {
    width: 100%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.author-scroll {
    display: inline-block;
    white-space: nowrap;
    animation: scrollText 15s linear infinite;
}

.author-scroll span {
    color: rgba(255, 215, 0, 0.9);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

@keyframes scrollText {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.register-link {
    color: #DAA520;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.register-link:hover {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(218, 165, 32, 0.5);
}

/* Cosmic Particles Animation */
.cosmic-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}
.particle {
    position: absolute;
    width: 12px;
    height: 12px;
    /* Tạo hình ngôi sao bằng CSS */
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    animation: float 10s infinite ease-in-out;
}
    /*.particle::before {
        content: '⭐';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.6));
    }*/

    /* Alternative: Dùng ★ nếu muốn ngôi sao đơn giản hơn */
    /* .particle::before {
    content: '★';
} */

    /* Alternative: Dùng ✨ nếu muốn sparkle */
    .particle::before {
        content: '✨';
        
    } 

.particle:nth-child(1) {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    top: 40%;
    left: 80%;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    top: 60%;
    left: 30%;
    animation-delay: 4s;
}

.particle:nth-child(4) {
    top: 80%;
    left: 70%;
    animation-delay: 6s;
}

.particle:nth-child(5) {
    top: 30%;
    left: 50%;
    animation-delay: 8s;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    50% {
        transform: translateY(-100px) translateX(50px);
        opacity: 0.5;
    }
    90% {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .login-card {
        padding: 40px 30px;
        max-width: 400px;
        border-radius: 20px;
    }

    .login-title {
        font-size: 28px;
    }

    .form-input {
        padding: 14px 16px 14px 48px;
        font-size: 14px;
    }

    .btn-login {
        padding: 14px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
        max-width: 100%;
        border-radius: 16px;
    }

    .login-title {
        font-size: 24px;
    }

    .login-subtitle {
        font-size: 13px;
    }

    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .form-input {
        padding: 12px 14px 12px 44px;
        font-size: 14px;
    }

    .btn-login {
        padding: 12px;
        font-size: 14px;
        letter-spacing: 1.5px;
    }
}

/* Dark theme compatibility */
@media (prefers-color-scheme: dark) {
    .login-card {
        background: rgba(20, 20, 40, 0.4);
        border-color: rgba(255, 255, 255, 0.15);
    }
}
