/* Auth Modal Premium Design */
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 14000;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.auth-modal-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.18);
    position: relative;
    overflow: hidden;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.auth-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    color: #64748b;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

.auth-close-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

.auth-view {
    display: none;
    padding: 32px 28px;
    animation: authFadeIn 0.4s ease forwards;
}

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

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

.auth-header {
    margin-bottom: 24px;
    text-align: center;
}

.auth-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.auth-header p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

/* Segmented Control for Login/Register */
.auth-segmented-control {
    display: flex;
    background: #f1f5f9;
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 24px;
    position: relative;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.auth-tab.active {
    color: #0f172a;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Forms & Inputs */
.auth-input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
    text-align: left;
}

.auth-input-group label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
    margin-left: 2px;
}

.auth-input-group input {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 15px;
    color: #0f172a;
    transition: all 0.2s ease;
    font-family: inherit;
    outline: none;
}

.auth-input-group input:focus {
    border-color: #0F172A;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.1);
}

.auth-input-group input::placeholder {
    color: #94a3b8;
}

.auth-forgot-row {
    display: flex;
    justify-content: flex-end;
    margin-top: -4px;
    margin-bottom: 20px;
}

.auth-forgot-row a {
    font-size: 13px;
    font-weight: 600;
    color: #0F172A;
    text-decoration: none;
    transition: opacity 0.2s;
}

.auth-forgot-row a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Buttons */
.auth-primary-btn {
    width: 100%;
    background: linear-gradient(135deg, #0F172A, #020617);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.auth-primary-btn:hover {
    transform: translateY(-2px);
}

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

.auth-secondary-btn {
    width: 100%;
    background: transparent;
    color: #64748b;
    border: none;
    padding: 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    border-radius: 12px;
    transition: background 0.2s;
}

.auth-secondary-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.auth-danger-btn {
    width: 100%;
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fecaca;
    border-radius: 14px;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 16px;
}

.auth-danger-btn:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

/* Feedback messages */
.auth-error-msg {
    color: #ef4444;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 12px;
    text-align: center;
    min-height: 18px;
}

.auth-success-msg {
    color: #10b981;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
    background: #ecfdf5;
    padding: 10px;
    border-radius: 8px;
}

/* Profile and Success Views */
.auth-success-icon, .auth-profile-avatar {
    font-size: 64px;
    margin-bottom: 16px;
    animation: authBounce 2s infinite ease-in-out;
}

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

.auth-success-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 12px 0;
}

.auth-success-desc {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin: 0 0 24px 0;
}

.auth-profile-label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
}

.auth-profile-email {
    font-size: 18px;
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 32px;
}

/* Settings */
.auth-settings-section {
    text-align: left;
    margin-bottom: 24px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e2e8f0;
}

.auth-settings-title {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.auth-setting-row:last-child {
    margin-bottom: 0;
}

.auth-setting-label {
    display: flex;
    flex-direction: column;
}

.auth-setting-name {
    font-weight: 700;
    color: #0f172a;
    font-size: 15px;
}

.auth-setting-desc {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
}

.premium-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

.auth-select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background-color: #f8fafc;
    color: #0f172a;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    font-family: inherit;
}
.auth-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Toggle Switch */
.auth-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.auth-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.auth-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
}

.auth-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
}

input:checked + .auth-slider {
    background-color: #0F172A;
}

input:checked + .auth-slider:before {
    transform: translateX(20px);
}

.auth-slider.round {
    border-radius: 24px;
}

.auth-slider.round:before {
    border-radius: 50%;
}

/* Button Pulse Animation */
@keyframes buttonPulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 68, 148, 0.6); }
    70% { box-shadow: 0 0 0 12px rgba(0, 68, 148, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 68, 148, 0); }
}

.btn-pulse {
    animation: buttonPulse 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

