/* =============================================
   LOGIN.CSS - Nuansa Biru 3D & Animasi
   Sistem PKL SMKN 1 Purwodadi
   ============================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.login-page {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a1929 0%, #0d2137 25%, #10314f 50%, #0d2137 75%, #0a1929 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    overflow: hidden;
    position: relative;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ============================================
   BACKGROUND ANIMASI - KUBUS 3D
   ============================================ */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    perspective: 1000px;
}

.cube {
    position: absolute;
    width: 80px;
    height: 80px;
    background: rgba(30, 144, 255, 0.08);
    border: 2px solid rgba(30, 144, 255, 0.2);
    border-radius: 10px;
    transform-style: preserve-3d;
    animation: floatCube 20s infinite linear;
    box-shadow: 0 0 30px rgba(30, 144, 255, 0.1);
}

.cube:nth-child(1) { top: 10%; left: 10%; animation-duration: 25s; animation-delay: 0s; width: 60px; height: 60px; }
.cube:nth-child(2) { top: 20%; left: 80%; animation-duration: 30s; animation-delay: 2s; width: 100px; height: 100px; }
.cube:nth-child(3) { top: 60%; left: 15%; animation-duration: 22s; animation-delay: 4s; width: 50px; height: 50px; }
.cube:nth-child(4) { top: 70%; left: 75%; animation-duration: 28s; animation-delay: 1s; width: 90px; height: 90px; }
.cube:nth-child(5) { top: 40%; left: 50%; animation-duration: 35s; animation-delay: 3s; width: 70px; height: 70px; }
.cube:nth-child(6) { top: 85%; left: 45%; animation-duration: 26s; animation-delay: 5s; width: 55px; height: 55px; }

@keyframes floatCube {
    0% {
        transform: translateY(0) rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    25% {
        transform: translateY(-30px) rotateX(90deg) rotateY(45deg) rotateZ(0deg);
    }
    50% {
        transform: translateY(-60px) rotateX(180deg) rotateY(90deg) rotateZ(45deg);
    }
    75% {
        transform: translateY(-30px) rotateX(270deg) rotateY(135deg) rotateZ(0deg);
    }
    100% {
        transform: translateY(0) rotateX(360deg) rotateY(180deg) rotateZ(0deg);
    }
}

/* ============================================
   PARTIKEL MENGAMBANG
   ============================================ */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.particles span {
    position: absolute;
    display: block;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, rgba(30, 144, 255, 0.8), rgba(30, 144, 255, 0));
    border-radius: 50%;
    animation: particleFloat 15s infinite linear;
    box-shadow: 0 0 10px rgba(30, 144, 255, 0.5);
}

.particles span:nth-child(1) { left: 5%; animation-duration: 12s; animation-delay: 0s; }
.particles span:nth-child(2) { left: 15%; animation-duration: 18s; animation-delay: 2s; }
.particles span:nth-child(3) { left: 25%; animation-duration: 14s; animation-delay: 4s; }
.particles span:nth-child(4) { left: 35%; animation-duration: 20s; animation-delay: 1s; }
.particles span:nth-child(5) { left: 45%; animation-duration: 16s; animation-delay: 3s; }
.particles span:nth-child(6) { left: 55%; animation-duration: 22s; animation-delay: 5s; }
.particles span:nth-child(7) { left: 65%; animation-duration: 13s; animation-delay: 2s; }
.particles span:nth-child(8) { left: 75%; animation-duration: 19s; animation-delay: 4s; }
.particles span:nth-child(9) { left: 85%; animation-duration: 17s; animation-delay: 1s; }
.particles span:nth-child(10) { left: 95%; animation-duration: 21s; animation-delay: 3s; }

@keyframes particleFloat {
    0% {
        bottom: -10px;
        opacity: 0;
        transform: translateX(0) scale(0);
    }
    10% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    90% {
        opacity: 1;
    }
    100% {
        bottom: 110%;
        opacity: 0;
        transform: translateX(100px) scale(0.5);
    }
}

/* ============================================
   LOGIN CONTAINER
   ============================================ */
.login-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    perspective: 1500px;
}

.login-wrapper {
    display: flex;
    width: 100%;
    max-width: 950px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(30, 144, 255, 0.2),
        inset 0 0 60px rgba(30, 144, 255, 0.05);
    animation: containerFloat 6s ease-in-out infinite, containerEnter 1s ease-out;
    transform-style: preserve-3d;
}

@keyframes containerEnter {
    from {
        opacity: 0;
        transform: translateY(50px) rotateX(-10deg) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0) scale(1);
    }
}

@keyframes containerFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ============================================
   SISI KIRI - INFO
   ============================================ */
.login-left {
    flex: 1;
    background: linear-gradient(135deg, rgba(13, 71, 161, 0.95), rgba(21, 101, 192, 0.95), rgba(25, 118, 210, 0.95));
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotateBg 20s linear infinite;
}

@keyframes rotateBg {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.login-left::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.logo-3d {
    position: relative;
    z-index: 2;
    margin-bottom: 20px;
    animation: logo3d 4s ease-in-out infinite;
    transform-style: preserve-3d;
}

.logo-3d img {
    height: 110px;
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.4));
    transition: transform 0.5s;
}

.logo-3d:hover img {
    transform: scale(1.1) rotateY(15deg);
}

@keyframes logo3d {
    0%, 100% {
        transform: translateZ(30px) rotateY(0deg);
    }
    50% {
        transform: translateZ(50px) rotateY(10deg);
    }
}

.school-name {
    color: white;
    font-weight: 700;
    font-size: 1.6rem;
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.school-tagline {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    margin-bottom: 35px;
    position: relative;
    z-index: 2;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    z-index: 2;
    width: 100%;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.12);
    padding: 12px 20px;
    border-radius: 12px;
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    transform-style: preserve-3d;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(8px) translateZ(10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.feature-item i {
    font-size: 1.1rem;
    width: 24px;
    color: #64b5f6;
}

/* ============================================
   SISI KANAN - FORM
   ============================================ */
.login-right {
    flex: 1;
    padding: 50px 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(255, 255, 255, 0.98);
    position: relative;
    z-index: 2;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h3 {
    font-weight: 700;
    color: #0d47a1;
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.login-header p {
    color: #78909c;
    font-size: 0.9rem;
    margin: 0;
}

/* FORM */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #37474f;
    font-size: 0.85rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-label i {
    color: #1976d2;
    margin-right: 5px;
}

.input-wrapper {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.3s;
}

.input-wrapper:focus-within {
    transform: translateZ(10px);
}

.input-wrapper .form-control {
    width: 100%;
    padding: 14px 45px 14px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s;
    background: #fafafa;
    font-family: 'Poppins', sans-serif;
}

.input-wrapper .form-control:focus {
    border-color: #1976d2;
    background: white;
    box-shadow: 0 8px 25px rgba(25, 118, 210, 0.15);
    outline: none;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #90a4ae;
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.3s;
}

.input-wrapper:focus-within .input-icon {
    color: #1976d2;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #90a4ae;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.3s;
    padding: 5px;
}

.toggle-password:hover {
    color: #1976d2;
}

/* BUTTON LOGIN */
.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #0d47a1, #1976d2, #2196f3);
    background-size: 200% 200%;
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 20px rgba(25, 118, 210, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    transform-style: preserve-3d;
    animation: buttonGradient 3s ease infinite;
}

@keyframes buttonGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.btn-login:hover {
    transform: translateY(-3px) translateZ(20px);
    box-shadow: 
        0 15px 35px rgba(25, 118, 210, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.3) inset;
}

.btn-login:active {
    transform: translateY(-1px) translateZ(10px);
}

.btn-login i {
    font-size: 1.1rem;
}

/* Efek kilau pada tombol */
.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s;
}

.btn-login:hover .btn-shine {
    left: 100%;
}

/* INFO LOGIN */
.login-info {
    margin-top: 25px;
    padding: 15px;
    background: linear-gradient(135deg, #e3f2fd, #f0f7ff);
    border-radius: 12px;
    border-left: 4px solid #1976d2;
}

.info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0d47a1;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.info-header i {
    color: #1976d2;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.badge-role {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    width: fit-content;
}

.badge-role.admin { background: #ff5252; color: white; }
.badge-role.operator { background: #ff9800; color: white; }
.badge-role.guru { background: #4caf50; color: white; }
.badge-role.siswa { background: #2196f3; color: white; }

.info-item small {
    color: #546e7a;
    font-size: 0.75rem;
    padding-left: 5px;
}

/* FOOTER */
.login-footer {
    text-align: center;
    margin-top: 20px;
    color: #90a4ae;
    font-size: 0.8rem;
}

/* ALERT */
.alert {
    border-radius: 10px;
    font-size: 0.9rem;
    border: none;
    padding: 12px 15px;
    animation: shakeAlert 0.5s;
}

@keyframes shakeAlert {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
        max-width: 450px;
    }
    
    .login-left {
        padding: 35px 25px;
    }
    
    .login-right {
        padding: 35px 25px;
    }
    
    .logo-3d img {
        height: 80px;
    }
    
    .school-name {
        font-size: 1.3rem;
    }
    
    .school-tagline {
        font-size: 0.8rem;
        margin-bottom: 20px;
    }
    
    .features {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    .feature-item {
        padding: 8px 12px;
        font-size: 0.75rem;
        flex: 1;
        min-width: 100px;
        justify-content: center;
    }
    
    .feature-item span {
        display: none;
    }
    
    .feature-item i {
        font-size: 1.2rem;
    }
    
    .login-header h3 {
        font-size: 1.4rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .cube {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 10px;
    }
    
    .login-wrapper {
        border-radius: 20px;
    }
    
    .login-left {
        padding: 25px 20px;
    }
    
    .login-right {
        padding: 25px 20px;
    }
}