/* ================================
   Login Modal Styles
   ================================ */

/* Modal Overlay */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.95) 0%, rgba(118, 75, 162, 0.95) 50%, rgba(16, 185, 129, 0.95) 100%);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease-in-out;
    overflow-y: auto;
    padding: 20px;
}

.login-modal-overlay.hidden {
    display: none;
}

/* Animated Background Elements */
.login-bg-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.login-shape {
    position: absolute;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.login-shape:nth-child(1) {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.login-shape:nth-child(2) {
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 50%;
    top: 70%;
    right: 15%;
    animation-delay: 4s;
}

.login-shape:nth-child(3) {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    top: 50%;
    left: 80%;
    animation-delay: 2s;
}

.login-shape:nth-child(4) {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    top: 20%;
    right: 25%;
    animation-delay: 6s;
}

/* Modal Container */
.login-modal-container {
    background: white;
    border-radius: 30px;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 100%;
    position: relative;
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* Login Header */
.login-header {
    text-align: center;
    padding: 40px 40px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.login-header::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: rotate 20s linear infinite;
}

.login-logo {
    font-size: 60px;
    margin-bottom: 15px;
    animation: bounce 2s infinite;
    position: relative;
    z-index: 1;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: 'Playfair Display', serif;
    position: relative;
    z-index: 1;
}

.login-subtitle {
    font-size: 14px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* Login Body */
.login-body {
    padding: 40px;
}

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

/* Form Groups */
.login-form-group {
    position: relative;
}

.login-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
}

.login-input-wrapper {
    position: relative;
}

.login-input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #6b7280;
    transition: color 0.3s ease;
}

.login-input {
    width: 100%;
    padding: 15px 15px 15px 50px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.login-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.login-input:focus + .login-input-icon {
    color: #667eea;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #6b7280;
    transition: color 0.3s ease;
    padding: 5px;
}

.password-toggle:hover {
    color: #667eea;
}

/* Remember Me & Forgot Password */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -5px;
}

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

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.remember-me label {
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
    margin: 0;
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #764ba2;
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

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

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

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

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

/* Divider */
.login-divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 25px 0;
    color: #9ca3af;
    font-size: 14px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

/* Guest Access Button */
.guest-access-btn {
    width: 100%;
    padding: 16px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.guest-access-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

/* Footer */
.login-footer {
    text-align: center;
    padding: 20px 40px 40px;
    color: #6b7280;
    font-size: 14px;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: #764ba2;
}

/* Error Message */
.login-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    display: none;
    animation: shake 0.5s ease;
}

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

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

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

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

/* Loading State */
.login-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.login-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-modal-container {
        margin: 20px;
        max-width: 100%;
        border-radius: 20px;
    }

    .login-header {
        padding: 30px 25px 20px;
    }

    .login-logo {
        font-size: 50px;
    }

    .login-title {
        font-size: 24px;
    }

    .login-body {
        padding: 30px 25px;
    }

    .login-footer {
        padding: 15px 25px 30px;
    }

    .login-options {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .login-modal-overlay {
        padding: 10px;
    }

    .login-header {
        padding: 25px 20px 15px;
    }

    .login-logo {
        font-size: 40px;
    }

    .login-title {
        font-size: 22px;
    }

    .login-subtitle {
        font-size: 13px;
    }

    .login-body {
        padding: 25px 20px;
    }

    .login-input {
        padding: 13px 13px 13px 45px;
        font-size: 15px;
    }

    .login-btn,
    .guest-access-btn {
        padding: 14px;
        font-size: 15px;
    }
}
