/**
 * LoginModal.css
 * Styles for the login/registration modal
 */

/* Modal Container */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
}

/* Modal Overlay */
.login-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
}

/* Modal Content */
.login-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Close Button */
.login-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.login-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Views */
.login-view {
    padding: 40px 30px;
    animation: fadeIn 0.3s ease;
}

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

/* Typography */
.login-view h1 {
    color: white;
    font-size: 32px;
    margin: 0 0 10px 0;
    text-align: center;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.login-view h2 {
    color: white;
    font-size: 24px;
    margin: 0 0 25px 0;
    text-align: center;
    font-weight: 500;
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    margin-bottom: 30px;
    font-size: 14px;
}

/* Buttons */
.login-btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: none;
    margin-bottom: 12px;
}

.btn-icon {
    font-size: 20px;
}

.login-btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.login-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.login-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Auth Buttons Container */
.login-auth-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.login-auth-buttons .login-btn {
    margin-bottom: 0;
}

/* Divider */
.login-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.login-divider span {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    padding: 0 15px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    position: relative;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

/* Forms */
.login-form {
    margin-top: 20px;
}

.login-form-group {
    margin-bottom: 20px;
}

.login-form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.login-form-group input[type="text"],
.login-form-group input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: white;
    font-size: 14px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.login-form-group input:focus {
    outline: none;
    border-color: #3498db;
    background: rgba(0, 0, 0, 0.3);
}

.login-form-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.login-input-hint {
    display: block;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

/* Checkbox */
.login-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    cursor: pointer;
}

.login-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Form Footer */
.login-form-footer {
    margin-top: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-link-btn {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    text-decoration: none;
    transition: color 0.3s;
}

.login-link-btn:hover {
    color: #5dade2;
    text-decoration: underline;
}

.login-separator {
    color: rgba(255, 255, 255, 0.3);
}

/* Error Messages */
.login-error {
    margin-top: 15px;
    padding: 10px;
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.5);
    border-radius: 4px;
    color: #e74c3c;
    font-size: 14px;
    text-align: center;
}

/* Success View */
.login-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    box-shadow: 0 4px 20px rgba(46, 204, 113, 0.4);
    animation: successPulse 0.5s ease;
}

@keyframes successPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#login-success-message {
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin-bottom: 20px;
}

/* Loading Overlay */
.login-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 100;
}

.login-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

#login-loading-text {
    color: white;
    font-size: 14px;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .login-modal-content {
        width: 95%;
        margin: 10px;
    }

    .login-view {
        padding: 30px 20px;
    }

    .login-auth-buttons {
        grid-template-columns: 1fr;
    }

    .login-view h1 {
        font-size: 28px;
    }

    .login-view h2 {
        font-size: 20px;
    }
}

/* Dark scrollbar for modal */
.login-modal-content::-webkit-scrollbar {
    width: 8px;
}

.login-modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.login-modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.login-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}