/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Login Screen Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Background Video */
.background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.login-box {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 30px 35px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 100%;
    max-width: 380px;
    position: relative;
    z-index: 2;
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.logo-container {
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-logo {
    max-width: 280px;
    max-height: 160px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.2));
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
}

.main-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 15px 30px rgba(102, 126, 234, 0.4));
}

.login-header p {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin-top: 0;
    opacity: 0.95;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

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

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 600;
    color: #fff;
    font-size: 14px;
    margin-left: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    font-size: 16px;
    color: #9ca3af;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

.input-wrapper input:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.8);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.95);
}

.input-wrapper input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.toggle-password {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #9ca3af;
    transition: all 0.3s ease;
    padding: 4px;
    border-radius: 6px;
}

.toggle-password:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.error-message {
    color: #dc2626;
    font-size: 13px;
    text-align: center;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.3);
    display: none;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.error-message.show {
    display: block;
    animation: shake 0.6s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.login-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn.loading {
    cursor: not-allowed;
    opacity: 0.9;
}

.btn-loading {
    display: none;
}

.login-btn.loading .btn-text {
    display: none;
}

.login-btn.loading .btn-loading {
    display: inline;
}

/* Responsive Design for Login */
@media (max-width: 768px) {
    .login-box {
        padding: 25px 30px;
        margin: 15px;
        max-width: 350px;
        border-radius: 18px;
    }

    .main-logo {
        max-width: 250px;
        max-height: 140px;
    }

    .logo-container {
        margin-bottom: 18px;
    }

    .login-header p {
        font-size: 15px;
    }

    .login-form {
        gap: 16px;
    }

    .input-wrapper input {
        padding: 11px 14px 11px 38px;
        font-size: 14px;
    }

    .input-icon {
        left: 12px;
        font-size: 15px;
    }

    .toggle-password {
        right: 12px;
        font-size: 15px;
    }

    .login-btn {
        padding: 13px 18px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 22px 25px;
        max-width: 320px;
        border-radius: 16px;
        margin: 10px;
    }

    .main-logo {
        max-width: 220px;
        max-height: 120px;
    }

    .logo-container {
        margin-bottom: 15px;
    }

    .login-header p {
        font-size: 14px;
    }

    .login-form {
        gap: 15px;
    }

    .input-wrapper input {
        padding: 10px 12px 10px 36px;
        font-size: 13px;
        border-radius: 10px;
    }

    .input-icon {
        left: 11px;
        font-size: 14px;
    }

    .toggle-password {
        right: 11px;
        font-size: 14px;
    }

    .login-btn {
        padding: 12px 16px;
        font-size: 13px;
        border-radius: 10px;
    }

    .error-message {
        font-size: 12px;
        padding: 8px 12px;
    }
}