/**
 * Color Synchronization Fix for AnonX Theme
 * Ensures consistent color scheme across all pages
 * 
 * @package AnonX
 * @version 1.2.1
 */

/* Enhanced CSS Variables with Missing Colors */
:root {
    /* Primary Colors - Enhanced */
    --primary-color: #ff6b6b;
    --primary-hover: #ff5252;
    --primary-light: #ff8a8a;
    --primary-dark: #e55555;
    
    --secondary-color: #6c757d;
    --secondary-hover: #5a6268;
    --secondary-light: #868e96;
    
    --accent-color: #ffd700;
    --accent-hover: #e6c200;
    --accent-light: #ffdd33;
    
    /* Background Colors - Synchronized */
    --bg-primary: #0a0a0a;          /* Outer body background */
    --bg-secondary: #1a1a1a;        /* Site wrapper & posts wrapper */
    --bg-tertiary: #2a2a2a;         /* Input fields, tertiary elements */
    --bg-card: #1e1e1e;             /* Cards, sections, content areas */
    --bg-hover: #2d2d2d;            /* Hover states */
    --bg-active: #333333;           /* Active states */
    
    /* Text Colors - Enhanced */
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --text-light: #f8f9fa;
    --text-dark: #333333;
    
    /* Border Colors */
    --border-primary: #333333;
    --border-secondary: #404040;
    --border-light: #555555;
    --border-hover: #666666;
    
    /* Header & Footer Colors */
    --header-bg: var(--bg-card);
    --header-border: var(--border-primary);
    --footer-bg: var(--bg-card);
    --footer-border: var(--border-primary);
    
    /* Tab Colors */
    --tab-bg: var(--bg-tertiary);
    --tab-active-bg: var(--bg-card);
    --tab-hover-bg: var(--bg-hover);
    --tab-border: var(--border-primary);
    
    /* Widget & Section Colors */
    --widget-bg: var(--bg-card);
    --widget-border: var(--border-primary);
    --section-bg: var(--bg-card);
    --section-border: var(--border-primary);
}

/* Force Consistent Background Colors */

/* Body & Site Wrapper - Ensure Consistency */
body {
    background-color: var(--bg-primary) !important;
}

.site {
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-primary) !important;
}

/* Header - Synchronized Colors */
.site-header {
    background-color: var(--header-bg) !important;
    border-bottom: 1px solid var(--header-border) !important;
}

.header-content {
    background-color: transparent !important;
}

/* Main Content Areas - Consistent Backgrounds */
.main-content {
    background-color: transparent !important;
}

/* Posts Wrapper - Same on All Pages */
.posts-wrapper {
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-primary) !important;
}

/* All Content Sections - Consistent Card Background */
.posts-wrapper .single-post,
.posts-wrapper .social-sharing-section,
.posts-wrapper .related-posts,
.posts-wrapper .post-navigation-section,
.posts-wrapper .comments-section,
.video-grid-container,
.sidebar .widget,
.top-movies-section {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-primary) !important;
}

/* Top Movies Section - Fix Background Conflict */
.top-movies-section {
    background-color: var(--section-bg) !important;
    border: 1px solid var(--section-border) !important;
}

.top-movies-header {
    background-color: transparent !important;
    border-bottom: 1px solid var(--border-primary) !important;
}

.top-movies-list {
    background-color: transparent !important;
}

.top-movie-item {
    background-color: transparent !important;
    border-bottom: 1px solid var(--border-secondary) !important;
}

.top-movie-item:hover {
    background-color: var(--bg-hover) !important;
}

/* Video Grid - Consistent Card Colors */
.video-card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-primary) !important;
}

.video-card:hover {
    background-color: var(--bg-hover) !important;
    border-color: var(--border-hover) !important;
}

/* Sidebar - Consistent Widget Colors */
.sidebar {
    background-color: transparent !important;
}

.sidebar .widget {
    background-color: var(--widget-bg) !important;
    border: 1px solid var(--widget-border) !important;
}

.sidebar .widget-title {
    background-color: transparent !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-primary) !important;
}

/* Footer - Synchronized Colors */
.site-footer {
    background-color: var(--footer-bg) !important;
    border-top: 1px solid var(--footer-border) !important;
}

/* Navigation & Tabs - Consistent Colors */
.nav-tabs .nav-link {
    background-color: var(--tab-bg) !important;
    border: 1px solid var(--tab-border) !important;
    color: var(--text-secondary) !important;
}

.nav-tabs .nav-link:hover {
    background-color: var(--tab-hover-bg) !important;
    color: var(--text-primary) !important;
}

.nav-tabs .nav-link.active {
    background-color: var(--tab-active-bg) !important;
    color: var(--text-primary) !important;
    border-bottom-color: var(--tab-active-bg) !important;
}

/* Buttons - Consistent Primary Colors */
.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
}

.btn-primary:hover {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    color: #ffffff !important;
}

.btn-secondary {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    color: #ffffff !important;
}

.btn-secondary:hover {
    background-color: var(--secondary-hover) !important;
    border-color: var(--secondary-hover) !important;
    color: #ffffff !important;
}

/* Form Elements - Consistent Colors */
.form-control,
input[type="text"],
input[type="email"],
input[type="search"],
textarea,
select {
    background-color: var(--bg-tertiary) !important;
    border: 1px solid var(--border-primary) !important;
    color: var(--text-primary) !important;
}

.form-control:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
    background-color: var(--bg-card) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 107, 0.25) !important;
}

/* Pagination - Consistent Colors */
.pagination .page-link {
    background-color: var(--bg-tertiary) !important;
    border: 1px solid var(--border-primary) !important;
    color: var(--text-secondary) !important;
}

.pagination .page-link:hover {
    background-color: var(--bg-hover) !important;
    color: var(--text-primary) !important;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
}

/* Breadcrumbs - Consistent Colors */
.breadcrumbs {
    background-color: var(--bg-card) !important;
    border-bottom: 1px solid var(--border-primary) !important;
}

.breadcrumb-item a {
    color: var(--text-secondary) !important;
}

.breadcrumb-item a:hover {
    color: var(--primary-color) !important;
}

.breadcrumb-item.active {
    color: var(--text-primary) !important;
}

/* Comments Section - Consistent Colors */
.comment-list .comment {
    background-color: var(--bg-tertiary) !important;
    border: 1px solid var(--border-secondary) !important;
}

.comment-form {
    background-color: var(--bg-tertiary) !important;
    border: 1px solid var(--border-primary) !important;
    padding: 1rem !important;
    border-radius: var(--border-radius) !important;
}

/* Search Results - Consistent Colors */
.search-results .search-result-item {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-primary) !important;
}

/* Archive Pages - Consistent Colors */
.archive-header {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-primary) !important;
}

/* Category Sections - Consistent Colors */
.category-section {
    background-color: var(--section-bg) !important;
    border: 1px solid var(--section-border) !important;
}

.category-section-header {
    background-color: transparent !important;
    border-bottom: 1px solid var(--border-primary) !important;
}

/* Mobile Specific Fixes */
@media (max-width: 768px) {
    .site {
        margin: 0 !important;
        border-radius: 0 !important;
        min-height: 100vh !important;
    }
    
    body {
        padding: 0 !important;
    }
    
    .site-header {
        border-radius: 0 !important;
    }
    
    .posts-wrapper {
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
    }
    
    .sidebar .widget {
        border-left: none !important;
        border-right: none !important;
    }
}

/* Dark Mode Consistency Check */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0a0a0a;
        --bg-secondary: #1a1a1a;
        --bg-tertiary: #2a2a2a;
        --bg-card: #1e1e1e;
        --text-primary: #ffffff;
        --text-secondary: #b0b0b0;
    }
}

/* Print Styles - Ensure Readability */
@media print {
    body {
        background-color: #ffffff !important;
        color: #000000 !important;
    }
    
    .site,
    .posts-wrapper,
    .sidebar .widget,
    .top-movies-section {
        background-color: #ffffff !important;
        border: 1px solid #cccccc !important;
    }
} 