/* Reset và biến màu */
:root {
    --primary-color: #6C5CE7;
    --primary-light: #8A7EEA;
    --primary-dark: #5541E0;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --error-color: #ef4444;
    --text-color: #1f2937;
    --light-text-color: #6b7280;
    --input-border: #E5E7EB;
    --input-bg: #FFFFFF;
    --page-bg: #6C5CE7;
    --box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --input-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #0c0024, #270867, #451a91, #270867, #0c0024);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
    overflow: hidden;
}

/* Thêm hiệu ứng nền đẹp */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.05) 10px, transparent 300px),
        radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.05) 10px, transparent 300px),
        radial-gradient(circle at 40% 50%, rgba(255, 255, 255, 0.05) 10px, transparent 200px);
    z-index: -2;
}

#particles {
    display: none;
}

/* Login Form Styles */
.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    position: relative;
    z-index: 2;
    animation: fadeIn 0.5s ease-in-out;
}

.login-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    transform: perspective(1000px) rotateY(0deg);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    backface-visibility: hidden;
    animation: glowAnimation 5s infinite ease-in-out;
}


/* Hiệu ứng đường viền cho form */
.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        var(--primary-color),
        var(--primary-light),
        #ff00de,
        #ff66e5,
        #00ff88,
        #66ffb5,
        #00a1ff,
        #66c7ff,
        var(--primary-color)
    );
    background-size: 100% 800%;
    animation: smoothColorChange 10s infinite linear;
}

@keyframes smoothColorChange {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 0% 100%;
    }
}

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

.login-header h2 {
    color: var(--primary-color);
    font-size: 32px;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: titleBounce 0.8s ease-out;
}
.Backhome {
    background: linear-gradient(90deg, #6C5CE7, #8A7EEA);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
    transition: all 0.3s ease;
    display: block;
    margin: 5px auto 15px;
    text-align: center;
    position: center;
    margin-top: 10px;
    margin-bottom: 0px;
    overflow: hidden;
    letter-spacing: 0.5px;
    width: fit-content;
}

.Backhome:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(108, 92, 231, 0.45);
}

.Backhome:active {
    transform: translateY(1px);
}
.login-header p {
    color: var(--light-text-color);
    font-size: 19px;
    position: relative;
    display: inline-block;
}

.login-header p::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 2px;
    background: var(--primary-color);
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Form Group Styles */
.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding-left: 0;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 14px;
}

.form-group label i {
    color: var(--primary-color);
    margin-right: 8px;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: var(--input-bg);
    color: var(--text-color);
    padding-left: 15px;
    padding-right: 15px;
    box-shadow: var(--input-shadow);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 8px 15px rgba(108, 92, 231, 0.15);
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

.form-group i.fas {
    display: inline-block !important;
}

/* Password container và toggle button */
.password-container {
    position: relative;
    width: 100%;
}

.password-container input {
    padding-right: 45px !important;
    width: 100%;
}

/* Toggle Switch for Remember Me */
.remember-me-container {
    margin-bottom: 24px;
}

.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.05));
}

.toggle-input {
    height: 0;
    width: 0;
    visibility: hidden;
    position: absolute;
}

.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
}

.toggle-inner {
    display: inline-block;
    position: relative;
    width: 40px;
    height: 20px;
    border-radius: 24px;
    background-color: #E5E7EB;
    margin-right: 8px;
    transition: all 0.3s ease;
}

.toggle-inner:before {
    content: '';
    position: absolute;
    left: 2px;
    top: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.toggle-input:checked + .toggle-label .toggle-inner {
    background-color: var(--primary-color);
}

.toggle-input:checked + .toggle-label .toggle-inner:before {
    transform: translateX(20px);
}

.toggle-switch-text {
    color: #6b7280;
    font-size: 14px;
}

/* Login Button với hiệu ứng mới */
button[type="submit"] {
    width: 100%;
    padding: 14px;
    background: linear-gradient(
        90deg,
        #ff00de,
        #6C5CE7,
        #00ff88,
        #6C5CE7,
        #ff00de
    );
    background-size: 300% 100%;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: gradientMove 12s linear infinite;
    box-shadow: 
        0 0 5px rgba(108, 92, 231, 0.5),
        0 0 10px rgba(108, 92, 231, 0.3),
        0 0 15px rgba(108, 92, 231, 0.1),
        inset 0 0 5px rgba(255, 255, 255, 0.2);
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    animation: gradientMove 8s linear infinite;
    box-shadow: 
        0 0 10px rgba(108, 92, 231, 0.6),
        0 0 20px rgba(108, 92, 231, 0.4),
        0 0 30px rgba(108, 92, 231, 0.2),
        inset 0 0 10px rgba(255, 255, 255, 0.3);
}

button[type="submit"]:active {
    transform: translateY(1px);
}

button[type="submit"]::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 10px;
    background: linear-gradient(
        45deg,
        #ff00de,
        #6C5CE7,
        #00ff88,
        #6C5CE7,
        #ff00de
    );
    background-size: 300% 100%;
    z-index: -1;
    animation: gradientMove 12s linear infinite;
    filter: blur(8px);
    opacity: 0.7;
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 150% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Hiệu ứng cho icon trong button */
button[type="submit"] i {
    margin-right: 8px;
    animation: iconGlow 2s ease-in-out infinite;
}

@keyframes iconGlow {
    0%, 100% {
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    }
    50% {
        text-shadow: 0 0 15px rgba(255, 255, 255, 1);
    }
}

/* Loading spinner */
.spinner {
    display: none;
}

button[type="submit"].loading .button-text {
    opacity: 0;
    visibility: hidden;
}

button[type="submit"].loading .spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Select styling */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236C5CE7' width='18px' height='18px'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px !important;
    color: #1f2937;
}

select option {
    color: #1f2937;
}

/* Notification Messages - Kiểu Popup */
.notification {
    position: fixed !important;
    top: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(-100px) !important;
    padding: 15px 20px !important;
    border-radius: 12px !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 90% !important;
    max-width: 400px !important;
    opacity: 0 !important;
    z-index: 999999 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3) !important;
    transition: none !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    pointer-events: all !important;
}

.notification.show {
    transform: translateX(-50%) translateY(0) !important;
    opacity: 1 !important;
    animation: notificationSlideIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards !important;
}

@keyframes notificationSlideIn {
    0% {
        transform: translateX(-50%) translateY(-100px);
        opacity: 0;
    }
    100% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.notification.hide {
    animation: notificationSlideOut 0.5s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards !important;
}

@keyframes notificationSlideOut {
    0% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) translateY(-100px);
        opacity: 0;
    }
}

.error-message {
    background-color: rgba(239, 68, 68, 0.9) !important;
    border-left: 5px solid #ef4444 !important;
}

.success-message {
    background-color: rgba(34, 197, 94, 0.9) !important;
    border-left: 5px solid #22c55e !important;
}

.notification i:first-child {
    margin-right: 12px !important;
    font-size: 20px !important;
    animation: pulseIcon 1.5s infinite ease-in-out !important;
}

@keyframes pulseIcon {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.notification span {
    flex: 1 !important;
    font-weight: 500 !important;
    font-size: 15px !important;
}

.close-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border: none !important;
    color: white !important;
    cursor: pointer !important;
    width: 25px !important;
    height: 25px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0.8 !important;
    transition: all 0.2s ease !important;
    border-radius: 50% !important;
}

.close-btn:hover {
    opacity: 1 !important;
    transform: rotate(90deg) !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
}

/* Fix the form height to avoid jarring transitions */
#loginForm {
    min-height: 320px;
}

/* Responsive */
@media (max-width: 480px) {
    .login-container {
        padding: 10px;
    }

    .login-box {
        padding: 30px 20px;
    }

    .login-header h2 {
        font-size: 24px;
    }
}

/* Điều chỉnh màu chữ trong input */
.form-group input::placeholder {
    color: #9CA3AF;
}

/* Đảm bảo animation cho notifications */
@keyframes slideInDown {
    from {
        transform: translateX(-50%) translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Hiệu ứng đẹp cho toàn màn hình */
@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

.login-container {
    animation: fadeIn 0.5s ease-in-out;
}

/* Password container và toggle button */
.password-container {
    position: relative;
    width: 100%;
}

.password-container input {
    padding-right: 45px !important;
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toggle-password:hover {
    background-color: rgba(108, 92, 231, 0.1);
}

.toggle-password i {
    color: var(--primary-color);
    font-size: 16px;
    display: block !important;
    line-height: 1;
}

.toggle-password:hover i {
    color: var(--primary-dark);
}

/* Mobile optimization */
@media (max-width: 768px) {
    .toggle-password {
        padding: 6px;
    }
    
    .toggle-password i {
        font-size: 14px;
    }
}

/* Hiệu ứng bounce cho tiêu đề khi load trang */
@keyframes titleBounce {
    0% { transform: translateY(-10px); opacity: 0; }
    50% { transform: translateY(5px); opacity: 0.8; }
    100% { transform: translateY(0); opacity: 1; }
}

.login-header h2 {
    animation: titleBounce 0.8s ease-out;
}

/* Thêm hiệu ứng hình học trang trí */
.decorative-shape {
    position: fixed;
    z-index: -1;
    opacity: 0.6;
    pointer-events: none;
}

.shape-1 {
    top: 50px;
    left: 50px;
    width: 150px;
    height: 150px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: linear-gradient(45deg, rgba(108, 92, 231, 0.3), rgba(113, 128, 250, 0.3));
    animation: morphShape 10s linear infinite, floatShape 8s ease-in-out infinite;
}

.shape-2 {
    bottom: 80px;
    right: 60px;
    width: 180px;
    height: 180px;
    border-radius: 30% 70% 37% 63% / 54% 38% 62% 46%;
    background: linear-gradient(45deg, rgba(154, 135, 255, 0.3), rgba(102, 126, 234, 0.3));
    animation: morphShape 15s linear infinite reverse, floatShape 10s ease-in-out infinite;
}

.shape-3 {
    bottom: 200px;
    left: 10%;
    width: 100px;
    height: 100px;
    border-radius: 58% 42% 45% 55% / 61% 39% 61% 39%;
    background: linear-gradient(45deg, rgba(162, 155, 254, 0.3), rgba(108, 92, 231, 0.3));
    animation: morphShape 20s linear infinite, floatShape 12s ease-in-out infinite;
}

.shape-4 {
    top: 150px;
    right: 15%;
    width: 120px;
    height: 120px;
    border-radius: 53% 47% 32% 68% / 25% 46% 54% 75%;
    background: linear-gradient(45deg, rgba(124, 58, 237, 0.3), rgba(162, 155, 254, 0.3));
    animation: morphShape 18s linear infinite reverse, floatShape 15s ease-in-out infinite;
}

@keyframes morphShape {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    25% {
        border-radius: 53% 47% 32% 68% / 25% 46% 54% 75%;
    }
    50% {
        border-radius: 58% 42% 45% 55% / 61% 39% 61% 39%;
    }
    75% {
        border-radius: 30% 70% 37% 63% / 54% 38% 62% 46%;
    }
    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
}

@keyframes floatShape {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(10px, -20px) rotate(5deg);
    }
    66% {
        transform: translate(-15px, 10px) rotate(-5deg);
    }
    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

/* Thêm hiệu ứng ánh sáng */
.login-container::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    pointer-events: none;
    opacity: 0.8;
    animation: pulseLight 5s infinite ease-in-out;
}

@keyframes pulseLight {
    0% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Thêm đường nét trang trí cho login-box */
.login-box::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    right: -20px;
    top: -20px;
    z-index: -1;
}

/* Thêm trang trí họa tiết giáo dục */
.education-icon {
    position: fixed;
    font-size: 32px;
    color: rgba(255, 255, 255, 0.1);
    z-index: -1;
    opacity: 0.6;
    pointer-events: none;
}

.icon-1 {
    top: 10%;
    left: 5%;
    font-size: 24px;
    animation: float 20s infinite ease-in-out;
}

.icon-2 {
    top: 15%;
    right: 8%;
    font-size: 28px;
    animation: float 18s infinite ease-in-out;
    animation-delay: 2s;
}

.icon-3 {
    bottom: 12%;
    left: 10%;
    font-size: 22px;
    animation: float 15s infinite ease-in-out;
    animation-delay: 5s;
}

.icon-4 {
    bottom: 18%;
    right: 12%;
    font-font-size: 26px;
    animation: float 22s infinite ease-in-out;
    animation-delay: 3s;
}

/* Thêm hiệu ứng nhấp nháy cho form */
@keyframes glowAnimation {
    0% {
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), 0 0 20px rgba(108, 92, 231, 0.2);
    }
    100% {
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    }
}

.login-box {
    animation: glowAnimation 5s infinite ease-in-out;
}

/* Floating Particles */
.particle {
    position: fixed;
    pointer-events: none;
    opacity: 0;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
    animation: particleFloat 10s infinite ease-in-out;
}

.particle:nth-child(1) { top: 10%; left: 10%; width: 80px; height: 80px; animation-delay: 0s; }
.particle:nth-child(2) { top: 20%; right: 15%; width: 60px; height: 60px; animation-delay: 2s; }
.particle:nth-child(3) { bottom: 15%; left: 20%; width: 70px; height: 70px; animation-delay: 4s; }
.particle:nth-child(4) { bottom: 25%; right: 25%; width: 50px; height: 50px; animation-delay: 6s; }
.particle:nth-child(5) { top: 50%; left: 30%; width: 65px; height: 65px; animation-delay: 8s; }

/* Glowing Lines */
.glow-line {
    position: fixed;
    width: 2px;
    height: 100px;
    background: linear-gradient(180deg, transparent, #ff00de, transparent);
    animation: glowLineFloat 8s infinite ease-in-out;
}

.glow-line:nth-child(1) { left: 10%; animation-delay: 0s; }
.glow-line:nth-child(2) { left: 25%; animation-delay: 2s; height: 150px; }
.glow-line:nth-child(3) { right: 15%; animation-delay: 4s; }
.glow-line:nth-child(4) { right: 30%; animation-delay: 6s; height: 120px; }

/* Floating Shapes */
.floating-shape {
    position: fixed;
    width: 100px;
    height: 100px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    animation: shapeFloat 20s infinite linear;
    opacity: 0.3;
}

.floating-shape:nth-child(1) {
    top: 15%;
    left: 15%;
    transform: rotate(45deg);
    border-color: rgba(255, 0, 222, 0.2);
}

.floating-shape:nth-child(2) {
    top: 75%;
    right: 10%;
    width: 150px;
    height: 150px;
    border-color: rgba(108, 92, 231, 0.2);
    animation-delay: 5s;
}

.floating-shape:nth-child(3) {
    bottom: 20%;
    left: 20%;
    width: 80px;
    height: 80px;
    border-color: rgba(0, 255, 136, 0.2);
    animation-delay: 10s;
}

/* Star Field */
.star {
    position: fixed;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: starTwinkle 2s infinite ease-in-out;
}

.star:nth-child(1) { top: 10%; left: 20%; }
.star:nth-child(2) { top: 30%; right: 25%; animation-delay: 0.5s; }
.star:nth-child(3) { bottom: 40%; left: 40%; animation-delay: 1s; }
.star:nth-child(4) { bottom: 20%; right: 30%; animation-delay: 1.5s; }
.star:nth-child(5) { top: 50%; left: 50%; animation-delay: 0.7s; }

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes particleFloat {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    50% { transform: translateY(-100px) scale(1.2); opacity: 0.5; }
    100% { transform: translateY(-200px) scale(1); opacity: 0; }
}

@keyframes glowLineFloat {
    0% { transform: translateY(100vh); opacity: 0; }
    50% { opacity: 0.5; }
    100% { transform: translateY(-100vh); opacity: 0; }
}

@keyframes shapeFloat {
    0% { transform: rotate(0deg) translateY(0); }
    50% { transform: rotate(180deg) translateY(-20px); }
    100% { transform: rotate(360deg) translateY(0); }
}

@keyframes starTwinkle {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

/* Thêm overlay cho hiệu ứng depth */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.4) 100%);
    pointer-events: none;
    z-index: 1;
}

/* CSS tối giản cho thiết bị di động */
@media (max-width: 768px) {
    /* Tối ưu hóa background để tránh giật */
    body {
        background: #270867;  /* Màu tĩnh thay vì gradient */
        animation: none !important;  /* Tắt animation nền */
    }
    
    /* Ẩn các hiệu ứng trang trí phức tạp */
    .particle, 
    .glow-line, 
    .floating-shape, 
    .star, 
    .decorative-shape,
    .education-icon,
    .login-container::before,
    .login-box::after,
    body::after,
    body::before {
        display: none !important;
    }
    
    /* Loại bỏ hiệu ứng 3D và animation cho login box */
    .login-box {
        transform: none !important;
        transition: none !important;
        animation: none !important;
        backface-visibility: visible !important;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15) !important;
    }
    
    .login-box:hover {
        transform: none !important;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15) !important;
    }
    
    /* Tối ưu hóa hiệu ứng nút */
    button[type="submit"] {
        background: var(--primary-color) !important;
        animation: none !important;
    }
    
    button[type="submit"]:hover {
        transform: none !important;
        box-shadow: none !important;
        animation: none !important;
    }
    
    button[type="submit"] i {
        animation: none !important;
    }
    
    /* Tối ưu popup thông báo */
    .notification {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    
    /* Đơn giản hóa animation popup thông báo */
    @keyframes notificationSlideIn {
        0% {
            transform: translateX(-50%) translateY(-50px);
            opacity: 0;
        }
        100% {
            transform: translateX(-50%) translateY(0);
            opacity: 1;
        }
    }
    
    @keyframes notificationSlideOut {
        0% {
            transform: translateX(-50%) translateY(0);
            opacity: 1;
        }
        100% {
            transform: translateX(-50%) translateY(-50px);
            opacity: 0;
        }
    }
    
    .notification i:first-child {
        animation: none !important;
    }
    
    /* Tối ưu focus input */
    .form-group input:focus,
    .form-group select:focus {
        transform: none !important;
        box-shadow: 0 0 0 2px var(--primary-color) !important;
    }
    
    /* Đảm bảo loading không gây giật */
    .spinner {
        animation: simpleSpin 1s linear infinite !important;
    }
    
    @keyframes simpleSpin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
    
    /* Fix cho thông báo trên mobile */
    .notification.show {
        display: flex !important;
    }
}

/* Tối ưu hiệu suất cho điện thoại cấu hình thấp */
@media (max-width: 480px) {
    /* Loại bỏ hoàn toàn các hiệu ứng không cần thiết */
    .background-decorations {
        display: none !important;
    }
    
    /* Đơn giản hóa hơn nữa */
    .login-box::before {
        width: 4px !important; /* Giảm kích thước viền */
    }
    
    /* Giảm độ phức tạp của shadow */
    .login-box {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
    }
    
    /* Giảm padding để tối ưu không gian */
    .form-group {
        margin-bottom: 18px !important;
    }
    
    /* Tắt hoàn toàn animations nếu thiết bị yếu */
    @media (prefers-reduced-motion) {
        *, *::before, *::after {
            animation: none !important;
            transition: none !important;
        }
    }
    
    /* Đảm bảo notifications hiển thị đúng trên mobile nhỏ */
    .notification {
        width: 95% !important;
        max-width: 350px !important;
        padding: 12px 15px !important;
    }
}

/* Fix chung cho notification để đảm bảo hoạt động trên tất cả thiết bị */
.notification {
    display: none !important; /* Mặc định ẩn */
}

.notification.show {
    display: flex !important; /* Hiển thị khi có class show */
}