/**
 * ArtGraduates.com Dark Mode Stylesheet
 * Version 015 - 06 Feb 2026
 * Complete dark mode implementation with CSS custom properties
 * Colors: Black (#1a1a1a), White (#ffffff), Pink accent (#ff6fce)
 * 
 * v015 changes:
 * - Added dark mode overrides for notification pages:
 *   deleted.php, verify-email.php, resend-verification.php
 * - All notification text now uses --text-primary/secondary for readability
 * - Dashboard table borders overridden for dark mode
 * 
 * v014 changes:
 * - Added --bg/text/border-alert-warning CSS variables (light + dark)
 * - Enables dark mode support for submit.php success/verification message
 * 
 * Previous versions: see git history
 */

/* ===== CSS CUSTOM PROPERTIES (Light Mode Default) ===== */
:root {
    /* Background colors */
    --bg-body: linear-gradient(135deg, #f8f8f8, #eaeaea);
    --bg-body-solid: #f0f0f0;
    --bg-container: #ffffff;
    --bg-header: #ffffff;
    --bg-footer: #f5f5f5;
    --bg-input: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f5f5f5;
    --bg-meta: #f0f0f0;
    --bg-meta-category: #ffe5e5;
    --bg-btn-secondary: #f0f0f0;
    --bg-btn-secondary-hover: #e0e0e0;
    --bg-filter-btn: #333333;
    --bg-filter-btn-hover: #555555;
    --bg-social: #f0f0f0;
    --bg-social-hover: #d33;
    --bg-back-to-top: rgba(221, 51, 51, 0.8);
    --bg-back-to-top-hover: rgba(221, 51, 51, 1);
    --bg-alert-success: #d4edda;
    --bg-alert-error: #f8d7da;
    --bg-alert-warning: #fff8e1;
    --bg-cookie-banner: rgba(51, 51, 51, 0.98);
    --bg-overlay: rgba(0, 0, 0, 0.85);
    --bg-ad-space: #f9f9f9;
    --bg-pagination: #ffffff;
    --bg-pagination-active: #d33;
    --bg-turnstile: transparent;
    --bg-faq-toc: #f9f9f9;
    
    /* Text colors */
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #888888;
    --text-light: #999999;
    --text-heading: #222222;
    --text-inverse: #ffffff;
    --text-meta: #666666;
    --text-meta-category: #d33;
    --text-alert-success: #155724;
    --text-alert-error: #721c24;
    --text-alert-warning: #f57c00;
    --text-footer: #555555;
    --text-link: #d33;
    --text-link-hover: #a22;
    
    /* Accent colors */
    --accent-primary: #d33;
    --accent-primary-hover: #a22;
    --accent-selected: #FFD700;
    --accent-selected-gradient: linear-gradient(135deg, #FFD700, #FFA500);
    
    /* Border colors */
    --border-color: #dddddd;
    --border-color-light: #f0f0f0;
    --border-input: #dddddd;
    --border-input-focus: #d33;
    --border-card: transparent;
    --border-featured: #d33;
    --border-selected: #FFD700;
    --border-alert-success: #c3e6cb;
    --border-alert-error: #f5c6cb;
    --border-alert-warning: #ffe082;
    --border-ad-space: #dddddd;
    --border-pagination: #dddddd;
    
    /* Shadow colors */
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
    --shadow-card-hover: 0 8px 16px rgba(0, 0, 0, 0.15);
    --shadow-selected: 0 4px 12px rgba(255, 215, 0, 0.3);
    --shadow-back-to-top: 0 4px 12px rgba(0, 0, 0, 0.3);
    
    /* Form specific */
    --form-bg: #ffffff;
    --form-border: #dddddd;
    --form-text: #333333;
    --form-placeholder: #999999;
    
    /* Logo - controlled by JS */
    --logo-filter: none;
    
    /* Theme toggle specific - using accent colors instead of gray */
    --toggle-bg: rgba(221, 51, 51, 0.1);
    --toggle-bg-active: #ff6fce;
    --toggle-icon: #d33;
    --toggle-icon-active: #ffffff;
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
    /* Background colors */
    --bg-body: #121212;
    --bg-body-solid: #121212;
    --bg-container: #1e1e1e;
    --bg-header: #1a1a1a;
    --bg-footer: #0d0d0d;
    --bg-input: #2a2a2a;
    --bg-card: #1e1e1e;
    --bg-hover: #2a2a2a;
    --bg-meta: #2a2a2a;
    --bg-meta-category: rgba(255, 111, 206, 0.15);
    --bg-btn-secondary: #2a2a2a;
    --bg-btn-secondary-hover: #3a3a3a;
    --bg-filter-btn: #ff6fce;
    --bg-filter-btn-hover: #ff8fd9;
    --bg-social: #2a2a2a;
    --bg-social-hover: #ff6fce;
    --bg-back-to-top: rgba(255, 111, 206, 0.85);
    --bg-back-to-top-hover: #ff6fce;
    --bg-alert-success: rgba(39, 174, 96, 0.2);
    --bg-alert-error: rgba(231, 76, 60, 0.2);
    --bg-alert-warning: rgba(255, 152, 0, 0.15);
    --bg-cookie-banner: rgba(30, 30, 30, 0.98);
    --bg-overlay: rgba(0, 0, 0, 0.9);
    --bg-ad-space: #1e1e1e;
    --bg-pagination: #1e1e1e;
    --bg-pagination-active: #ff6fce;
    --bg-turnstile: #2a2a2a;
    --bg-faq-toc: #252525;
    
    /* Text colors */
    --text-primary: #f0f0f0;
    --text-secondary: #cccccc;
    --text-muted: #999999;
    --text-light: #777777;
    --text-heading: #ffffff;
    --text-inverse: #1a1a1a;
    --text-meta: #aaaaaa;
    --text-meta-category: #ff6fce;
    --text-alert-success: #27ae60;
    --text-alert-error: #e74c3c;
    --text-alert-warning: #ffb74d;
    --text-footer: #cccccc;
    --text-link: #ff6fce;
    --text-link-hover: #ff8fd9;
    
    /* Accent colors */
    --accent-primary: #ff6fce;
    --accent-primary-hover: #ff8fd9;
    --accent-selected: #FFD700;
    --accent-selected-gradient: linear-gradient(135deg, #FFD700, #FFA500);
    
    /* Border colors */
    --border-color: #3a3a3a;
    --border-color-light: #2a2a2a;
    --border-input: #3a3a3a;
    --border-input-focus: #ff6fce;
    --border-card: #2a2a2a;
    --border-featured: #ff6fce;
    --border-selected: #FFD700;
    --border-alert-success: rgba(39, 174, 96, 0.3);
    --border-alert-error: rgba(231, 76, 60, 0.3);
    --border-alert-warning: rgba(255, 152, 0, 0.3);
    --border-ad-space: #3a3a3a;
    --border-pagination: #3a3a3a;
    
    /* Shadow colors */
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
    --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-selected: 0 4px 12px rgba(255, 215, 0, 0.2);
    --shadow-back-to-top: 0 4px 12px rgba(0, 0, 0, 0.5);
    
    /* Form specific */
    --form-bg: #2a2a2a;
    --form-border: #3a3a3a;
    --form-text: #f0f0f0;
    --form-placeholder: #777777;
    
    /* Theme toggle specific */
    --toggle-bg: #3a3a3a;
    --toggle-bg-active: #ff6fce;
    --toggle-icon: #cccccc;
    --toggle-icon-active: #1a1a1a;
}

/* ===== THEME TOGGLE BUTTON ===== */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    margin-left: 15px;
    background: var(--toggle-bg);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: var(--accent-primary);
    transform: scale(1.1);
}

.theme-toggle:hover .theme-toggle-icon {
    color: var(--text-inverse);
}

.theme-toggle-icon {
    width: 20px;
    height: 20px;
    color: var(--toggle-icon);
    transition: color 0.3s ease, transform 0.3s ease;
}

.theme-toggle:hover .theme-toggle-icon {
    transform: rotate(15deg);
}

/* Sun icon (shown in dark mode) */
.theme-toggle .icon-sun {
    display: none;
}

/* Moon icon (shown in light mode) */
.theme-toggle .icon-moon {
    display: block;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .theme-toggle {
        width: 32px;
        height: 32px;
        margin-left: 10px;
    }
    
    .theme-toggle-icon {
        width: 18px;
        height: 18px;
    }
}

/* ===== APPLY CSS VARIABLES TO ELEMENTS ===== */

/* Body */
body {
    background: var(--bg-body);
    color: var(--text-primary);
}

[data-theme="dark"] body {
    background: var(--bg-body);
}

/* Links */
a {
    color: var(--text-link);
}

a:hover {
    color: var(--text-link-hover);
}

/* Header */
.header {
    background: var(--bg-header);
    box-shadow: var(--shadow-sm);
}

.nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
}

/* ===== NAVIGATION STYLES - LIGHT MODE ===== */
.nav a:hover {
    color: #d33 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}

.nav a.active {
    color: #d33 !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

/* Submit button in nav - Light mode */
.btn-submit {
    background-color: #d33;
    color: white !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

/* Unified button hover - lift and brighten */
.btn-submit:hover {
    background-color: #e55 !important;
    color: white !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-submit:hover span {
    color: white !important;
}

/* Light mode - active submit button - same fill color, just bold text */
.btn-submit.active {
    background-color: #d33 !important;
    text-decoration: none !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Light mode - active submit button text styling */
.btn-submit.active span {
    font-weight: 700 !important;
    color: white !important;
}

/* ===== NAVIGATION STYLES - DARK MODE ===== */
[data-theme="dark"] .nav a {
    color: #e0e0e0;
    font-weight: 500;
}

[data-theme="dark"] .nav a:hover {
    color: #ff6fce !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}

[data-theme="dark"] .nav a.active {
    color: #ff6b6b !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

/* Dark mode - Submit button */
[data-theme="dark"] .btn-submit {
    background-color: #ff6fce !important;
    color: #000000 !important;
}

/* Dark mode - Submit button hover - lift and brighten, NO text change */
[data-theme="dark"] .btn-submit:hover {
    background-color: #ff8fd8 !important;
    color: #000000 !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

[data-theme="dark"] .btn-submit:hover span {
    color: #000000 !important;
}

/* Dark mode - Submit button active */
[data-theme="dark"] .btn-submit.active {
    background-color: #ff6fce !important;
    text-decoration: none !important;
    transform: none !important;
    box-shadow: none !important;
}

[data-theme="dark"] .btn-submit.active span {
    color: #000000 !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

/* ===== BUTTON HOVER EFFECTS - DARK MODE ===== */
/* btn-view (View Profile) */
[data-theme="dark"] .btn-view {
    background-color: #ff6fce !important;
    color: #000000 !important;
    transition: all 0.2s ease;
}

[data-theme="dark"] .btn-view:hover {
    background-color: #ff8fd8 !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* btn-website */
[data-theme="dark"] .btn-website {
    background-color: #2a2a2a !important;
    color: #e0e0e0 !important;
    transition: all 0.2s ease;
}

[data-theme="dark"] .btn-website:hover {
    background-color: #3a3a3a !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* profile-website-btn (Visit Artist's Website) */
[data-theme="dark"] .profile-website-btn {
    background-color: #ff6fce !important;
    color: #000000 !important;
    transition: all 0.2s ease;
}

[data-theme="dark"] .profile-website-btn:hover {
    background-color: #ff8fd8 !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Toast notifications in dark mode */
[data-theme="dark"] .toast-notification.success {
    background: rgba(39, 174, 96, 0.2) !important;
    color: #27ae60 !important;
    border-color: rgba(39, 174, 96, 0.3) !important;
}

[data-theme="dark"] .toast-notification.success .close-btn {
    color: #27ae60 !important;
}

[data-theme="dark"] .toast-notification.error {
    background: rgba(231, 76, 60, 0.2) !important;
    color: #e74c3c !important;
    border-color: rgba(231, 76, 60, 0.3) !important;
}

[data-theme="dark"] .toast-notification.error .close-btn {
    color: #e74c3c !important;
}

/* Containers */
.container {
    background: var(--bg-container);
    box-shadow: var(--shadow-md);
}

/* Intro box */
.intro-box h1 {
    color: var(--text-heading);
}

.intro-box p {
    color: var(--text-primary);
}

/* Filter box */
.search-input,
.filter-select {
    background-color: var(--bg-input);
    border-color: var(--border-input);
    color: var(--text-primary);
}

.search-input:focus,
.filter-select:focus {
    border-color: var(--border-input-focus);
}

.search-input::placeholder {
    color: var(--form-placeholder);
}

.btn-filter {
    background-color: var(--bg-filter-btn);
    color: var(--text-inverse);
}

.btn-filter:hover {
    background-color: var(--bg-filter-btn-hover);
}

.btn-reset {
    background-color: var(--bg-btn-secondary);
    color: var(--text-secondary);
}

.btn-reset:hover {
    background-color: var(--bg-btn-secondary-hover);
    color: var(--text-primary);
}

.results-count {
    color: var(--text-secondary);
}

/* Artist cards */
.artist-card {
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-card);
}

.artist-card:hover {
    box-shadow: var(--shadow-card-hover);
}

.artist-card.featured {
    border-color: var(--border-featured);
}

.artist-card.selected {
    border-color: var(--border-selected);
    box-shadow: var(--shadow-selected);
}

.featured-badge {
    background-color: var(--accent-primary);
    color: var(--text-inverse);
}

.artist-image {
    background-color: var(--bg-hover);
}

.artist-name a {
    color: var(--text-heading);
}

.artist-name a:hover {
    color: var(--accent-primary);
}

.meta-country {
    background-color: var(--bg-meta);
    color: var(--text-meta);
}

.meta-category {
    background-color: var(--bg-meta-category);
    color: var(--text-meta-category);
}

.artist-bio {
    color: var(--text-secondary);
}

.btn-view {
    background-color: var(--accent-primary);
    color: var(--text-inverse);
    transition: all 0.2s ease;
}

.btn-view:hover {
    background-color: #e55;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-website {
    background-color: var(--bg-btn-secondary);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.btn-website:hover {
    background-color: var(--bg-btn-secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* No results */
.no-results h2 {
    color: var(--text-secondary);
}

/* CTA box */
.cta-box {
    background: var(--bg-container);
}

.cta-box h2 {
    color: var(--text-heading);
}

.cta-box p {
    color: var(--text-primary);
}

.btn-cta {
    background-color: var(--accent-primary);
    color: var(--text-inverse);
    transition: all 0.2s ease;
}

.btn-cta:hover {
    background-color: #e55;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Dark mode - CTA button */
[data-theme="dark"] .btn-cta {
    background-color: #ff6fce !important;
    color: #000000 !important;
}

[data-theme="dark"] .btn-cta:hover {
    background-color: #ff8fd8 !important;
    color: #000000 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Forms */
.form-container h1,
.legal-content h1,
.donate-container h1 {
    color: var(--text-heading);
}

.form-container > p:first-of-type,
.form-intro {
    color: var(--text-secondary);
}

.form-section {
    border-bottom-color: var(--border-color-light);
}

.form-section h2 {
    color: var(--text-heading);
}

.form-group label {
    color: var(--text-primary);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    background-color: var(--form-bg);
    border-color: var(--form-border);
    color: var(--form-text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--border-input-focus);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--form-placeholder);
}

.form-hint {
    color: var(--text-muted);
}

.btn-submit-form {
    background-color: var(--accent-primary);
    color: var(--text-inverse);
}

.btn-submit-form:hover {
    background-color: var(--accent-primary-hover);
}

.btn-submit-form:disabled {
    background: var(--bg-btn-secondary);
    color: var(--text-muted);
}

/* Alerts */
.alert-success {
    background: var(--bg-alert-success);
    color: var(--text-alert-success);
    border-color: var(--border-alert-success);
}

.alert-error {
    background: var(--bg-alert-error);
    color: var(--text-alert-error);
    border-color: var(--border-alert-error);
}

/* Profile page */
.profile-details h1 {
    color: var(--text-heading);
}

.profile-bio {
    color: var(--text-secondary);
}

.profile-website-btn {
    background-color: var(--accent-primary);
    color: var(--text-inverse);
}

.profile-website-btn:hover {
    background-color: var(--accent-primary-hover);
}

/* Gallery */
.gallery-item img {
    background-color: var(--bg-hover);
}

/* Ad space */
.ad-space {
    background: var(--bg-ad-space);
    border-color: var(--border-ad-space);
}

.ad-space p {
    color: var(--text-light);
}

/* Footer - Light mode: light gray background, Dark mode: dark background */
.footer {
    background: var(--bg-footer) !important;
    color: var(--text-footer) !important;
}

.footer p,
.container-footer p,
.footer-links p,
.footer-social p {
    color: var(--text-footer) !important;
}

.footer a,
.container-footer a,
.footer-links a {
    color: var(--text-footer) !important;
}

.footer a:hover,
.container-footer a:hover,
.footer-links a:hover {
    color: var(--accent-primary) !important;
}

.social-links a {
    background: var(--bg-social) !important;
    color: var(--text-secondary) !important;
}

.social-links a:hover {
    background: var(--bg-social-hover) !important;
    color: var(--text-inverse) !important;
}

/* Back to top */
.back-to-top {
    background: var(--bg-back-to-top);
    color: var(--text-inverse);
    box-shadow: var(--shadow-back-to-top);
}

.back-to-top:hover {
    background: var(--bg-back-to-top-hover);
}

/* Pagination */
.per-page-selector {
    background: var(--bg-pagination);
    box-shadow: var(--shadow-sm);
}

.per-page-selector label {
    color: var(--text-primary);
}

.per-page-selector select {
    background: var(--bg-input);
    border-color: var(--border-input);
    color: var(--text-primary);
}

.per-page-selector select:focus {
    border-color: var(--border-input-focus);
}

.pagination a,
.pagination span {
    background: var(--bg-pagination);
    border-color: var(--border-pagination);
    color: var(--text-primary);
}

.pagination a:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

.pagination a.active,
.pagination span.active {
    background: var(--bg-pagination-active);
    color: var(--text-inverse);
    border-color: var(--bg-pagination-active);
}

.pagination .dots {
    background: transparent;
    color: var(--text-secondary);
}

/* Visual Stream (Works view) dark mode */
[data-theme="dark"] .stream-item {
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .stream-item:hover {
    box-shadow: var(--shadow-card-hover);
}

[data-theme="dark"] .stream-loader {
    color: var(--text-muted);
}

[data-theme="dark"] .stream-spinner {
    border-color: var(--border-color);
    border-top-color: var(--accent-primary);
}

[data-theme="dark"] .stream-end {
    color: var(--text-muted);
}

/* Password toggle button */
.password-toggle svg {
    fill: var(--text-secondary);
}

.password-toggle:hover svg {
    fill: var(--text-primary);
}

/* In-app browser warning */
[data-theme="dark"] .inapp-warning {
    background: rgba(255, 152, 0, 0.15);
    border-color: #ff9800;
}

[data-theme="dark"] .inapp-warning h3 {
    color: #ffb74d;
}

/* Legal content */
.legal-content {
    color: var(--text-primary);
}

.legal-content h2,
.legal-content h3 {
    color: var(--text-heading);
}

/* Dark mode overrides for legal content - must override inline styles */
[data-theme="dark"] .legal-content,
[data-theme="dark"] .legal-content p,
[data-theme="dark"] .legal-content li,
[data-theme="dark"] .legal-content div,
[data-theme="dark"] .legal-content span,
[data-theme="dark"] .legal-content div[style],
[data-theme="dark"] .legal-content p[style],
[data-theme="dark"] .legal-content span[style] {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .legal-content h1,
[data-theme="dark"] .legal-content h2,
[data-theme="dark"] .legal-content h3,
[data-theme="dark"] .legal-content h4 {
    color: #ffffff !important;
}

[data-theme="dark"] .legal-content a {
    color: #ff6fce !important;
}

[data-theme="dark"] .legal-content a:hover {
    color: #ff8fd9 !important;
}

/* FAQ specific dark mode - override inline styles */
[data-theme="dark"] .faq-content,
[data-theme="dark"] .faq-content p,
[data-theme="dark"] .faq-content li,
[data-theme="dark"] .faq-content div,
[data-theme="dark"] .faq-content span,
[data-theme="dark"] .faq-item,
[data-theme="dark"] .faq-item p,
[data-theme="dark"] .faq-item div,
[data-theme="dark"] div.faq-content,
[data-theme="dark"] div[style*="color: #333"],
[data-theme="dark"] p[style*="color: #666"],
[data-theme="dark"] .faq-footer-text,
[data-theme="dark"] .faq-subtitle {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .faq-content h2,
[data-theme="dark"] .faq-item h2 {
    color: #ffffff !important;
}

/* Global dark mode text color override for elements with inline color styles */
[data-theme="dark"] .container div[style*="color"],
[data-theme="dark"] .container p[style*="color"],
[data-theme="dark"] .container span[style*="color"] {
    color: #e0e0e0 !important;
}

/* Donate container */
.donate-container {
    color: var(--text-primary);
}

/* Dark mode overrides for donate page */
[data-theme="dark"] .donate-container,
[data-theme="dark"] .donate-container p,
[data-theme="dark"] .donate-container li {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .donate-container h1,
[data-theme="dark"] .donate-container h2,
[data-theme="dark"] .donate-container h3 {
    color: #ffffff !important;
}

[data-theme="dark"] .donate-card {
    background: #252525 !important;
    border-color: #3a3a3a !important;
}

[data-theme="dark"] .donate-card h3 {
    color: #ffffff !important;
}

[data-theme="dark"] .donate-card p {
    color: #cccccc !important;
}

/* Terms and Privacy specific */
[data-theme="dark"] .legal-content ul,
[data-theme="dark"] .legal-content ol {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .legal-content strong {
    color: #ffffff !important;
}

/* Cookie banner dark mode override */
[data-theme="dark"] #cookie-banner {
    background: var(--bg-cookie-banner) !important;
}

[data-theme="dark"] #cookie-banner button {
    background: var(--accent-primary) !important;
}

/* Lightbox overlay */
[data-theme="dark"] .lightbox-overlay {
    background: var(--bg-overlay);
}

/* FAQ accordion */
.faq-question {
    color: var(--text-heading);
}

.faq-answer {
    color: var(--text-secondary);
}

/* Landing/Atelier pages dark mode */
[data-theme="dark"] .landing-content,
[data-theme="dark"] .landing-content p,
[data-theme="dark"] .landing-content li {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .landing-content h1,
[data-theme="dark"] .landing-content h2,
[data-theme="dark"] .landing-content h3 {
    color: #ffffff !important;
}

[data-theme="dark"] .landing-content h2 {
    border-bottom-color: #ff6fce !important;
}

/* Profile page dark mode */
[data-theme="dark"] .profile-bio {
    color: #cccccc !important;
}

[data-theme="dark"] .profile-details h1 {
    color: #ffffff !important;
}

/* Article/Buy page dark mode */
[data-theme="dark"] .article-container,
[data-theme="dark"] .article-container p,
[data-theme="dark"] .article-container li {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .article-container h1,
[data-theme="dark"] .article-container h2,
[data-theme="dark"] .article-container h3 {
    color: #ffffff !important;
}

[data-theme="dark"] .article-meta {
    color: #aaaaaa !important;
}

/* Intro box dark mode */
[data-theme="dark"] .intro-box p {
    color: #cccccc !important;
}

[data-theme="dark"] .intro-box h1 {
    color: #ffffff !important;
}

/* Admin panel dark mode */
[data-theme="dark"] .admin-sidebar {
    background: var(--bg-container);
}

[data-theme="dark"] .admin-content {
    background: var(--bg-body-solid);
}

[data-theme="dark"] table {
    background: var(--bg-container);
}

[data-theme="dark"] table th {
    background: var(--bg-hover);
    color: var(--text-heading);
}

[data-theme="dark"] table td {
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] table tr:hover {
    background: var(--bg-hover);
}

/* Smooth transitions for theme change */
body,
.header,
.container,
.artist-card,
.footer,
a,
input,
select,
textarea,
button,
.btn-submit,
.btn-view,
.btn-website,
.btn-cta,
.back-to-top,
.pagination a,
.pagination span {
    transition: background-color 0.3s ease, 
                color 0.3s ease, 
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}

/* Prevent transition on page load */
.no-transition,
.no-transition * {
    transition: none !important;
}

/* ===== LANDING PAGES (ATELIER) DARK MODE ===== */

/* Legal pages subtitle */
.legal-subtitle,
.faq-subtitle {
    color: var(--text-secondary);
}

[data-theme="dark"] .legal-subtitle,
[data-theme="dark"] .faq-subtitle {
    color: #aaaaaa !important;
}

/* Legal text container */
.legal-text {
    color: var(--text-primary);
}

[data-theme="dark"] .legal-text,
[data-theme="dark"] .legal-text p,
[data-theme="dark"] .legal-text li,
[data-theme="dark"] .legal-text ul,
[data-theme="dark"] .legal-text ol {
    color: #e0e0e0 !important;
}

/* Feature box - "What You Get" section */
.feature-box {
    background: var(--bg-container);
    border-left-color: var(--accent-primary);
}

[data-theme="dark"] .feature-box {
    background: #252525 !important;
    border-left-color: #ff6fce !important;
}

[data-theme="dark"] .feature-box h3 {
    color: #ff6fce !important;
}

[data-theme="dark"] .feature-box ul,
[data-theme="dark"] .feature-box li {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .feature-box code {
    background: #1e1e1e !important;
    color: #ff6fce !important;
}

/* Random profiles section - Discover Artists */
.random-profiles {
    background: var(--bg-container);
}

[data-theme="dark"] .random-profiles {
    background: #1e1e1e !important;
}

[data-theme="dark"] .random-profiles h2 {
    color: #ffffff !important;
    border-bottom: none !important;
}

/* Artist cards in random profiles grid */
[data-theme="dark"] .profiles-grid .artist-card {
    background: #252525 !important;
}

[data-theme="dark"] .profiles-grid .artist-name a {
    color: #ffffff !important;
}

[data-theme="dark"] .profiles-grid .artist-name a:hover {
    color: #ff6fce !important;
}

[data-theme="dark"] .profiles-grid .meta-country {
    background-color: #3a3a3a !important;
    color: #cccccc !important;
}

[data-theme="dark"] .profiles-grid .meta-category {
    background-color: rgba(255, 111, 206, 0.15) !important;
    color: #ff6fce !important;
}

/* Landing content general dark mode */
[data-theme="dark"] .landing-content h1 {
    color: #ffffff !important;
}

[data-theme="dark"] .landing-content h2 {
    color: #ffffff !important;
    border-bottom-color: #ff6fce !important;
}

[data-theme="dark"] .landing-content p {
    color: #cccccc !important;
}

[data-theme="dark"] .landing-content ul li {
    color: #cccccc !important;
}

[data-theme="dark"] .landing-content strong {
    color: #ffffff !important;
}

[data-theme="dark"] .landing-content code {
    background: #2a2a2a !important;
    color: #ff6fce !important;
    padding: 2px 6px;
    border-radius: 3px;
}

/* CTA buttons in landing pages */
[data-theme="dark"] .btn-primary {
    background: #ff6fce !important;
    color: #1a1a1a !important;
}

[data-theme="dark"] .btn-primary:hover {
    background: #ff8fd9 !important;
}

[data-theme="dark"] .btn-secondary {
    background: #3a3a3a !important;
    color: #ffffff !important;
}

[data-theme="dark"] .btn-secondary:hover {
    background: #4a4a4a !important;
}

/* ===== ADDITIONAL OVERRIDES FOR INLINE STYLES ===== */

/* Override any inline color: #333 or color: #666 in dark mode */
[data-theme="dark"] [style*="color: #333"],
[data-theme="dark"] [style*="color:#333"],
[data-theme="dark"] [style*="color: #666"],
[data-theme="dark"] [style*="color:#666"],
[data-theme="dark"] [style*="color: #444"],
[data-theme="dark"] [style*="color:#444"],
[data-theme="dark"] [style*="color: #555"],
[data-theme="dark"] [style*="color:#555"] {
    color: #e0e0e0 !important;
}

/* Donate intro text */
[data-theme="dark"] .donate-intro {
    color: #cccccc !important;
}

/* Source notes in FAQ */
[data-theme="dark"] .source-note {
    color: #888888 !important;
    border-top-color: #3a3a3a !important;
}

[data-theme="dark"] .source-note a {
    color: #888888 !important;
}

[data-theme="dark"] .source-note a:hover {
    color: #ff6fce !important;
}

/* ===== FORM PAGES DARK MODE ===== */

/* Submit page - Terms agreement box */
[data-theme="dark"] .form-group[style*="background: #f9f9f9"],
[data-theme="dark"] .form-group[style*="background:#f9f9f9"],
[data-theme="dark"] div[style*="background: #f9f9f9"],
[data-theme="dark"] div[style*="background:#f9f9f9"],
[data-theme="dark"] form[style*="background: #f9f9f9"],
[data-theme="dark"] form[style*="background:#f9f9f9"] {
    background: #252525 !important;
}

[data-theme="dark"] .form-group[style*="background: #f9f9f9"] p,
[data-theme="dark"] div[style*="background: #f9f9f9"] p,
[data-theme="dark"] div[style*="background: #f9f9f9"] h2,
[data-theme="dark"] div[style*="background: #f9f9f9"] h3,
[data-theme="dark"] div[style*="background: #f9f9f9"] li,
[data-theme="dark"] div[style*="background: #f9f9f9"] a,
[data-theme="dark"] form[style*="background: #f9f9f9"] h3 {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .form-group[style*="background: #f9f9f9"] a[style*="color: #d33"],
[data-theme="dark"] div[style*="background: #f9f9f9"] a[style*="color: #d32f2f"] {
    color: #ff6fce !important;
}

[data-theme="dark"] .form-group[style*="background: #f9f9f9"] span[style*="color: #888"] {
    color: #aaaaaa !important;
}

/* Dashboard - Account Settings box */
[data-theme="dark"] .container[style*="background: #f9f9f9"],
[data-theme="dark"] .container[style*="background:#f9f9f9"] {
    background: #252525 !important;
}

[data-theme="dark"] .container[style*="background: #f9f9f9"] h2 {
    color: #ffffff !important;
}

[data-theme="dark"] .container[style*="background: #f9f9f9"] ul,
[data-theme="dark"] .container[style*="background: #f9f9f9"] li {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .container[style*="background: #f9f9f9"] a {
    color: #ff6fce !important;
}

[data-theme="dark"] .container[style*="background: #f9f9f9"] a[style*="color: #d32f2f"] {
    color: #ff6b6b !important;
}

/* Edit profile - Gallery limit warning box */
[data-theme="dark"] div[style*="background: #fff3e0"],
[data-theme="dark"] div[style*="background:#fff3e0"] {
    background: rgba(255, 152, 0, 0.15) !important;
    border-color: #ff9800 !important;
}

[data-theme="dark"] div[style*="background: #fff3e0"] strong,
[data-theme="dark"] div[style*="background: #fff3e0"] p {
    color: #ffb74d !important;
}

/* Edit profile - Delete Profile section */
[data-theme="dark"] .form-section[style*="background: #fff5f5"],
[data-theme="dark"] .form-section[style*="background:#fff5f5"],
[data-theme="dark"] div[style*="background: #fff5f5"] {
    background: rgba(211, 47, 47, 0.1) !important;
    border-color: #d32f2f !important;
}

[data-theme="dark"] .form-section[style*="background: #fff5f5"] h2,
[data-theme="dark"] div[style*="background: #fff5f5"] h2 {
    color: #ff6b6b !important;
}

[data-theme="dark"] .form-section[style*="background: #fff5f5"] p,
[data-theme="dark"] .form-section[style*="background: #fff5f5"] label,
[data-theme="dark"] div[style*="background: #fff5f5"] p {
    color: #e0e0e0 !important;
}

/* ===== CLOUDFLARE TURNSTILE DARK MODE FIX ===== */

/* Turnstile container - make text visible */
[data-theme="dark"] .cf-turnstile {
    background-color: #2a2a2a !important;
    border-radius: 4px;
    padding: 5px;
}

/* Turnstile wrapper div with yellow background */
[data-theme="dark"] div[style*="background: #fffde7"],
[data-theme="dark"] div[style*="background:#fffde7"],
[data-theme="dark"] .security-check,
[data-theme="dark"] .turnstile-wrapper {
    background: #2a2a2a !important;
    border-color: #3a3a3a !important;
}

[data-theme="dark"] div[style*="background: #fffde7"] h3,
[data-theme="dark"] div[style*="background: #fffde7"] p,
[data-theme="dark"] .security-check h3,
[data-theme="dark"] .security-check p {
    color: #e0e0e0 !important;
}

/* ===== TOAST/ALERT NOTIFICATIONS DARK MODE ===== */

/* Success alerts - dark green style */
[data-theme="dark"] .alert-success,
[data-theme="dark"] div[style*="background: #d4edda"],
[data-theme="dark"] div[style*="background:#d4edda"],
[data-theme="dark"] .success-message {
    background: rgba(39, 174, 96, 0.2) !important;
    border-color: rgba(39, 174, 96, 0.3) !important;
    color: #27ae60 !important;
}

[data-theme="dark"] .alert-success *,
[data-theme="dark"] div[style*="background: #d4edda"] * {
    color: #27ae60 !important;
}

/* Error alerts - dark red style */
[data-theme="dark"] .alert-error,
[data-theme="dark"] div[style*="background: #f8d7da"],
[data-theme="dark"] div[style*="background:#f8d7da"],
[data-theme="dark"] .error-message {
    background: rgba(231, 76, 60, 0.2) !important;
    border-color: rgba(231, 76, 60, 0.3) !important;
    color: #e74c3c !important;
}

[data-theme="dark"] .alert-error *,
[data-theme="dark"] div[style*="background: #f8d7da"] * {
    color: #e74c3c !important;
}

/* Warning alerts - dark orange style */
[data-theme="dark"] .alert-warning,
[data-theme="dark"] div[style*="background: #fff3cd"],
[data-theme="dark"] div[style*="background:#fff3cd"],
[data-theme="dark"] .warning-message {
    background: rgba(255, 152, 0, 0.15) !important;
    border-color: rgba(255, 152, 0, 0.3) !important;
    color: #ffb74d !important;
}

[data-theme="dark"] .alert-warning * {
    color: #ffb74d !important;
}

/* Info alerts - dark blue style */
[data-theme="dark"] .alert-info,
[data-theme="dark"] div[style*="background: #d1ecf1"],
[data-theme="dark"] div[style*="background:#d1ecf1"],
[data-theme="dark"] .info-message {
    background: rgba(52, 152, 219, 0.15) !important;
    border-color: rgba(52, 152, 219, 0.3) !important;
    color: #5dade2 !important;
}

[data-theme="dark"] .alert-info * {
    color: #5dade2 !important;
}

/* Generic inline success/error messages */
[data-theme="dark"] p[style*="color: #155724"],
[data-theme="dark"] span[style*="color: #155724"],
[data-theme="dark"] div[style*="color: #155724"] {
    color: #27ae60 !important;
}

[data-theme="dark"] p[style*="color: #721c24"],
[data-theme="dark"] span[style*="color: #721c24"],
[data-theme="dark"] div[style*="color: #721c24"] {
    color: #e74c3c !important;
}

/* ===== ADDITIONAL DARK MODE FIXES v004 ===== */

/* Cloudflare Turnstile - yellow box fix */
[data-theme="dark"] div[style*="background: #fffbcc"],
[data-theme="dark"] div[style*="background:#fffbcc"],
[data-theme="dark"] .turnstile-box {
    background: #2a2a2a !important;
    border-color: #444444 !important;
}

[data-theme="dark"] div[style*="background: #fffbcc"] label,
[data-theme="dark"] div[style*="background: #fffbcc"] span,
[data-theme="dark"] .turnstile-box label {
    color: #e0e0e0 !important;
}

/* Submit page - Terms agreement box */
[data-theme="dark"] div[style*="background: #f9f9f9"],
[data-theme="dark"] div[style*="background:#f9f9f9"],
[data-theme="dark"] .container[style*="background: #f9f9f9"],
[data-theme="dark"] .form-group[style*="background: #f9f9f9"],
[data-theme="dark"] form[style*="background: #f9f9f9"] {
    background: #252525 !important;
}

[data-theme="dark"] div[style*="background: #f9f9f9"] p,
[data-theme="dark"] div[style*="background: #f9f9f9"] h2,
[data-theme="dark"] div[style*="background: #f9f9f9"] h3,
[data-theme="dark"] div[style*="background: #f9f9f9"] li,
[data-theme="dark"] div[style*="background: #f9f9f9"] a,
[data-theme="dark"] div[style*="background: #f9f9f9"] span,
[data-theme="dark"] .container[style*="background: #f9f9f9"] h2,
[data-theme="dark"] .container[style*="background: #f9f9f9"] li,
[data-theme="dark"] .container[style*="background: #f9f9f9"] a {
    color: #e0e0e0 !important;
}

/* Account Settings links in dashboard */
[data-theme="dark"] .container[style*="background: #f9f9f9"] a:hover {
    color: #ff6fce !important;
}

[data-theme="dark"] .container[style*="background: #f9f9f9"] a[style*="color: #d32f2f"] {
    color: #ff6b6b !important;
}

/* Edit profile - Gallery limit warning box (orange) */
[data-theme="dark"] div[style*="background: #fff3e0"],
[data-theme="dark"] div[style*="background:#fff3e0"] {
    background: rgba(255, 152, 0, 0.15) !important;
    border-color: #ff9800 !important;
}

[data-theme="dark"] div[style*="background: #fff3e0"] strong,
[data-theme="dark"] div[style*="background: #fff3e0"] p {
    color: #ffb74d !important;
}

/* Edit profile - Delete Profile section (red/pink background) */
[data-theme="dark"] div[style*="background: #fff5f5"],
[data-theme="dark"] div[style*="background:#fff5f5"],
[data-theme="dark"] .form-section[style*="background: #fff5f5"] {
    background: rgba(211, 47, 47, 0.1) !important;
    border-color: #d32f2f !important;
}

[data-theme="dark"] div[style*="background: #fff5f5"] h2,
[data-theme="dark"] .form-section[style*="background: #fff5f5"] h2 {
    color: #ff6b6b !important;
}

[data-theme="dark"] div[style*="background: #fff5f5"] p,
[data-theme="dark"] div[style*="background: #fff5f5"] label,
[data-theme="dark"] .form-section[style*="background: #fff5f5"] p,
[data-theme="dark"] .form-section[style*="background: #fff5f5"] label {
    color: #e0e0e0 !important;
}

/* Gallery upload form with gray background */
[data-theme="dark"] form[style*="background: #f9f9f9"] h3,
[data-theme="dark"] form[style*="background: #f9f9f9"] label,
[data-theme="dark"] form[style*="background: #f9f9f9"] small {
    color: #e0e0e0 !important;
}

/* Link accent color */
[data-theme="dark"] .link-accent,
[data-theme="dark"] a[style*="color: #d33"],
[data-theme="dark"] a[style*="color:#d33"] {
    color: #ff6fce !important;
}

/* Text muted for dark mode */
[data-theme="dark"] .text-muted,
[data-theme="dark"] span[style*="color: #888"],
[data-theme="dark"] span[style*="color:#888"],
[data-theme="dark"] p[style*="color: #666"],
[data-theme="dark"] small[style*="color: #666"] {
    color: #aaaaaa !important;
}

/* Small text under Turnstile */
[data-theme="dark"] small[style*="color: #666"] {
    color: #999999 !important;
}

/* ===== FAQ PAGE - howto-steps boxes ===== */
[data-theme="dark"] .howto-steps,
[data-theme="dark"] .faq-toc {
    background: #252525 !important;
    border-color: #3a3a3a !important;
}

[data-theme="dark"] .howto-steps ol,
[data-theme="dark"] .howto-steps li,
[data-theme="dark"] .faq-toc ul,
[data-theme="dark"] .faq-toc li,
[data-theme="dark"] .faq-toc a {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .faq-toc h2 {
    color: #ffffff !important;
}

[data-theme="dark"] .faq-toc a:hover {
    color: #ff6fce !important;
}

[data-theme="dark"] .howto-steps code,
[data-theme="dark"] .faq-item code {
    background: #333333 !important;
    color: #ff6fce !important;
}

[data-theme="dark"] .howto-steps a {
    color: #ff6fce !important;
}

/* ===== PROFILE PAGE - Artwork captions ===== */
[data-theme="dark"] .artwork-caption {
    color: #ffffff !important;
}

[data-theme="dark"] .gallery-item-with-caption {
    color: #e0e0e0;
}

/* ===== PROFILE PAGE - Back to Artists Catalog button ===== */
[data-theme="dark"] a[style*="background: #f0f0f0"],
[data-theme="dark"] a[style*="background:#f0f0f0"] {
    background: #2a2a2a !important;
    color: #e0e0e0 !important;
}

[data-theme="dark"] a[style*="background: #f0f0f0"]:hover {
    background: #3a3a3a !important;
    color: #ff6fce !important;
}

/* ===== NOTIFICATION PAGES - Dark mode overrides ===== */
/* These pages define styles in their own <style> blocks with hardcoded light colors.
   The [data-theme="dark"] prefix gives higher specificity to override them. */

/* --- deleted.php - Profile Deleted confirmation --- */
[data-theme="dark"] .deleted-icon {
    background: var(--bg-alert-success);
    color: var(--text-alert-success);
}

[data-theme="dark"] .deleted-title {
    color: var(--text-primary);
}

[data-theme="dark"] .deleted-message {
    color: var(--text-secondary);
}

[data-theme="dark"] .deleted-actions .btn-primary {
    background: var(--accent-primary);
    color: var(--text-inverse);
}

[data-theme="dark"] .deleted-actions .btn-primary:hover {
    background: var(--accent-primary-hover);
}

[data-theme="dark"] .deleted-actions .btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .deleted-actions .btn-secondary:hover {
    background: var(--bg-hover);
}

/* --- verify-email.php - Email Verification result cards --- */
[data-theme="dark"] .verify-success,
[data-theme="dark"] .verify-error {
    background: var(--bg-card);
    border-color: var(--border-color);
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .verify-success .verify-icon {
    background: var(--bg-alert-success);
    color: var(--text-alert-success);
}

[data-theme="dark"] .verify-success h1,
[data-theme="dark"] .verify-error h1 {
    color: var(--text-primary);
}

[data-theme="dark"] .verify-success p,
[data-theme="dark"] .verify-error p {
    color: var(--text-secondary);
}

[data-theme="dark"] .verify-error {
    border-color: var(--border-alert-error);
}

[data-theme="dark"] .verify-error .verify-icon {
    background: var(--bg-alert-error);
    color: var(--text-alert-error);
}

/* Shared .btn-secondary used on verify-email.php and deleted.php */
[data-theme="dark"] .btn.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
}

[data-theme="dark"] .btn.btn-secondary:hover {
    background: var(--bg-hover);
}

/* Donate note on verify-email.php */
[data-theme="dark"] .donate-note {
    border-top-color: var(--border-color);
    color: var(--text-muted);
}

[data-theme="dark"] .donate-note a {
    color: var(--accent-primary);
}

/* --- resend-verification.php - Success confirmation box --- */
[data-theme="dark"] .success-box {
    background: var(--bg-alert-success);
    border-color: var(--text-alert-success);
}

[data-theme="dark"] .success-box h2 {
    color: var(--text-alert-success);
}

[data-theme="dark"] .success-box p,
[data-theme="dark"] .success-box a {
    color: var(--text-secondary);
}

/* --- Dashboard table borders (inline #eee on dark bg) --- */
[data-theme="dark"] table tr[style*="border-bottom: 1px solid #eee"] {
    border-bottom-color: var(--border-color) !important;
}
