/* Login Modal Styles */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.login-modal-overlay.closing {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.login-modal-overlay.active .login-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.login-modal-overlay.closing .login-modal {
    transform: scale(0.95) translateY(10px);
    opacity: 0;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10;
}

.login-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.login-modal-content {
    padding: 48px 40px;
}

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

.login-modal-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #000;
    margin: 0 0 8px 0;
}

.login-modal-header p {
    font-size: 15px;
    color: #666;
    margin: 0;
}

.login-modal-form {
    margin-bottom: 24px;
}

.login-modal-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

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

.login-modal-form input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.login-modal-form input:focus {
    outline: none;
    border-color: #000;
}

.login-modal-form input::placeholder {
    color: #999;
}

.login-modal-btn {
    width: 100%;
    padding: 14px 20px;
    background: #000;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.login-modal-btn:hover:not(:disabled) {
    background: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.login-modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-modal-btn.loading {
    position: relative;
    color: transparent;
}

.login-modal-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.login-modal-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    text-align: center;
}

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

.login-modal-divider span {
    padding: 0 16px;
    color: #666;
    font-size: 13px;
    font-weight: 500;
}

.google-login-btn {
    width: 100%;
    padding: 14px 20px;
    background: white;
    color: #333;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.google-login-btn:hover {
    border-color: #d0d0d0;
    background: #fafafa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.google-login-btn img {
    width: 20px;
    height: 20px;
}

.auth-switch {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #666;
}

.auth-switch a {
    color: #000;
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.login-modal-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

.login-modal-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.login-modal-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.login-modal-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Registration form styles */
.login-modal-form .form-row {
    display: flex;
    gap: 12px;
}

.login-modal-form .form-row .form-group {
    flex: 1;
}

.login-modal-form select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    background-color: white;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    box-sizing: border-box;
}

.login-modal-form select:focus {
    outline: none;
    border-color: #000;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
    padding: 8px 0;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 2px;
    width: 18px;
    height: 18px;
    accent-color: #000;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-label a {
    color: #000;
    text-decoration: underline;
    font-weight: 500;
}

.checkbox-label a:hover {
    color: #333;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .login-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .login-modal-content {
        padding: 32px 24px;
    }
    
    .login-modal-header h1 {
        font-size: 24px;
    }
    
    .login-modal-close {
        top: 16px;
        right: 16px;
    }
}

