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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: #f5f6fa;
}

@keyframes gradientShift {
    0%, 100% {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    }
    33% {
        background: linear-gradient(135deg, #764ba2 0%, #f093fb 50%, #667eea 100%);
    }
    66% {
        background: linear-gradient(135deg, #f093fb 0%, #667eea 50%, #764ba2 100%);
    }
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../img/headbg.18bd6fe4.jpg') no-repeat center center;
    background-size: cover;
    opacity: 0.2;
    z-index: 0;
    animation: backgroundFloat 20s ease-in-out infinite;
}

@keyframes backgroundFloat {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.1) rotate(1deg);
    }
}

body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.7) 0%, rgba(118, 75, 162, 0.7) 50%, rgba(240, 147, 251, 0.7) 100%);
    z-index: 0;
}

.back-home {
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: 10;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 10px;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.back-home:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.back-home i {
    margin-right: 10px;
    font-size: 18px;

}

.login-container {
    width: 420px;
    padding: 40px 30px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    position: relative;
    z-index: 2;
    border: 1px solid #e0e3ed;
}

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

.login-container:hover {
    box-shadow: 0 35px 100px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

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

.login-header img {
    width: 240px;
    margin-bottom: 25px;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.1));
}



.login-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}


.form-item {
    position: relative;
    margin-bottom: 25px;
}





.form-item input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 1px solid #e0e3ed;
    border-radius: 5px;
    font-size: 15px;
    background: #f8f9fb;
    transition: border 0.2s;
}

.form-item input:focus {
    outline: none;
    border-color: #4f6ef7;
    background: #fff;
}

.form-item input::placeholder {
    color: #999;
    font-weight: 400;
}

.form-item i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 1;
}

.form-item:focus-within i {
    color: #764ba2;
    transform: translateY(-50%) scale(1.1);
}


.login-btn {
    width: 100%;
    padding: 14px;
    background: #4f6ef7;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
    overflow: hidden;
    box-shadow: none;
}


.login-btn:hover {
    background: #3956c6;
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.error-message {
    min-height: 20px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #d93025;
    text-align: left;
}

.error-message.active {
    color: #d93025;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-admin {
    text-align: center;
    margin-top: 30px;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.contact-admin a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-admin a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.loading {
    display: none !important;
}

.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.shape:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 8s;
}

.shape:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
    animation-duration: 10s;
}

.shape:nth-child(3) {
    width: 60px;
    height: 60px;
    top: 80%;
    left: 20%;
    animation-delay: 4s;
    animation-duration: 6s;
}

.shape:nth-child(4) {
    width: 100px;
    height: 100px;
    top: 10%;
    right: 30%;
    animation-delay: 6s;
    animation-duration: 12s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .login-container {
        width: 95%;
        padding: 20px 8px;
        margin: 10px;
        border-radius: 5px;
    }
    .login-header img {
        width: 140px;
    }
    .login-header h1 {
        font-size: 20px;
    }
    .back-home {
        top: 10px;
        left: 10px;
        padding: 8px 12px;
        font-size: 13px;
        border-radius: 5px;
    }
    .form-item input {
        padding: 10px 10px 10px 36px;
        font-size: 15px;
        border-radius: 5px;
    }
    .login-btn {
        padding: 10px;
        font-size: 15px;
        border-radius: 5px;
    }
}