* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('https://images.unsplash.com/photo-1492496913980-501348b61469?q=80&w=1887&auto=format&fit=crop') no-repeat center center/cover;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    position: relative;
}

body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 0;
    /* Đặt lớp phủ ở phía sau */
}

.main-content {
    position: relative;
    z-index: 1;
    /* Nội dung chính ở trên lớp phủ */
    width: 100%;
}

.main-header {
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 10;
    /* Đặt header ở lớp trên cùng để đảm bảo có thể nhấp vào */
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
}

.main-header .container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header .logo {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
}

.main-header .logo i {
    margin-right: 8px;
    color: #a5d6a7;
}

.main-header .nav-btn {
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 1px solid white;
    color: white;
    background: transparent;
    white-space: nowrap;
    /* Prevent text from wrapping */
}

.main-header .nav-btn:hover {
    background: white;
    color: #673ab7;
}

.main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    padding-top: 80px;
    padding-left: 15px;
    padding-right: 15px;
}

.auth-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.1);
    max-width: 420px;
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.form-container {
    padding: 40px 35px;
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.form-container.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-title {
    text-align: center;
    color: white;
    margin-bottom: 25px;
    font-size: 1.8rem;
    font-weight: 600;
}

.form-instructions {
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 25px;
    font-size: 0.9rem;
    line-height: 1.5;
}

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

.form-group.forgot-password-link {
    text-align: right;
    margin-top: -15px;
    margin-bottom: 20px;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    color: white;
}

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

.form-group input:focus {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
}

.message {
    font-size: 0.9rem;
    margin-top: 8px;
    padding-left: 5px;
    min-height: 1.2em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    text-align: center;
    margin-bottom: 15px;
}

.error-message {
    color: #ffcccc;
}

.success-message {
    color: #d4edda;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.auth-toggle {
    text-align: center;
    margin-top: 25px;
    color: rgba(255, 255, 255, 0.8);
}

.auth-toggle-link {
    color: white;
    cursor: pointer;
    font-weight: 600;
    text-decoration: underline;
    background: none;
    border: none;
    font-size: inherit;
    font-family: inherit;
}

.auth-toggle-link:hover {
    color: #e8eaf6;
}

/* Mobile Responsive Fix */
@media (max-width: 480px) {
    .main-header .logo {
        font-size: 1.2rem;
        /* Make logo smaller */
    }

    .main-header .logo i {
        margin-right: 5px;
        /* Reduce space next to icon */
    }

    .main-header .nav-btn {
        padding: 6px 12px;
        /* Make button smaller */
        font-size: 0.8rem;
        /* Make button text smaller */
    }
}