/* Auth Modal Styles */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-overlay.show {
    display: flex;
    opacity: 1;
}

.auth-modal {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    padding: 45px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 0 100px rgba(30, 64, 175, 0.1);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.auth-overlay.show .auth-modal {
    transform: scale(1);
}

.auth-modal .close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #888;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

.auth-modal .close-btn:hover {
    color: #333;
}

.auth-modal h2 {
    text-align: center;
    margin: 0 0 30px;
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-tabs {
    display: flex;
    background: #e8ecff;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 30px;
    position: relative;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 12px 20px;
    background: none;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    z-index: 2;
    position: relative;
}

.auth-tab.active {
    background: #1e40af;
    color: white;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.3);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

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

.password-group {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    z-index: 10;
}

.password-toggle:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.05);
}

.password-group input {
    padding-right: 45px !important;
}

.auth-modal .form-group input,
.auth-form input,
input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100% !important;
    padding: 18px 20px !important;
    border: 2px solid #e0e7ff !important;
    border-radius: 15px !important;
    font-size: 16px !important;
    background: #ffffff !important;
    color: #000000 !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important;
    -webkit-text-fill-color: #000000 !important;
}

.auth-modal input::-webkit-input-placeholder,
.auth-form input::-webkit-input-placeholder {
    color: #6b7280 !important;
    -webkit-text-fill-color: #6b7280 !important;
}

.auth-modal input::-moz-placeholder,
.auth-form input::-moz-placeholder {
    color: #6b7280 !important;
}

.auth-modal input:-ms-input-placeholder,
.auth-form input:-ms-input-placeholder {
    color: #6b7280 !important;
}

.auth-modal input::placeholder,
.auth-form input::placeholder {
    color: #6b7280 !important;
}

.form-group input:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-group input::placeholder {
    color: #9ca3af;
}

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    border: none;
    padding: 18px 24px;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.4);
}

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

.submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
}

.loading.show {
    display: flex;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #1e40af;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

.auth-switch a {
    color: #1e40af;
    text-decoration: none;
    font-weight: 500;
}

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

.forgot-password-link {
    text-align: right;
    margin-bottom: 20px;
}

.forgot-password-link a {
    color: #1e40af;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.forgot-password-link a:hover {
    text-decoration: underline;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert.success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .auth-modal {
        margin: 20px;
        padding: 30px 25px;
    }
    
    .auth-modal h2 {
        font-size: 24px;
    }
}