* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    overscroll-behavior: none;
    position: fixed;
}

body {
    background: radial-gradient(ellipse at bottom, #0d1d31 0%, #0c0d13 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #e2e8f0;
}

.container {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

/* Shooting Stars Background */
.stars-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    transform: rotateZ(45deg);
    z-index: 0;
    pointer-events: none;
}

.star {
    position: absolute;
    left: 50%;
    top: 50%;
    height: 2px;
    background: linear-gradient(-45deg, #0ff, rgba(0, 0, 255, 0));
    border-radius: 999px;
    box-shadow: 0 0 5px #0ff;
    animation: tail 3s ease-in-out infinite, falling 3s ease-in-out infinite;
    will-change: transform, width;
}

.star::before {
    content: '';
    position: absolute;
    top: calc(50% - 1px);
    right: 0;
    height: 2px;
    background: linear-gradient(-45deg, rgba(0, 0, 255, 0), #0ff, rgba(0, 0, 255, 0));
    transform: translateX(50%) rotateZ(45deg);
    border-radius: 100%;
    animation: shining 3s ease-in-out infinite;
}

.star::after {
    content: '';
    position: absolute;
    top: calc(50% - 1px);
    right: 0;
    height: 2px;
    background: linear-gradient(-45deg, rgba(0, 0, 255, 0), #0ff, rgba(0, 0, 255, 0));
    transform: translateX(50%) rotateZ(-45deg);
    border-radius: 100%;
    animation: shining 3s ease-in-out infinite;
}

@keyframes tail {
    0% { width: 0; }
    30% { width: 100px; }
    100% { width: 0; }
}

@keyframes falling {
    0% { transform: translateX(0); }
    100% { transform: translateX(300px); }
}

@keyframes shining {
    0% { width: 0; }
    50% { width: 30px; }
    100% { width: 0; }
}

/* Randomizing stars */
.star:nth-child(1) { top: calc(50% - 200px); left: calc(50% - 300px); animation-delay: 0s; }
.star:nth-child(2) { top: calc(50% - 100px); left: calc(50% - 250px); animation-delay: 1.2s; }
.star:nth-child(3) { top: calc(50% - 50px); left: calc(50% - 100px); animation-delay: 0.4s; }
.star:nth-child(4) { top: calc(50% + 150px); left: calc(50% - 200px); animation-delay: 1.8s; }
.star:nth-child(5) { top: calc(50% + 50px); left: calc(50% - 150px); animation-delay: 2.4s; }
.star:nth-child(6) { top: calc(50% + 200px); left: calc(50% - 50px); animation-delay: 0.8s; }
.star:nth-child(7) { top: calc(50% - 250px); left: calc(50% - 10px); animation-delay: 2.7s; }
.star:nth-child(8) { top: calc(50% + 250px); left: calc(50% - 100px); animation-delay: 1.5s; }


/* Futuristic Login Box */
.login-box {
    position: relative;
    z-index: 10;
    background: rgba(10, 15, 30, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 12px;
    padding: 50px 40px;
    width: 100%;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1), inset 0 0 10px rgba(0, 255, 255, 0.05);
    transform: translateY(30px);
    opacity: 0;
    animation: slideUpFade 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.login-box h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: 500;
    margin-bottom: 8px;
    text-align: center;
    letter-spacing: 2px;
    color: #0ff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.login-box p {
    font-size: 13px;
    font-weight: 300;
    color: #94a3b8;
    text-align: center;
    margin-bottom: 35px;
    letter-spacing: 0.5px;
}

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

.input-field {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: 8px;
    padding: 4px 16px;
    transition: all 0.3s ease;
}

.input-field:focus-within {
    border-color: #0ff;
    background: rgba(0, 255, 255, 0.05);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2), inset 0 0 5px rgba(0, 255, 255, 0.1);
}

.input-field.error {
    border-color: #f0f;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.2);
    animation: glitch-shake 0.3s ease-in-out;
}

@keyframes glitch-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px) skewX(2deg); }
    40% { transform: translateX(4px) skewX(-2deg); }
    60% { transform: translateX(-4px) skewX(2deg); }
    80% { transform: translateX(4px) skewX(-2deg); }
}

.input-field i {
    color: #475569;
    font-size: 16px;
    transition: color 0.3s ease;
}

.input-field:focus-within i:first-child {
    color: #0ff;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.6);
}

.input-field input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    padding: 14px 12px;
    color: #e2e8f0;
    font-size: 14px;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}

.input-field input::placeholder {
    color: #475569;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.5px;
}

.toggle-password {
    cursor: pointer;
    padding: 5px;
}

.toggle-password:hover {
    color: #0ff;
}

.error-text {
    display: block;
    color: #f0f;
    font-size: 11px;
    margin-top: 6px;
    margin-left: 4px;
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease, margin-top 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    text-shadow: 0 0 5px rgba(255, 0, 255, 0.5);
}

.input-group.show-error .error-text {
    height: 16px;
    margin-top: 6px;
    opacity: 1;
}

.options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    font-size: 12px;
    font-weight: 300;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    cursor: pointer;
}

.remember-me input {
    appearance: none;
    width: 14px;
    height: 14px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.remember-me input:checked {
    background: rgba(0, 255, 255, 0.2);
    border-color: #0ff;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
}

.remember-me input:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 4px;
    width: 3px;
    height: 6px;
    border: solid #0ff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}


.login-btn {
    width: 100%;
    padding: 15px;
    border: 1px solid #0ff;
    border-radius: 8px;
    background: rgba(0, 255, 255, 0.05);
    color: #0ff;
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.1);
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.4), transparent);
    transition: all 0.5s ease;
}

.login-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.4), inset 0 0 10px rgba(0, 255, 255, 0.2);
    text-shadow: 0 0 8px #0ff;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:active {
    transform: scale(0.98);
}

.login-btn.loading span {
    opacity: 0;
}

.loader {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0,255,255,0.1);
    border-radius: 50%;
    border-top-color: #0ff;
    animation: spin 0.8s linear infinite;
    display: none;
}

.login-btn.loading {
    background: rgba(0, 255, 255, 0.1);
}

.login-btn.loading .loader {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.datetime-display {
    margin-top: 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: inset 0 0 15px rgba(0, 255, 255, 0.05);
}

.datetime-display > div:first-child {
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #475569;
    font-family: 'Orbitron', sans-serif;
}

.datetime-display > div:last-child {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px !important;
    font-weight: 500 !important;
    letter-spacing: 3px;
    color: #0ff !important;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
}

/* Responsiveness for Mobile Devices */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .login-box {
        padding: 35px 25px;
    }
    
    .login-box h2 {
        font-size: 24px;
    }
    
    .login-box p {
        font-size: 12px;
        margin-bottom: 25px;
    }
    
    .input-field input {
        font-size: 13px;
        padding: 12px 10px;
    }
    
    .login-btn {
        padding: 12px;
        font-size: 14px;
    }
    
    .datetime-display {
        padding: 10px;
    }
    
    .datetime-display > div:last-child {
        font-size: 15px !important;
    }
}
