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

body {
    opacity: 0;
    
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #000810;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 20px 0;
    position: relative;
}

body.loaded {
    opacity: 1;
}

/* Lava Lamp Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: radial-gradient(ellipse at top, #001a2e 0%, #000810 50%);
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.7;
    animation: float-blob 20s ease-in-out infinite;
}

.blob1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 174, 0, 0.4) 0%, transparent 70%);
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.blob2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(6, 169, 245, 0.3) 0%, transparent 70%);
    top: 60%;
    right: 15%;
    animation-delay: -5s;
}

.blob3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(250, 254, 188, 0.2) 0%, transparent 70%);
    bottom: 10%;
    left: 30%;
    animation-delay: -10s;
}

.blob4 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(255, 145, 0, 0.3) 0%, transparent 70%);
    top: 40%;
    right: 30%;
    animation-delay: -15s;
}

@keyframes float-blob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(100px, -80px) scale(1.1);
    }
    50% {
        transform: translate(-50px, 100px) scale(0.9);
    }
    75% {
        transform: translate(-100px, -50px) scale(1.05);
    }
}

.logo-img {
    width: 150px;
    height: 150px;
    border-radius: 75%;
    box-shadow: 0 8px 24px rgba(255, 174, 0, 0.4);
    transition: transform 0.3s ease;
    margin-bottom: -75px;
    position: relative;
    z-index: 2;
}

.logo-img:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(255, 174, 0, 0.6);
}

.container {
    text-align: center;
    background: rgba(0, 47, 71, 0.4);
    border: 1px solid rgba(255, 174, 0, 0.2);
    padding-top: 100px;
    padding-left: 50px;
    padding-right: 50px;
    padding-bottom: 50px;
    border-radius: 20px;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    max-width: 450px;
    width: 90%;
    flex-shrink: 0;
    margin-top: auto;
    margin-bottom: auto;
    position: relative;
    z-index: 2;
}

h1 {
    color: white;
    margin-bottom: 30px;
    font-size: 28px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(255, 174, 0, 0.3);
    border-radius: 10px;
    background: rgba(250, 254, 188, 0.1);
    color: white;
    font-size: 16px;
    outline: none;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    transition: opacity 0.3s ease;
}

.input-group input:focus {
    background: rgba(250, 254, 188, 0.15);
    box-shadow: 0 0 20px rgba(255, 174, 0, 0.3);
    border: 2px solid #ffae00;
    outline: none;
}

.input-group input:focus::placeholder {
    opacity: 0;
}

.input-group input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.login-button {
    background: linear-gradient(135deg, #ffae00 0%, #ff9100 100%);
    color: #000;
    border: none;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255, 174, 0, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.login-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 174, 0, 0.5);
}

.login-button:active {
    transform: translateY(-1px);
}

.login-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.login-button span {
    position: relative;
    z-index: 1;
}

.footer {
    padding: 20px 0;
    text-align: center;
    color: white;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.footer a {
    color: #06a9f5;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #ffae00;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background: linear-gradient(135deg, rgba(0, 81, 112, 0.95) 0%, rgba(0, 47, 71, 0.95) 100%);
    margin: 15% auto;
    padding: 30px;
    border-radius: 15px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 174, 0, 0.2);
    color: white;
    text-align: center;
}

.close {
    color: #ffae00;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #ff9100;
}

.modal-content h2 {
    margin-bottom: 20px;
}

.modal-content a {
    color: #ffae00;
    text-decoration: none;
    transition: color 0.3s ease;
}

.modal-content a:hover {
    color: #06a9f5;
}

.error-message {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.2);
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.error-message.show {
    display: block;
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #ffae00;
    animation: spin 1s ease-in-out infinite;
}

/* Loading Screen */
.loading-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000810;
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-screen.active {
    display: flex;
}

.loading-content {
    text-align: center;
}

.loading-title {
    font-size: 32px;
    color: #ffae00;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #ffae00 0%, #06a9f5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.progress-bar-container {
    width: 400px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #ffae00 0%, #06a9f5 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 174, 0, 0.6);
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.loading-text {
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
}

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