/* Auth Modal Styling */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.auth-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal-container {
    background: var(--pc-card, #fff);
    width: 100%;
    max-width: 420px;
    border-radius: 20px;
    padding: 40px;
    position: relative;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.auth-modal-overlay.active .auth-modal-container {
    transform: translateY(0);
}

.auth-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--pc-muted, #9ca3af);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--pc-text, #222);
}

.auth-modal-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    border-bottom: 1.5px solid var(--pc-line, #f3f4f6);
}

.auth-tab-btn {
    background: none;
    border: none;
    padding: 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--pc-muted, #9ca3af);
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.auth-tab-btn.active {
    color: var(--primary-color, #17a34a);
}

.auth-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1.5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color, #17a34a);
}

.auth-tab-content {
    display: none;
}

.auth-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-input-group {
    margin-bottom: 20px;
}

.auth-input-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--pc-text, #222);
}

.auth-input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--pc-line, #e5e7eb);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s;
}

.auth-input-group input:focus {
    border-color: var(--primary-color, #17a34a);
    outline: none;
    box-shadow: 0 0 0 4px rgba(23, 163, 74, 0.1);
}

.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 13px;
}

.auth-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--pc-muted, #6b7280);
}

.auth-options a {
    color: var(--primary-color, #17a34a);
    text-decoration: none;
}

.auth-submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary-color, #17a34a);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-submit-btn:hover {
    background: #15803d;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(23, 163, 74, 0.2);
}

.auth-submit-btn.loading span {
    display: none;
}

.auth-submit-btn .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.auth-submit-btn.loading .spinner {
    display: block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.auth-message {
    margin-top: 15px;
    font-size: 14px;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    display: none;
}

.auth-message.error {
    display: block;
    background: #fee2e2;
    color: #b91c1c;
}

.auth-message.success {
    display: block;
    background: #dcfce7;
    color: #15803d;
}

/* Dark Mode support */
[data-theme="dark"] .auth-modal-container {
    background: #1f2937;
}

[data-theme="dark"] .auth-input-group input {
    background: #111827;
    border-color: #374151;
    color: #fff;
}

[data-theme="dark"] .auth-tab-btn {
    color: #9ca3af;
}

[data-theme="dark"] .auth-input-group label,
[data-theme="dark"] .auth-tab-btn.active {
    color: #f3f4f6;
}

/* Password Toggle */
.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-input-wrapper input {
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--pc-text-light, #666);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 5;
}

.password-toggle:hover {
    color: var(--primary-color, #22c55e);
}

[data-theme="dark"] .password-toggle {
    color: #999;
}

[data-theme="dark"] .password-toggle:hover {
    color: var(--primary-color, #22c55e);
}

.password-toggle svg {
    display: block;
}