/* Auth Pages Styling - Reset Password */
/* NOTE: These rules are scoped to .auth-page to prevent layout
   conflicts on other pages where auth.css is loaded globally
   for the auth modal styles */

body.auth-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-primary, #18181b);
    /* Site-wide standard */
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-card {
    background-color: #1a1a1a;
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(229, 9, 20, 0.15);
}

.auth-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.back-link {
    color: #888;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.back-link:hover {
    color: #e50914;
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
}

.auth-description {
    color: #aaa;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Error Message */
.error-message {
    background-color: #2d1f1f;
    border-left: 4px solid #e50914;
    padding: 1rem;
    border-radius: 4px;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.error-message svg {
    color: #e50914;
    flex-shrink: 0;
    margin-top: 2px;
}

.error-message p {
    margin: 0;
    color: #ffffff;
    line-height: 1.5;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #ddd;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #e50914;
    background-color: #333;
}

.form-control::placeholder {
    color: #666;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    background-color: #2a2a2a;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.strength-fill {
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-text {
    font-size: 0.75rem;
    color: #888;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #e50914;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #c4070f;
}

.btn-primary:disabled {
    background-color: #555;
    cursor: not-allowed;
}

/* Footer */
.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}

.auth-footer p {
    margin: 0;
}

.auth-footer a {
    color: #e50914;
    text-decoration: none;
    font-weight: 500;
}

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

/* Messages */
.message {
    padding: 0.875rem 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: none;
}

.message.success {
    background-color: #1f2d1f;
    color: #4ade80;
    border-left: 4px solid #4ade80;
}

.message.error {
    background-color: #2d1f1f;
    color: #f87171;
    border-left: 4px solid #e50914;
}

/* =====================================================
   AUTH MODAL STYLES (moved from auth_modal.php)
   ===================================================== */
.auth-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9998;
}

.auth-modal-overlay.open {
    display: block;
}

.auth-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 420px;
    background: #1a1c22;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    z-index: 9999;
    padding: 30px;
    max-height: 90vh;
    overflow-y: auto;
}

.auth-modal.open {
    display: block;
}

.auth-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 4px 10px;
    line-height: 1;
    transition: color 0.2s;
}

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

/* Tabs */
.auth-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.auth-tab {
    padding: 10px 24px;
    background: transparent;
    border: none;
    color: #888;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.auth-tab:hover {
    color: #fff;
}

.auth-tab.active {
    background: #2a2d35;
    color: #fff;
}

/* Google Button */
.auth-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: rgba(66, 133, 244, 0.1);
    border: 1px solid rgba(66, 133, 244, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.auth-google-btn:hover {
    background: rgba(66, 133, 244, 0.2);
    border-color: rgba(66, 133, 244, 0.5);
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
    color: #555;
    font-size: 12px;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #333;
}

/* Turnstile Container */
.turnstile-container {
    display: flex;
    justify-content: center;
    margin: 16px 0;
    min-height: 65px;
}

/* Form Fields */
.auth-field {
    margin-bottom: 16px;
}

.auth-field label {
    display: block;
    margin-bottom: 6px;
    color: #888;
    font-size: 13px;
}

.auth-field input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.auth-field input:focus {
    outline: none;
    border-color: #8a2128;
}

.auth-field input::placeholder {
    color: #555;
}

/* Remember Me + Forgot Password Row */
.auth-remember {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 16px 0;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #888;
    font-size: 13px;
    cursor: pointer;
}

.remember-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #8a2128;
    cursor: pointer;
}

.remember-label span {
    user-select: none;
}

/* Forgot Password */
.auth-forgot {
    background: transparent;
    border: none;
    color: #e50914;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s;
}

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

/* Resend Activation Section */
.auth-resend-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #333;
    text-align: center;
}

.resend-help {
    display: block;
    color: #888;
    font-size: 12px;
    margin-bottom: 8px;
}

.auth-resend-btn {
    background: transparent;
    border: 1px solid #555;
    color: #aaa;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-resend-btn:hover {
    border-color: #888;
    color: #fff;
}

/* Resend Panel */
.resend-panel-header {
    margin-bottom: 16px;
}

.resend-back-btn {
    background: transparent;
    border: none;
    color: #888;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
}

.resend-back-btn:hover {
    color: #fff;
}

.resend-panel-desc {
    color: #888;
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.resend-submit-btn {
    width: 100%;
    justify-content: center;
}

/* Success Message */
.auth-success {
    display: none;
    padding: 10px 14px;
    background: rgba(39, 174, 96, 0.1);
    border: 1px solid rgba(39, 174, 96, 0.3);
    border-radius: 6px;
    color: #27ae60;
    font-size: 13px;
    margin-bottom: 16px;
}

.auth-success.show {
    display: block;
}

/* Error Message */
.auth-error {
    display: none;
    padding: 10px 14px;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 6px;
    color: #dc3545;
    font-size: 13px;
    margin-bottom: 16px;
}

.auth-error.show {
    display: block;
}

/* Actions */
.auth-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
}

.auth-btn-secondary {
    padding: 12px 20px;
    background: #2a2d35;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.auth-btn-secondary:hover {
    background: #3a3d45;
}

.auth-btn-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #8a2128;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.auth-btn-primary:hover {
    background: #6e1a20;
}

.auth-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-modal {
        max-width: calc(100% - 32px);
        padding: 24px 20px;
    }

    .auth-actions {
        flex-direction: column-reverse;
    }

    .auth-btn-secondary,
    .auth-btn-primary {
        width: 100%;
        justify-content: center;
    }
}