/* Authentication Modal Styles */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(55, 65, 81, 0.6));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.auth-modal-content {
    position: relative;
    background: linear-gradient(145deg, var(--surface-color, #ffffff), rgba(255, 255, 255, 0.95));
    border-radius: 28px;
    box-shadow: 
        0 32px 80px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    max-width: 650px;
    width: 92%;
    max-height: 92vh;
    overflow: hidden;
    animation: modalSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem 2.5rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    position: relative;
}

.auth-modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 2.5rem;
    right: 2.5rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(55, 65, 81, 0.2), transparent);
}

.auth-modal-header h2 {
    margin: 0;
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary, #1f2937), #374151);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.auth-modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.5rem;
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    padding: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(10px);
}

.auth-modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.auth-modal-body {
    padding: 2rem 2.5rem 2.5rem;
    max-height: calc(92vh - 120px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(55, 65, 81, 0.3) transparent;
}

.auth-modal-body::-webkit-scrollbar {
    width: 6px;
}

.auth-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.auth-modal-body::-webkit-scrollbar-thumb {
    background: rgba(55, 65, 81, 0.3);
    border-radius: 3px;
}

.auth-toggle {
    display: flex;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(247, 250, 252, 0.6));
    border-radius: 20px;
    padding: 6px;
    margin-bottom: 2.5rem;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.06),
        0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-tab {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.auth-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color, #374151), #4b5563);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 16px;
}

.auth-tab span {
    position: relative;
    z-index: 1;
}

.auth-tab.active {
    background: linear-gradient(135deg, var(--primary-color, #374151), #4b5563);
    color: white;
    box-shadow: 
        0 4px 16px rgba(55, 65, 81, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.auth-tab.active::before {
    opacity: 1;
}

.auth-tab:hover:not(.active) {
    background: rgba(55, 65, 81, 0.1);
    color: var(--primary-color, #374151);
    transform: translateY(-1px);
}

.auth-form-section {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary, #1f2937);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid rgba(229, 231, 235, 0.6);
    border-radius: 16px;
    font-size: 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(249, 250, 251, 0.8));
    color: var(--text-primary, #1f2937);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-sizing: border-box;
    backdrop-filter: blur(10px);
    font-weight: 500;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color, #374151);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 
        0 0 0 4px rgba(55, 65, 81, 0.12),
        0 4px 16px rgba(55, 65, 81, 0.1);
    transform: translateY(-1px);
}

.form-group input:hover:not(:focus),
.form-group select:hover:not(:focus),
.form-group textarea:hover:not(:focus) {
    border-color: rgba(55, 65, 81, 0.3);
    transform: translateY(-1px);
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin-bottom: 0 !important;
}

.checkbox-label input[type="checkbox"] {
    width: auto !important;
    margin: 0;
}

.auth-form-actions {
    margin-top: 2rem;
    text-align: center;
}

.auth-submit-btn {
    background: linear-gradient(135deg, var(--primary-color, #374151), var(--primary-hover, #4b5563));
    color: white;
    border: none;
    padding: 1.2rem 2.5rem;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-width: 160px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 24px rgba(55, 65, 81, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.auth-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-hover, #4b5563), #374151);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 12px 32px rgba(55, 65, 81, 0.4),
        0 4px 16px rgba(0, 0, 0, 0.15);
}

.auth-submit-btn:hover:not(:disabled)::before {
    left: 100%;
}

.auth-submit-btn:active:not(:disabled) {
    transform: translateY(-1px) scale(0.98);
}

.auth-submit-btn:disabled {
    background: linear-gradient(135deg, #9ca3af, #d1d5db);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

.auth-status {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
}

.auth-status.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.auth-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.auth-status.loading {
    background: rgba(55, 65, 81, 0.1);
    color: var(--primary-color, #374151);
    border: 1px solid rgba(55, 65, 81, 0.3);
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes modalFadeIn {
    0% { 
        opacity: 0;
    }
    100% { 
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    0% { 
        opacity: 0;
        transform: translateY(-40px) scale(0.9) rotateX(10deg);
        filter: blur(10px);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-10px) scale(0.95) rotateX(2deg);
        filter: blur(2px);
    }
    100% { 
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
        filter: blur(0px);
    }
}

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

@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .auth-modal-content {
        width: 95%;
        margin: 1rem;
        border-radius: 24px;
    }
    
    .auth-modal-header {
        padding: 2rem 1.5rem 1.2rem;
    }
    
    .auth-modal-body {
        padding: 1.5rem 1.5rem 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .auth-modal-header h2 {
        font-size: 1.8rem;
    }
    
    .auth-tab {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .auth-submit-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .auth-modal-content {
        width: 96%;
        margin: 0.5rem;
        border-radius: 20px;
    }
    
    .auth-modal-header {
        padding: 1.5rem 1rem 1rem;
    }
    
    .auth-modal-body {
        padding: 1rem 1rem 1.5rem;
    }
    
    .auth-modal-header h2 {
        font-size: 1.6rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.9rem 1rem;
        font-size: 0.95rem;
    }
    
    .auth-toggle {
        border-radius: 16px;
        margin-bottom: 2rem;
    }
    
    .auth-tab {
        border-radius: 12px;
        padding: 0.7rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* Logout Button Styles */
.cta-button.logout-button {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cta-button.logout-button:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3);
}