/* Site Theme CSS - Dynamic colors and settings */

/* Bootstrap Override with Admin Colors */
.btn-primary {
    background: var(--gradient-primary) !important;
    border-color: var(--primary-color) !important;
    border-radius: var(--border-radius) !important;
    box-shadow: var(--shadow-sm) !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    box-shadow: var(--shadow-md) !important;
}

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

.bg-primary {
    background-color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* Links with Admin Colors */
a {
    color: var(--primary-color);
}

a:hover {
    color: var(--primary-dark);
}

/* Form Controls with Admin Colors */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(17, 153, 142, 0.25);
}

/* Custom Platform Button with Admin Colors */
.btn-platform-compact {
    background: var(--gradient-primary) !important;
    border-radius: var(--border-radius) !important;
    box-shadow: var(--shadow-sm) !important;
}

.btn-platform-compact:hover {
    background: var(--primary-dark) !important;
    box-shadow: var(--shadow-md) !important;
}

/* Cards with Theme Settings */
.card, .platform-card-compact {
    border-radius: var(--border-radius) !important;
    box-shadow: var(--shadow-sm) !important;
}

.card:hover, .platform-card-compact:hover {
    box-shadow: var(--shadow-md) !important;
}

/* Form Controls with Theme Settings */
.form-control, .form-select {
    border-radius: var(--border-radius) !important;
}

.form-control:focus, .form-select:focus {
    box-shadow: var(--shadow-sm) !important;
}

/* Platform Icon Background with Admin Colors */
.platform-icon-compact {
    background: rgba(17, 153, 142, 0.1) !important;
}

.platform-card-compact:hover .platform-icon-compact {
    background: rgba(17, 153, 142, 0.15) !important;
}

/* Dark Mode Styles - Always Available */
html[data-theme="dark"],
html[data-theme="dark"] body,
[data-theme="dark"],
body[data-theme="dark"] {
    --white: #1a1a1a;
    --light-gray: #2d2d2d;
    --gray: #a0a0a0;
    --dark-gray: #e0e0e0;
    --dark: #f0f0f0;
    --black: #ffffff;
}

html[data-theme="dark"] body,
body[data-theme="dark"] {
    background-color: var(--white) !important;
    color: var(--dark) !important;
}

[data-theme="dark"] .card,
[data-theme="dark"] .platform-card-compact,
[data-theme="dark"] .group-card,
[data-theme="dark"] .category-card {
    background-color: #2d2d2d;
    border-color: #404040;
    color: var(--dark);
}

[data-theme="dark"] .card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: #2d2d2d;
    border-color: #404040;
    color: var(--dark);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background-color: #2d2d2d;
    border-color: var(--primary-color);
    color: var(--dark);
}

[data-theme="dark"] .nav-link {
    color: var(--gray) !important;
}

[data-theme="dark"] .nav-link.active {
    color: white !important;
}

[data-theme="dark"] .form-control::placeholder,
[data-theme="dark"] .form-select::placeholder,
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
    opacity: 1 !important;
}

/* Form Labels */
[data-theme="dark"] .form-label,
[data-theme="dark"] label,
[data-theme="dark"] .label {
    color: #e5e7eb !important;
}

/* Form Hints and Help Text */
[data-theme="dark"] .form-hint,
[data-theme="dark"] .form-text,
[data-theme="dark"] .help-block,
[data-theme="dark"] small.form-text {
    color: #9ca3af !important;
}

/* Invalid Feedback and Error Messages */
[data-theme="dark"] .invalid-feedback,
[data-theme="dark"] .error-message,
[data-theme="dark"] .text-danger,
[data-theme="dark"] .alert-danger,
[data-theme="dark"] .alert-danger .alert-heading,
[data-theme="dark"] .alert-danger p,
[data-theme="dark"] .alert-danger span {
    color: #ff6b6b !important;
}

[data-theme="dark"] .invalid-feedback::before,
[data-theme="dark"] .error-message::before {
    color: #ff6b6b !important;
}

/* Warning Messages */
[data-theme="dark"] .text-warning,
[data-theme="dark"] .alert-warning,
[data-theme="dark"] .alert-warning .alert-heading,
[data-theme="dark"] .alert-warning p,
[data-theme="dark"] .alert-warning span {
    color: #ffd93d !important;
}

/* Info Messages */
[data-theme="dark"] .text-info,
[data-theme="dark"] .alert-info,
[data-theme="dark"] .alert-info .alert-heading,
[data-theme="dark"] .alert-info p,
[data-theme="dark"] .alert-info span {
    color: #74c0fc !important;
}

/* Success Messages */
[data-theme="dark"] .text-success,
[data-theme="dark"] .alert-success,
[data-theme="dark"] .alert-success .alert-heading,
[data-theme="dark"] .alert-success p,
[data-theme="dark"] .alert-success span {
    color: #51cf66 !important;
}

/* Alert Backgrounds */
[data-theme="dark"] .alert-danger {
    background-color: rgba(255, 107, 107, 0.1) !important;
    border-color: rgba(255, 107, 107, 0.3) !important;
    color: #ff6b6b !important;
}

[data-theme="dark"] .alert-warning {
    background-color: rgba(255, 217, 61, 0.1) !important;
    border-color: rgba(255, 217, 61, 0.3) !important;
    color: #ffd93d !important;
}

[data-theme="dark"] .alert-info {
    background-color: rgba(116, 192, 252, 0.1) !important;
    border-color: rgba(116, 192, 252, 0.3) !important;
    color: #74c0fc !important;
}

[data-theme="dark"] .alert-success {
    background-color: rgba(81, 207, 102, 0.1) !important;
    border-color: rgba(81, 207, 102, 0.3) !important;
    color: #51cf66 !important;
}

/* Form Check Labels */
[data-theme="dark"] .form-check-label,
[data-theme="dark"] .form-check-input + label {
    color: #e5e7eb !important;
}

/* Captcha Questions */
[data-theme="dark"] .captcha-question,
[data-theme="dark"] .captcha-question span {
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .captcha-input {
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .captcha-input::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Invalid Input Styling */
[data-theme="dark"] .form-control.is-invalid,
[data-theme="dark"] .form-select.is-invalid {
    border-color: #ff6b6b !important;
    background-color: rgba(255, 107, 107, 0.05) !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .form-control.is-invalid:focus,
[data-theme="dark"] .form-select.is-invalid:focus {
    border-color: #ff6b6b !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 107, 0.25) !important;
    color: #e5e7eb !important;
}

/* Valid Input Styling */
[data-theme="dark"] .form-control.is-valid,
[data-theme="dark"] .form-select.is-valid {
    border-color: #51cf66 !important;
}

[data-theme="dark"] .form-control.is-valid:focus,
[data-theme="dark"] .form-select.is-valid:focus {
    border-color: #51cf66 !important;
    box-shadow: 0 0 0 0.2rem rgba(81, 207, 102, 0.25) !important;
}

/* All Text Elements - More Specific */
[data-theme="dark"] body p:not(.alert p):not(.card p),
[data-theme="dark"] body span:not(.badge):not(.btn span):not(.alert span):not(.card span),
[data-theme="dark"] body div:not(.alert):not(.card):not(.card-body):not(.dropdown):not(.modal) {
    color: var(--dark) !important;
}

[data-theme="dark"] body h1:not(.alert h1):not(.card h1),
[data-theme="dark"] body h2:not(.alert h2):not(.card h2),
[data-theme="dark"] body h3:not(.alert h3):not(.card h3),
[data-theme="dark"] body h4:not(.alert h4):not(.card h4),
[data-theme="dark"] body h5:not(.alert h5):not(.card h5),
[data-theme="dark"] body h6:not(.alert h6):not(.card h6) {
    color: var(--dark) !important;
}

/* Text Muted - Override */
[data-theme="dark"] .text-muted {
    color: var(--gray) !important;
}

/* Links */
[data-theme="dark"] a:not(.btn):not(.nav-link):not(.dropdown-item) {
    color: var(--primary-color) !important;
}

[data-theme="dark"] a:not(.btn):not(.nav-link):not(.dropdown-item):hover {
    color: var(--primary-dark) !important;
}

/* Card Text */
[data-theme="dark"] .card-body,
[data-theme="dark"] .card-body p,
[data-theme="dark"] .card-body span,
[data-theme="dark"] .card-body div {
    color: var(--dark) !important;
}

/* List Items */
[data-theme="dark"] li,
[data-theme="dark"] ul li,
[data-theme="dark"] ol li {
    color: var(--dark) !important;
}

/* Table Text */
[data-theme="dark"] table,
[data-theme="dark"] table td,
[data-theme="dark"] table th {
    color: var(--dark) !important;
}

/* Breadcrumb */
[data-theme="dark"] .breadcrumb,
[data-theme="dark"] .breadcrumb-item,
[data-theme="dark"] .breadcrumb-item a {
    color: var(--gray) !important;
}

[data-theme="dark"] .breadcrumb-item.active {
    color: var(--dark) !important;
}

/* Dropdown Items */
[data-theme="dark"] .dropdown-item {
    color: var(--dark) !important;
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: var(--primary-color) !important;
}

/* Badge */
[data-theme="dark"] .badge {
    color: #ffffff !important;
}

/* Code and Pre */
[data-theme="dark"] code,
[data-theme="dark"] pre {
    background-color: #2d2d2d !important;
    color: #e5e7eb !important;
    border-color: #404040 !important;
}

/* Blockquote */
[data-theme="dark"] blockquote {
    border-left-color: var(--primary-color) !important;
    color: var(--gray) !important;
}

/* Small Text */
[data-theme="dark"] small {
    color: var(--gray) !important;
}

/* Strong and Bold */
[data-theme="dark"] strong,
[data-theme="dark"] b {
    color: var(--dark) !important;
}

/* HTML5 Validation Messages */
[data-theme="dark"] input:invalid:not(:focus):not(:placeholder-shown),
[data-theme="dark"] textarea:invalid:not(:focus):not(:placeholder-shown),
[data-theme="dark"] select:invalid:not(:focus) {
    border-color: #ff6b6b !important;
}

/* HTML5 Required Field Indicator */
[data-theme="dark"] input:required,
[data-theme="dark"] textarea:required,
[data-theme="dark"] select:required {
    border-left: 3px solid rgba(255, 107, 107, 0.3) !important;
}

/* HTML5 Validation Tooltip (Browser Native) */
[data-theme="dark"] input:invalid:focus,
[data-theme="dark"] textarea:invalid:focus,
[data-theme="dark"] select:invalid:focus {
    border-color: #ff6b6b !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 107, 0.25) !important;
}

/* Validation Message Container */
[data-theme="dark"] .validation-message,
[data-theme="dark"] .form-error,
[data-theme="dark"] .field-error {
    color: #ff6b6b !important;
    background-color: rgba(255, 107, 107, 0.1) !important;
    border-left: 3px solid #ff6b6b !important;
    padding: 8px 12px !important;
    border-radius: 4px !important;
    margin-top: 5px !important;
    font-size: 0.875rem !important;
}

/* Group Detail Page Background Fix */
[data-theme="dark"] .group-detail-page {
    background-color: #1a1a1a !important;
    background: #1a1a1a !important;
}

/* Group Hero Section - Make sure it's dark */
[data-theme="dark"] .group-hero {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%) !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .group-hero * {
    color: #e5e7eb !important;
}

/* Group Header Card - Force dark */
[data-theme="dark"] .group-header {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .group-header * {
    color: #e5e7eb !important;
}

/* Specific fixes for problematic elements */
[data-theme="dark"] .group-title,
[data-theme="dark"] .group-name {
    color: #ffffff !important;
}

[data-theme="dark"] .group-info,
[data-theme="dark"] .group-details {
    color: #e5e7eb !important;
}

[data-theme="dark"] .group-info *,
[data-theme="dark"] .group-details * {
    color: #e5e7eb !important;
}

/* Statistics */
[data-theme="dark"] .group-stats,
[data-theme="dark"] .stat-item,
[data-theme="dark"] .stat-number,
[data-theme="dark"] .stat-label {
    color: #e5e7eb !important;
}

[data-theme="dark"] .stat-item i {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Content Sections */
[data-theme="dark"] .content-section {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .content-section * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .section-header {
    background: linear-gradient(135deg, #2d2d2d, #404040) !important;
    border-bottom-color: #404040 !important;
}

[data-theme="dark"] .section-header * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .section-content {
    background-color: #2d2d2d !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .section-content * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .description-text {
    color: #e5e7eb !important;
}

/* Sidebar Cards */
[data-theme="dark"] .sidebar-card {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .sidebar-card * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .sidebar-card .card-header {
    background: linear-gradient(135deg, #2d2d2d, #404040) !important;
    border-bottom-color: #404040 !important;
}

[data-theme="dark"] .sidebar-card .card-header * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .sidebar-card .card-body {
    background-color: #2d2d2d !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .sidebar-card .card-body * {
    color: #e5e7eb !important;
}

/* Info Items */
[data-theme="dark"] .info-item {
    background-color: #1a1a1a !important;
    border-color: #404040 !important;
}

[data-theme="dark"] .info-label {
    color: #9ca3af !important;
}

[data-theme="dark"] .info-value {
    color: #e5e7eb !important;
}

/* Tags */
[data-theme="dark"] .tag {
    background-color: rgba(0, 136, 204, 0.2) !important;
    border-color: rgba(0, 136, 204, 0.3) !important;
    color: #74c0fc !important;
}

/* Similar Groups List - Dark Mode */
[data-theme="dark"] .similar-groups-list {
    color: #e5e7eb !important;
}

[data-theme="dark"] .similar-group-item {
    background-color: #1a1a1a !important;
    background: #1a1a1a !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
    border-left-color: #404040 !important;
}

[data-theme="dark"] .similar-group-item:hover {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    border-left-color: var(--primary-color) !important;
    color: #ffffff !important;
}

[data-theme="dark"] .similar-group-item * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .similar-group-item:hover * {
    color: #ffffff !important;
}

[data-theme="dark"] .similar-group-title {
    color: #e5e7eb !important;
    font-weight: 600 !important;
}

[data-theme="dark"] .similar-group-item:hover .similar-group-title {
    color: #ffffff !important;
}

[data-theme="dark"] .similar-group-meta {
    color: #9ca3af !important;
}

[data-theme="dark"] .similar-group-meta span {
    color: #9ca3af !important;
}

[data-theme="dark"] .similar-group-meta i {
    color: #9ca3af !important;
}

[data-theme="dark"] .similar-group-item:hover .similar-group-meta,
[data-theme="dark"] .similar-group-item:hover .similar-group-meta span,
[data-theme="dark"] .similar-group-item:hover .similar-group-meta i {
    color: #cbd5e1 !important;
}

/* Category Cards - Comprehensive Dark Mode Fix */
[data-theme="dark"] .category-section {
    background-color: #1a1a1a !important;
    background: #1a1a1a !important;
}

[data-theme="dark"] .category-card {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    border-color: #404040 !important;
}

[data-theme="dark"] .category-card-inner {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .category-card-inner * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .category-title,
[data-theme="dark"] .category-name {
    color: #e5e7eb !important;
}

[data-theme="dark"] .category-icon,
[data-theme="dark"] .category-icon i {
    color: #e5e7eb !important;
}

[data-theme="dark"] .category-icon-wrapper {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .category-card:hover .category-icon-wrapper {
    background: var(--gradient-primary) !important;
}

[data-theme="dark"] .category-card:hover .category-icon {
    color: white !important;
}

[data-theme="dark"] .category-card:hover .category-name {
    color: #ffffff !important;
}

[data-theme="dark"] .category-description,
[data-theme="dark"] .category-count {
    color: #9ca3af !important;
}

[data-theme="dark"] .category-card:hover .category-card-inner {
    background-color: #333333 !important;
    border-color: var(--primary-color) !important;
}

[data-theme="dark"] .category-card-link:hover .category-card {
    border-color: rgba(0, 136, 204, 0.3) !important;
}

/* Platform Cards - Dark Mode */
[data-theme="dark"] .platform-card {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .platform-card * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .platform-name,
[data-theme="dark"] .platform-name-compact {
    color: #e5e7eb !important;
}

[data-theme="dark"] .platform-description {
    color: #9ca3af !important;
}

[data-theme="dark"] .platform-count {
    color: #9ca3af !important;
}

[data-theme="dark"] .platform-stat-number {
    color: var(--primary-color) !important;
}

[data-theme="dark"] .platform-stat-label {
    color: #9ca3af !important;
}

[data-theme="dark"] .platform-icon-compact {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .platform-card-compact:hover .platform-icon-compact {
    background-color: rgba(0, 136, 204, 0.2) !important;
}

/* Splide Carousel - Dark Mode */
[data-theme="dark"] .splide__arrow {
    background: rgba(45, 45, 45, 0.9) !important;
    border-color: #404040 !important;
}

[data-theme="dark"] .splide__arrow:hover {
    background: rgba(61, 61, 61, 1) !important;
}

[data-theme="dark"] .splide__arrow svg {
    fill: #e5e7eb !important;
}

/* Empty State - Dark Mode */
[data-theme="dark"] .empty-state {
    color: #9ca3af !important;
}

[data-theme="dark"] .empty-state-icon {
    background-color: #2d2d2d !important;
}

[data-theme="dark"] .empty-state-icon i {
    color: #9ca3af !important;
}

[data-theme="dark"] .empty-state h3 {
    color: #e5e7eb !important;
}

[data-theme="dark"] .empty-state p {
    color: #9ca3af !important;
}

/* SEO Cards - Dark Mode */
[data-theme="dark"] .seo-card {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .seo-card * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .seo-title {
    color: #e5e7eb !important;
}

[data-theme="dark"] .seo-text {
    color: #9ca3af !important;
}

[data-theme="dark"] .seo-description {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .seo-description * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .platform-seo-content {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%) !important;
    border-top-color: #404040 !important;
}

/* Section Titles - Dark Mode */
[data-theme="dark"] .section-title,
[data-theme="dark"] .page-title {
    color: #e5e7eb !important;
}

[data-theme="dark"] .section-subtitle {
    color: #9ca3af !important;
}

/* Categories Grid - Dark Mode (Inline Styles Override) */
[data-theme="dark"] .categories-grid,
[data-theme="dark"] [style*="background: white"],
[data-theme="dark"] [style*="background-color: white"],
[data-theme="dark"] [style*="background:#fff"],
[data-theme="dark"] [style*="background-color:#fff"],
[data-theme="dark"] [style*="background:#ffffff"],
[data-theme="dark"] [style*="background-color:#ffffff"],
[data-theme="dark"] [style*="background: #fff"],
[data-theme="dark"] [style*="background-color: #fff"],
[data-theme="dark"] [style*="background: #ffffff"],
[data-theme="dark"] [style*="background-color: #ffffff"] {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .categories-grid *,
[data-theme="dark"] [style*="background: white"] *,
[data-theme="dark"] [style*="background-color: white"] * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .categories-grid h2,
[data-theme="dark"] .categories-grid h3,
[data-theme="dark"] .categories-grid h4 {
    color: #e5e7eb !important;
}

[data-theme="dark"] .categories-grid p {
    color: #9ca3af !important;
}

/* Popular Category Cards - Dark Mode (Inline Styles Override) */
[data-theme="dark"] [style*="background: linear-gradient(135deg, #f8f9fa"],
[data-theme="dark"] [style*="background:linear-gradient(135deg, #f8f9fa"],
[data-theme="dark"] [style*="background: linear-gradient(135deg,#f8f9fa"],
[data-theme="dark"] [style*="background:linear-gradient(135deg,#f8f9fa"],
[data-theme="dark"] div[style*="background: linear-gradient(135deg, #f8f9fa"],
[data-theme="dark"] div[style*="background:linear-gradient(135deg, #f8f9fa"],
[data-theme="dark"] div[style*="background: linear-gradient(135deg,#f8f9fa"],
[data-theme="dark"] div[style*="background:linear-gradient(135deg,#f8f9fa"] {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%) !important;
    background-color: #2d2d2d !important;
    background-image: none !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] [style*="background: linear-gradient(135deg, #f8f9fa"] *,
[data-theme="dark"] [style*="background:linear-gradient(135deg, #f8f9fa"] *,
[data-theme="dark"] [style*="background: linear-gradient(135deg,#f8f9fa"] *,
[data-theme="dark"] [style*="background:linear-gradient(135deg,#f8f9fa"] *,
[data-theme="dark"] div[style*="background: linear-gradient(135deg, #f8f9fa"] *,
[data-theme="dark"] div[style*="background:linear-gradient(135deg, #f8f9fa"] *,
[data-theme="dark"] div[style*="background: linear-gradient(135deg,#f8f9fa"] *,
[data-theme="dark"] div[style*="background:linear-gradient(135deg,#f8f9fa"] * {
    color: #e5e7eb !important;
}

/* Popular Category Card Titles - Dark Mode */
[data-theme="dark"] [style*="color: #2c3e50"],
[data-theme="dark"] [style*="color:#2c3e50"],
[data-theme="dark"] h4[style*="color: #2c3e50"],
[data-theme="dark"] h4[style*="color:#2c3e50"] {
    color: #e5e7eb !important;
}

/* Popular Category Card Descriptions - Dark Mode */
[data-theme="dark"] [style*="color: #6c757d"],
[data-theme="dark"] [style*="color:#6c757d"],
[data-theme="dark"] p[style*="color: #6c757d"],
[data-theme="dark"] p[style*="color:#6c757d"] {
    color: #9ca3af !important;
}

/* Popular Category Card Icons - Dark Mode */
[data-theme="dark"] [style*="color: #0088cc"],
[data-theme="dark"] [style*="color:#0088cc"],
[data-theme="dark"] [style*="color: #25d366"],
[data-theme="dark"] [style*="color:#25d366"],
[data-theme="dark"] [style*="color: #5865f2"],
[data-theme="dark"] [style*="color:#5865f2"],
[data-theme="dark"] [style*="color: #1877f2"],
[data-theme="dark"] [style*="color:#1877f2"],
[data-theme="dark"] [style*="color: #e74c3c"],
[data-theme="dark"] [style*="color:#e74c3c"],
[data-theme="dark"] [style*="color: #9b59b6"],
[data-theme="dark"] [style*="color:#9b59b6"],
[data-theme="dark"] i[style*="color: #0088cc"],
[data-theme="dark"] i[style*="color:#0088cc"],
[data-theme="dark"] i[style*="color: #25d366"],
[data-theme="dark"] i[style*="color:#25d366"],
[data-theme="dark"] i[style*="color: #5865f2"],
[data-theme="dark"] i[style*="color:#5865f2"],
[data-theme="dark"] i[style*="color: #1877f2"],
[data-theme="dark"] i[style*="color:#1877f2"],
[data-theme="dark"] i[style*="color: #e74c3c"],
[data-theme="dark"] i[style*="color:#e74c3c"],
[data-theme="dark"] i[style*="color: #9b59b6"],
[data-theme="dark"] i[style*="color:#9b59b6"] {
    color: var(--primary-color) !important;
}

/* Force all cards with gradient backgrounds to dark */
[data-theme="dark"] div[style*="background: linear-gradient(135deg, #f8f9fa"],
[data-theme="dark"] div[style*="background:linear-gradient(135deg, #f8f9fa"],
[data-theme="dark"] div[style*="background: linear-gradient(135deg,#f8f9fa"],
[data-theme="dark"] div[style*="background:linear-gradient(135deg,#f8f9fa"] {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%) !important;
    background-color: #2d2d2d !important;
    border-left-color: var(--primary-color) !important;
}

/* Force all text in gradient cards to light */
[data-theme="dark"] div[style*="background: linear-gradient(135deg, #f8f9fa"] h4,
[data-theme="dark"] div[style*="background: linear-gradient(135deg, #f8f9fa"] p,
[data-theme="dark"] div[style*="background: linear-gradient(135deg, #f8f9fa"] strong,
[data-theme="dark"] div[style*="background: linear-gradient(135deg, #f8f9fa"] i,
[data-theme="dark"] div[style*="background:linear-gradient(135deg, #f8f9fa"] h4,
[data-theme="dark"] div[style*="background:linear-gradient(135deg, #f8f9fa"] p,
[data-theme="dark"] div[style*="background:linear-gradient(135deg, #f8f9fa"] strong,
[data-theme="dark"] div[style*="background:linear-gradient(135deg, #f8f9fa"] i {
    color: #e5e7eb !important;
}

[data-theme="dark"] div[style*="background: linear-gradient(135deg, #f8f9fa"] p,
[data-theme="dark"] div[style*="background:linear-gradient(135deg, #f8f9fa"] p {
    color: #9ca3af !important;
}

[data-theme="dark"] div[style*="background: linear-gradient(135deg, #f8f9fa"] strong,
[data-theme="dark"] div[style*="background:linear-gradient(135deg, #f8f9fa"] strong {
    color: #e5e7eb !important;
}

/* Category Grid Items - Dark Mode */
[data-theme="dark"] [style*="background: #f8f9fa"],
[data-theme="dark"] [style*="background-color: #f8f9fa"],
[data-theme="dark"] [style*="background:#f8f9fa"],
[data-theme="dark"] [style*="background-color:#f8f9fa"] {
    background-color: #1a1a1a !important;
    background: #1a1a1a !important;
    border-color: #404040 !important;
}

[data-theme="dark"] [style*="background: #f8f9fa"] *,
[data-theme="dark"] [style*="background-color: #f8f9fa"] * {
    color: #e5e7eb !important;
}

/* Category Grid Links - Dark Mode */
[data-theme="dark"] [style*="color: #0088cc"],
[data-theme="dark"] [style*="color:#0088cc"],
[data-theme="dark"] [style*="color: #0088cc"] {
    color: var(--primary-color) !important;
}

[data-theme="dark"] [style*="color: #6c757d"],
[data-theme="dark"] [style*="color:#6c757d"] {
    color: #9ca3af !important;
}

[data-theme="dark"] [style*="color: #2c3e50"],
[data-theme="dark"] [style*="color:#2c3e50"],
[data-theme="dark"] [style*="color: #495057"],
[data-theme="dark"] [style*="color:#495057"] {
    color: #e5e7eb !important;
}

/* SEO Description - Dark Mode */
[data-theme="dark"] .seo-description,
[data-theme="dark"] [class*="seo-description"] {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .seo-description *,
[data-theme="dark"] [class*="seo-description"] * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .seo-description p,
[data-theme="dark"] .seo-description li {
    color: #9ca3af !important;
}

[data-theme="dark"] .seo-description h2,
[data-theme="dark"] .seo-description h3 {
    color: #e5e7eb !important;
}

[data-theme="dark"] .seo-description strong {
    color: #e5e7eb !important;
}

/* All Inline Style Overrides - Ultimate Fix */
[data-theme="dark"] [style*="background: white"],
[data-theme="dark"] [style*="background-color: white"],
[data-theme="dark"] [style*="background:#fff"],
[data-theme="dark"] [style*="background-color:#fff"],
[data-theme="dark"] [style*="background:#ffffff"],
[data-theme="dark"] [style*="background-color:#ffffff"],
[data-theme="dark"] [style*="background: #fff"],
[data-theme="dark"] [style*="background-color: #fff"],
[data-theme="dark"] [style*="background: #ffffff"],
[data-theme="dark"] [style*="background-color: #ffffff"],
[data-theme="dark"] [style*="background:#f8f9fa"],
[data-theme="dark"] [style*="background-color:#f8f9fa"],
[data-theme="dark"] [style*="background: #f8f9fa"],
[data-theme="dark"] [style*="background-color: #f8f9fa"],
[data-theme="dark"] [style*="background:#e9ecef"],
[data-theme="dark"] [style*="background-color:#e9ecef"],
[data-theme="dark"] [style*="background: #e9ecef"],
[data-theme="dark"] [style*="background-color: #e9ecef"] {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
}

[data-theme="dark"] [style*="background: white"] *,
[data-theme="dark"] [style*="background-color: white"] *,
[data-theme="dark"] [style*="background:#fff"] *,
[data-theme="dark"] [style*="background-color:#fff"] *,
[data-theme="dark"] [style*="background:#ffffff"] *,
[data-theme="dark"] [style*="background-color:#ffffff"] *,
[data-theme="dark"] [style*="background: #fff"] *,
[data-theme="dark"] [style*="background-color: #fff"] *,
[data-theme="dark"] [style*="background: #ffffff"] *,
[data-theme="dark"] [style*="background-color: #ffffff"] * {
    color: #e5e7eb !important;
}

/* Main Content Background - Force Dark */
[data-theme="dark"] main,
[data-theme="dark"] .main-content,
[data-theme="dark"] .content-wrapper {
    background-color: #1a1a1a !important;
    background: #1a1a1a !important;
}

/* All Sections - Dark Mode */
[data-theme="dark"] section {
    background-color: #1a1a1a !important;
    background: #1a1a1a !important;
}

[data-theme="dark"] section:not(.categories-hero):not(.group-hero) {
    background-color: #1a1a1a !important;
    background: #1a1a1a !important;
}

/* Footer - Comprehensive Dark Mode Fix */
[data-theme="dark"] footer,
[data-theme="dark"] .modern-footer {
    background-color: #1a1a1a !important;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
    border-top-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] footer *,
[data-theme="dark"] .modern-footer * {
    color: #e5e7eb !important;
}

[data-theme="dark"] footer h5,
[data-theme="dark"] footer h6,
[data-theme="dark"] footer h4 {
    color: #ffffff !important;
}

[data-theme="dark"] footer .text-muted {
    color: #9ca3af !important;
}

/* Footer Section Titles */
[data-theme="dark"] footer .section-title,
[data-theme="dark"] .footer-section .section-title,
[data-theme="dark"] .footer-section h5 {
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* Footer Links - High Contrast */
[data-theme="dark"] footer a,
[data-theme="dark"] .footer-links a,
[data-theme="dark"] .footer-link,
[data-theme="dark"] .footer-links li a {
    color: #cbd5e1 !important;
    text-decoration: none !important;
}

[data-theme="dark"] footer a:hover,
[data-theme="dark"] .footer-links a:hover,
[data-theme="dark"] .footer-link:hover,
[data-theme="dark"] .footer-links li a:hover {
    color: var(--primary-color) !important;
    text-decoration: none !important;
}

/* Footer Brand */
[data-theme="dark"] footer .footer-brand,
[data-theme="dark"] .footer-section {
    color: #e5e7eb !important;
}

[data-theme="dark"] .brand-description,
[data-theme="dark"] footer .brand-description {
    color: #9ca3af !important;
}

[data-theme="dark"] .brand-text,
[data-theme="dark"] footer .brand-text {
    color: #ffffff !important;
}

/* Footer Bottom */
[data-theme="dark"] .footer-main {
    background-color: transparent !important;
}

[data-theme="dark"] .footer-bottom {
    background-color: rgba(0, 0, 0, 0.3) !important;
    border-top-color: #404040 !important;
}

[data-theme="dark"] .copyright,
[data-theme="dark"] footer .copyright {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .footer-legal,
[data-theme="dark"] .footer-legal a {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .footer-legal a:hover {
    color: var(--primary-color) !important;
}

[data-theme="dark"] .footer-legal .separator {
    color: #6b7280 !important;
}

/* Footer Sponsors */
[data-theme="dark"] .footer-sponsors,
[data-theme="dark"] .footer-sponsor-link {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .footer-sponsor-link:hover {
    color: var(--primary-color) !important;
}

/* Social Links */
[data-theme="dark"] .social-links,
[data-theme="dark"] .social-link {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .social-link:hover {
    color: var(--primary-color) !important;
}

/* Body and HTML - Ultimate Background Fix */
[data-theme="dark"] body {
    background-color: #1a1a1a !important;
    background: #1a1a1a !important;
}

[data-theme="dark"] html {
    background-color: #1a1a1a !important;
    background: #1a1a1a !important;
}

/* All Light Gray Backgrounds */
[data-theme="dark"] [style*="background: var(--light-gray)"],
[data-theme="dark"] [style*="background-color: var(--light-gray)"],
[data-theme="dark"] [style*="background:#f8f9fa"],
[data-theme="dark"] [style*="background-color:#f8f9fa"],
[data-theme="dark"] [style*="background: #f8f9fa"],
[data-theme="dark"] [style*="background-color: #f8f9fa"],
[data-theme="dark"] [style*="background:#e9ecef"],
[data-theme="dark"] [style*="background-color:#e9ecef"],
[data-theme="dark"] [style*="background: #e9ecef"],
[data-theme="dark"] [style*="background-color: #e9ecef"] {
    background-color: #1a1a1a !important;
    background: #1a1a1a !important;
}

/* Force var(--light-gray) to dark */
[data-theme="dark"] .bg-light,
[data-theme="dark"] [class*="bg-light"] {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
}

[data-theme="dark"] .related-group-item:hover {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    color: #ffffff !important;
}

[data-theme="dark"] .related-group-item * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .related-group-item:hover * {
    color: #ffffff !important;
}

[data-theme="dark"] .related-group-info h6 {
    color: #e5e7eb !important;
    font-weight: 600 !important;
}

[data-theme="dark"] .related-group-item:hover .related-group-info h6 {
    color: #ffffff !important;
}

[data-theme="dark"] .related-group-info p {
    color: #9ca3af !important;
}

[data-theme="dark"] .related-group-item:hover .related-group-info p {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .related-group-info small {
    color: #6c757d !important;
}

[data-theme="dark"] .related-group-item:hover .related-group-info small {
    color: #9ca3af !important;
}

[data-theme="dark"] .related-placeholder {
    background-color: #2d2d2d !important;
    color: #9ca3af !important;
}

[data-theme="dark"] .related-placeholder i {
    color: #9ca3af !important;
}

/* Action Buttons */
[data-theme="dark"] .btn-action {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%) !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .btn-action * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .btn-action:hover {
    background: linear-gradient(135deg, #404040 0%, #555555 100%) !important;
    color: #ffffff !important;
}

[data-theme="dark"] .btn-action:hover * {
    color: #ffffff !important;
}

/* Breadcrumb in Hero */
[data-theme="dark"] .group-hero .breadcrumb {
    background: rgba(0, 0, 0, 0.2) !important;
}

[data-theme="dark"] .group-hero .breadcrumb-item a,
[data-theme="dark"] .group-hero .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Page Background */
[data-theme="dark"] body,
[data-theme="dark"] html {
    background-color: #1a1a1a !important;
}

[data-theme="dark"] .container,
[data-theme="dark"] .container-fluid {
    background-color: transparent !important;
}

/* Force white backgrounds to dark - ULTIMATE OVERRIDE */
[data-theme="dark"] .bg-white,
[data-theme="dark"] [class*="bg-white"],
[data-theme="dark"] [style*="background: white"],
[data-theme="dark"] [style*="background-color: white"],
[data-theme="dark"] [style*="background:#fff"],
[data-theme="dark"] [style*="background-color:#fff"],
[data-theme="dark"] [style*="background:#ffffff"],
[data-theme="dark"] [style*="background-color:#ffffff"],
[data-theme="dark"] [style*="background: #fff"],
[data-theme="dark"] [style*="background-color: #fff"],
[data-theme="dark"] [style*="background: #ffffff"],
[data-theme="dark"] [style*="background-color: #ffffff"],
[data-theme="dark"] [style*="background:#f8f9fa"],
[data-theme="dark"] [style*="background-color:#f8f9fa"],
[data-theme="dark"] [style*="background: #f8f9fa"],
[data-theme="dark"] [style*="background-color: #f8f9fa"] {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
}

/* Force text colors in white/light backgrounds */
[data-theme="dark"] [style*="background: white"] *,
[data-theme="dark"] [style*="background-color: white"] *,
[data-theme="dark"] [style*="background:#fff"] *,
[data-theme="dark"] [style*="background-color:#fff"] *,
[data-theme="dark"] [style*="background:#ffffff"] *,
[data-theme="dark"] [style*="background-color:#ffffff"] *,
[data-theme="dark"] [style*="background: #fff"] *,
[data-theme="dark"] [style*="background-color: #fff"] *,
[data-theme="dark"] [style*="background: #ffffff"] *,
[data-theme="dark"] [style*="background-color: #ffffff"] *,
[data-theme="dark"] [style*="background:#f8f9fa"] *,
[data-theme="dark"] [style*="background-color:#f8f9fa"] *,
[data-theme="dark"] [style*="background: #f8f9fa"] *,
[data-theme="dark"] [style*="background-color: #f8f9fa"] * {
    color: #e5e7eb !important;
}

/* All text in white backgrounds */
[data-theme="dark"] .bg-white *,
[data-theme="dark"] [class*="bg-white"] * {
    color: #e5e7eb !important;
}

/* Inline style color overrides */
[data-theme="dark"] [style*="color: #495057"],
[data-theme="dark"] [style*="color:#495057"],
[data-theme="dark"] [style*="color: #212529"],
[data-theme="dark"] [style*="color:#212529"],
[data-theme="dark"] [style*="color: #333"],
[data-theme="dark"] [style*="color:#333"],
[data-theme="dark"] [style*="color: #6c757d"],
[data-theme="dark"] [style*="color:#6c757d"] {
    color: #e5e7eb !important;
}

/* COMPREHENSIVE DARK MODE FIX - All Text Colors */
/* Remove aggressive universal selector - use specific selectors instead */

/* Specific color overrides for common dark text colors */
[data-theme="dark"] [style*="color: #495057"],
[data-theme="dark"] [style*="color:#495057"],
[data-theme="dark"] [style*="color: #333"],
[data-theme="dark"] [style*="color:#333"],
[data-theme="dark"] [style*="color: #212529"],
[data-theme="dark"] [style*="color:#212529"],
[data-theme="dark"] [style*="color: #000"],
[data-theme="dark"] [style*="color:#000"],
[data-theme="dark"] [style*="color: #6c757d"],
[data-theme="dark"] [style*="color:#6c757d"] {
    color: #e5e7eb !important;
}

/* All headings */
[data-theme="dark"] h1:not([class*="text-"]):not([style*="color"]),
[data-theme="dark"] h2:not([class*="text-"]):not([style*="color"]),
[data-theme="dark"] h3:not([class*="text-"]):not([style*="color"]),
[data-theme="dark"] h4:not([class*="text-"]):not([style*="color"]),
[data-theme="dark"] h5:not([class*="text-"]):not([style*="color"]),
[data-theme="dark"] h6:not([class*="text-"]):not([style*="color"]) {
    color: #e5e7eb !important;
}

/* All paragraphs and text */
[data-theme="dark"] p:not([class*="text-"]):not([style*="color"]),
[data-theme="dark"] div:not([class*="text-"]):not([class*="alert"]):not([class*="card"]):not([style*="color"]),
[data-theme="dark"] span:not([class*="text-"]):not([class*="badge"]):not([class*="btn"]):not([style*="color"]) {
    color: #e5e7eb !important;
}

/* Group Header Text */
[data-theme="dark"] .group-header,
[data-theme="dark"] .group-title,
[data-theme="dark"] .group-name,
[data-theme="dark"] .group-info {
    color: #e5e7eb !important;
}

/* Statistics */
[data-theme="dark"] .statistics,
[data-theme="dark"] .stat-item,
[data-theme="dark"] .stat-number,
[data-theme="dark"] .stat-text,
[data-theme="dark"] [class*="stat-"] {
    color: #e5e7eb !important;
}

/* All containers and sections */
[data-theme="dark"] section,
[data-theme="dark"] .section,
[data-theme="dark"] article,
[data-theme="dark"] aside {
    background-color: var(--white) !important;
    color: var(--dark) !important;
}

/* All white backgrounds */
[data-theme="dark"] .white,
[data-theme="dark"] [class*="white"],
[data-theme="dark"] [class*="bg-white"],
[data-theme="dark"] [style*="background"],
[data-theme="dark"] [style*="background-color"] {
    background-color: #2d2d2d !important;
}

/* Override inline styles */
[data-theme="dark"] [style*="background: white"] {
    background: #2d2d2d !important;
}

[data-theme="dark"] [style*="background-color: white"] {
    background-color: #2d2d2d !important;
}

[data-theme="dark"] [style*="background:#fff"] {
    background: #2d2d2d !important;
}

[data-theme="dark"] [style*="background-color:#fff"] {
    background-color: #2d2d2d !important;
}

[data-theme="dark"] [style*="background:#ffffff"] {
    background: #2d2d2d !important;
}

[data-theme="dark"] [style*="background-color:#ffffff"] {
    background-color: #2d2d2d !important;
}

/* Force text colors in white backgrounds */
[data-theme="dark"] [style*="background: white"] *,
[data-theme="dark"] [style*="background-color: white"] *,
[data-theme="dark"] [style*="background:#fff"] *,
[data-theme="dark"] [style*="background-color:#fff"] *,
[data-theme="dark"] [style*="background:#ffffff"] *,
[data-theme="dark"] [style*="background-color:#ffffff"] * {
    color: #e5e7eb !important;
}

/* Common text color classes */
[data-theme="dark"] .text-body,
[data-theme="dark"] .text-dark {
    color: #e5e7eb !important;
}

[data-theme="dark"] .text-secondary {
    color: #9ca3af !important;
}

[data-theme="dark"] .text-black {
    color: #ffffff !important;
}

/* Group Detail Specific */
[data-theme="dark"] .group-detail-page,
[data-theme="dark"] .group-hero,
[data-theme="dark"] .group-header,
[data-theme="dark"] .group-info {
    color: #e5e7eb !important;
}

[data-theme="dark"] .group-header * {
    color: #e5e7eb !important;
}

/* Breadcrumb */
[data-theme="dark"] .breadcrumb,
[data-theme="dark"] .breadcrumb-item,
[data-theme="dark"] .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8) !important;
}

[data-theme="dark"] .breadcrumb-item.active {
    color: #ffffff !important;
}

/* Modal */
[data-theme="dark"] .modal-content {
    background-color: #2d2d2d !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .modal-header {
    background-color: #1a1a1a !important;
    border-bottom-color: #404040 !important;
}

[data-theme="dark"] .modal-header * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .modal-body {
    background-color: #2d2d2d !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .modal-footer {
    background-color: #1a1a1a !important;
    border-top-color: #404040 !important;
}

/* Dropdown */
[data-theme="dark"] .dropdown-menu {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
}

[data-theme="dark"] .dropdown-item {
    color: #e5e7eb !important;
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: var(--primary-color) !important;
}

/* Tooltip */
[data-theme="dark"] .tooltip-inner {
    background-color: #2d2d2d !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .tooltip.bs-tooltip-top .arrow::before {
    border-top-color: #2d2d2d !important;
}

/* Popover */
[data-theme="dark"] .popover {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .popover-header {
    background-color: #1a1a1a !important;
    border-bottom-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .popover-body {
    background-color: #2d2d2d !important;
    color: #e5e7eb !important;
}

/* Input Groups */
[data-theme="dark"] .input-group-text {
    background-color: #1a1a1a !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

/* List Groups */
[data-theme="dark"] .list-group-item {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .list-group-item.active {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
}

/* Progress Bars */
[data-theme="dark"] .progress {
    background-color: #1a1a1a !important;
}

[data-theme="dark"] .progress-bar {
    background-color: var(--primary-color) !important;
}

/* Close Button */
[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Spinner */
[data-theme="dark"] .spinner-border,
[data-theme="dark"] .spinner-grow {
    color: var(--primary-color) !important;
}

/* Code */
[data-theme="dark"] code {
    background-color: #1a1a1a !important;
    color: #e5e7eb !important;
    border-color: #404040 !important;
}

/* Kbd */
[data-theme="dark"] kbd {
    background-color: #1a1a1a !important;
    color: #e5e7eb !important;
    border-color: #404040 !important;
}

/* Pre */
[data-theme="dark"] pre {
    background-color: #1a1a1a !important;
    color: #e5e7eb !important;
    border-color: #404040 !important;
}

/* Blockquote */
[data-theme="dark"] blockquote {
    border-left-color: var(--primary-color) !important;
    color: #9ca3af !important;
}

/* Figure */
[data-theme="dark"] figure {
    color: #e5e7eb !important;
}

/* HR */
[data-theme="dark"] hr {
    border-color: #404040 !important;
    opacity: 1 !important;
}

/* Selection */
[data-theme="dark"] ::selection {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
}

[data-theme="dark"] ::-moz-selection {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
}

/* Scrollbar */
[data-theme="dark"] ::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #1a1a1a;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 6px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #555555;
}

/* Force all white backgrounds to dark */
[data-theme="dark"] *[style*="background"]:not([style*="gradient"]):not([style*="url"]) {
    background-color: #2d2d2d !important;
}

/* Force text colors in all elements */
[data-theme="dark"] *:not([class*="text-"]):not([style*="color"]) {
    color: #e5e7eb !important;
}

/* But allow specific overrides */
[data-theme="dark"] .text-primary,
[data-theme="dark"] .text-success,
[data-theme="dark"] .text-danger,
[data-theme="dark"] .text-warning,
[data-theme="dark"] .text-info,
[data-theme="dark"] .text-muted {
    color: inherit !important;
}

/* Images - keep original but add dark overlay if needed */
[data-theme="dark"] img {
    opacity: 0.9;
}

[data-theme="dark"] img:hover {
    opacity: 1;
}

[data-theme="dark"] .border {
    border-color: #404040 !important;
}

[data-theme="dark"] .hero-section,
html[data-theme="dark"] .hero-section,
body[data-theme="dark"] .hero-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
}

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

[data-theme="dark"] .section-subtitle {
    color: var(--gray);
}

[data-theme="dark"] .group-title,
[data-theme="dark"] .platform-name-compact,
[data-theme="dark"] .category-name {
    color: var(--dark);
}

[data-theme="dark"] .group-description,
[data-theme="dark"] .platform-count,
[data-theme="dark"] .category-count {
    color: var(--gray);
}

[data-theme="dark"] footer {
    background-color: #1a1a1a !important;
}

[data-theme="dark"] footer h5,
[data-theme="dark"] footer h6 {
    color: var(--dark);
}

[data-theme="dark"] footer .text-muted {
    color: var(--gray) !important;
}

[data-theme="dark"] footer a {
    color: var(--gray) !important;
}

[data-theme="dark"] footer a:hover {
    color: var(--primary-color) !important;
}

[data-theme="dark"] .navbar {
    background-color: #1a1a1a !important;
    border-bottom: 1px solid #404040;
}

[data-theme="dark"] .navbar-brand,
[data-theme="dark"] .navbar-nav .nav-link {
    color: #ffffff !important;
}

/* Logo fallback özel renk */
[data-theme="dark"] .logo-fallback {
    color: #ffffff !important;
}

[data-theme="dark"] .navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

[data-theme="dark"] .navbar-toggler {
    border-color: #404040;
}

[data-theme="dark"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Logo fallback light mode */
.logo-fallback {
    color: #212529 !important;
    font-weight: 700 !important;
    font-size: 1.5rem !important;
}

/* Theme Toggle Button */
#theme-toggle {
    border: 1px solid #dee2e6;
    background: white;
    color: #6c757d;
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    background: #f8f9fa;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

[data-theme="dark"] #theme-toggle {
    background: #2d2d2d;
    border-color: #404040;
    color: var(--dark);
}

[data-theme="dark"] #theme-toggle:hover {
    background: #404040;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Modern Top Alert */
.modern-top-alert {
    background: var(--gradient-primary);
    border: none;
    border-bottom: 1px solid rgba(17, 153, 142, 0.2);
    color: #ffffff !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: slideInDown 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.modern-top-alert .container {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    position: relative;
    min-height: 60px;
}

.modern-top-alert .alert-content {
    display: flex;
    align-items: center;
    flex: 1;
    width: 100%;
    justify-content: flex-start;
    padding-left: 40px;
    padding-right: 50px;
}

.modern-top-alert .alert-content span {
    text-align: left;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: block;
    width: 100%;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.modern-top-alert .alert-content i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.modern-top-alert i {
    color: #ffffff !important;
    font-size: 16px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.modern-top-alert .alert-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff !important;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.modern-top-alert .alert-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: #ffffff !important;
}

.modern-top-alert .alert-close-btn:active {
    transform: scale(0.95);
}

.modern-top-alert .alert-close-btn i {
    font-size: 12px;
    font-weight: 600;
}

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

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

/* Advertisement Grid Styling */
.header-ads {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border-bottom: 1px solid #dee2e6;
}

.ad-banner {
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ad-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ad-banner img {
    transition: all 0.3s ease;
    border-radius: 8px;
}

.ad-banner:hover img {
    transform: scale(1.02);
}

.ad-text-banner {
    transition: all 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-text-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Desktop Advertisement Sizes */
@media (min-width: 769px) {
    .ad-banner {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .ad-banner img {
        width: 100%;
        object-fit: cover;
    }
    
    .ad-text-banner {
        width: 100%;
        font-weight: 600;
        text-align: center;
        font-size: 0.9rem;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .modern-top-alert .container {
        padding: 14px 16px;
        min-height: 55px;
    }
    
    .modern-top-alert .alert-content {
        padding-left: 35px;
        padding-right: 45px;
    }
    
    .modern-top-alert .alert-content span {
        text-align: left;
        font-weight: 500;
        font-size: 14px;
        line-height: 1.4;
    }
    
    .modern-top-alert .alert-content i {
        left: 16px;
        font-size: 16px;
    }
    
    .modern-top-alert .alert-close-btn {
        width: 30px;
        height: 30px;
        padding: 7px;
        right: 16px;
    }
    
    .modern-top-alert .alert-close-btn i {
        font-size: 12px;
    }
    
    /* Mobile Advertisement Adjustments */
    .header-ads {
        padding: 0.75rem 0 !important;
    }
    
    .header-ads .container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        max-width: 100% !important;
    }
    
    .header-ads .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .header-ads .col-12 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .ad-banner {
        margin-bottom: 1rem;
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .ad-banner img {
        height: auto;
        max-height: 300px;
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        margin: 0 auto !important;
    }
    
    .ad-text-banner {
        height: 150px;
        font-size: 0.9rem !important;
        width: 100% !important;
        margin: 0 auto !important;
    }
}

/* Küçük mobil ekranlar için ekstra ortalamalar */
@media (max-width: 576px) {
    .header-ads .container {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    .header-ads .col-12 {
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
    }
    
    .ad-banner {
        margin-bottom: 0.75rem;
    }
    
    .ad-banner img {
        max-height: 250px;
    }
    
    .ad-text-banner {
        height: 120px;
        font-size: 0.85rem !important;
    }
}

@media (max-width: 480px) {
    .modern-top-alert .container {
        padding: 12px 14px;
        min-height: 50px;
    }
    
    .modern-top-alert .alert-content {
        padding-left: 32px;
        padding-right: 40px;
    }
    
    .modern-top-alert .alert-content span {
        text-align: left;
        font-weight: 500;
        font-size: 13px;
        line-height: 1.3;
    }
    
    .modern-top-alert .alert-content i {
        left: 14px;
        font-size: 15px;
    }
    
    .modern-top-alert .alert-close-btn {
        width: 28px;
        height: 28px;
        padding: 6px;
        right: 14px;
    }
    
    .modern-top-alert .alert-close-btn i {
        font-size: 11px;
    }
}

/* ==========================================================================
   UNIVERSAL DARK MODE - ALL PAGES
   ========================================================================== */

/* Privacy Policy Page - Comprehensive Dark Mode */
[data-theme="dark"] .privacy-page {
    background-color: #1a1a1a !important;
    background: #1a1a1a !important;
}

[data-theme="dark"] .privacy-hero {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%) !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .privacy-hero * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .privacy-content {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .privacy-content * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .privacy-section {
    background-color: #2d2d2d !important;
    border-bottom-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .privacy-section:hover {
    background-color: #333333 !important;
}

[data-theme="dark"] .section-header {
    color: #e5e7eb !important;
}

[data-theme="dark"] .section-title {
    color: #e5e7eb !important;
}

[data-theme="dark"] .section-content {
    color: #e5e7eb !important;
}

[data-theme="dark"] .section-content p {
    color: #9ca3af !important;
}

[data-theme="dark"] .data-item {
    background-color: #1a1a1a !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .usage-item,
[data-theme="dark"] .right-item,
[data-theme="dark"] .retention-item,
[data-theme="dark"] .exception-item {
    background-color: #1a1a1a !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .usage-item:hover,
[data-theme="dark"] .right-item:hover {
    background-color: #2d2d2d !important;
}

[data-theme="dark"] .usage-item h5,
[data-theme="dark"] .right-item h5,
[data-theme="dark"] .retention-item h5 {
    color: #e5e7eb !important;
}

[data-theme="dark"] .usage-item p,
[data-theme="dark"] .right-item p,
[data-theme="dark"] .retention-item p {
    color: #9ca3af !important;
}

[data-theme="dark"] .contact-link {
    color: var(--primary-color) !important;
}

/* Terms Page - Dark Mode */
[data-theme="dark"] .terms-page,
[data-theme="dark"] .terms-hero,
[data-theme="dark"] .terms-content {
    background-color: #1a1a1a !important;
    background: #1a1a1a !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .terms-hero {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%) !important;
}

[data-theme="dark"] .terms-content {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
}

[data-theme="dark"] .terms-content * {
    color: #e5e7eb !important;
}

/* About Page - Dark Mode */
[data-theme="dark"] .about-page,
[data-theme="dark"] .about-hero,
[data-theme="dark"] .about-content {
    background-color: #1a1a1a !important;
    background: #1a1a1a !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .about-hero {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%) !important;
}

[data-theme="dark"] .about-content {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
}

[data-theme="dark"] .about-content * {
    color: #e5e7eb !important;
}

/* FAQ Page - Dark Mode */
[data-theme="dark"] .faq-page,
[data-theme="dark"] .faq-hero,
[data-theme="dark"] .faq-content {
    background-color: #1a1a1a !important;
    background: #1a1a1a !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .faq-hero {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%) !important;
}

[data-theme="dark"] .faq-content {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
}

[data-theme="dark"] .faq-content * {
    color: #e5e7eb !important;
}

/* Contact Page - Dark Mode */
[data-theme="dark"] .contact-page,
[data-theme="dark"] .contact-hero,
[data-theme="dark"] .contact-content {
    background-color: #1a1a1a !important;
    background: #1a1a1a !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .contact-hero {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%) !important;
}

[data-theme="dark"] .contact-content {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
}

[data-theme="dark"] .contact-content * {
    color: #e5e7eb !important;
}

/* Generic Page Styles - Dark Mode (Universal Pattern Matching) */
[data-theme="dark"] [class*="-page"] {
    background-color: #1a1a1a !important;
    background: #1a1a1a !important;
}

[data-theme="dark"] [class*="-hero"] {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%) !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] [class*="-hero"] * {
    color: #e5e7eb !important;
}

[data-theme="dark"] [class*="-content"] {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] [class*="-content"] * {
    color: #e5e7eb !important;
}

[data-theme="dark"] [class*="-section"]:not(.categories-hero):not(.group-hero) {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] [class*="-section"]:not(.categories-hero):not(.group-hero) * {
    color: #e5e7eb !important;
}

/* Universal Dark Mode - Catch All Rules */
[data-theme="dark"] [class*="-item"]:not(.dropdown-item):not(.list-group-item):not(.nav-item):not(.btn) {
    background-color: #1a1a1a !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] [class*="-list"] {
    color: #e5e7eb !important;
}

[data-theme="dark"] [class*="-list"] * {
    color: #e5e7eb !important;
}

/* Platforms Page - Comprehensive Dark Mode */
[data-theme="dark"] .platforms-section {
    background-color: #1a1a1a !important;
    background: #1a1a1a !important;
}

[data-theme="dark"] .platforms-section .section-subtitle {
    color: #9ca3af !important;
}

[data-theme="dark"] .platform-grid-card {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .platform-grid-card * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .platform-grid-card:hover {
    background-color: #333333 !important;
    border-color: var(--primary-color) !important;
}

[data-theme="dark"] .platform-grid-title {
    color: #e5e7eb !important;
}

[data-theme="dark"] .platform-grid-icon {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .platform-grid-icon i {
    color: var(--primary-color) !important;
}

[data-theme="dark"] .platform-grid-card:hover .platform-grid-icon {
    background-color: rgba(0, 136, 204, 0.2) !important;
}

[data-theme="dark"] .empty-state {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .empty-state * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .empty-state-title {
    color: #e5e7eb !important;
}

[data-theme="dark"] .empty-state-description {
    color: #9ca3af !important;
}

[data-theme="dark"] .platform-icon {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .platform-icon i {
    color: var(--primary-color) !important;
}

[data-theme="dark"] .platform-card-link:hover .platform-icon {
    background-color: rgba(0, 136, 204, 0.2) !important;
}

/* Platforms Hero Section */
[data-theme="dark"] .platforms-hero {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%) !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .platforms-hero * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .platforms-hero .page-subtitle {
    color: #9ca3af !important;
}

/* Platforms Grid Section */
[data-theme="dark"] .platforms-grid-section {
    background-color: #1a1a1a !important;
    background: #1a1a1a !important;
}

/* All page-subtitle elements in dark mode */
[data-theme="dark"] .page-subtitle {
    color: #9ca3af !important;
}

/* About Page - Feature Cards Dark Mode */
[data-theme="dark"] .feature-card {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .feature-card * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .feature-card:hover {
    background-color: #333333 !important;
    border-left-color: var(--primary-color) !important;
}

[data-theme="dark"] .feature-card h5 {
    color: #e5e7eb !important;
}

[data-theme="dark"] .feature-card p {
    color: #9ca3af !important;
}

[data-theme="dark"] .workflow-step {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .workflow-step * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .step-content h5 {
    color: #e5e7eb !important;
}

[data-theme="dark"] .step-content p {
    color: #9ca3af !important;
}

[data-theme="dark"] .stat-item {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .stat-item:hover {
    border-color: var(--primary-color) !important;
}

[data-theme="dark"] .stat-label {
    color: #9ca3af !important;
}

/* Hero Section - Dark Mode */
[data-theme="dark"] .hero-section {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%) !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .hero-section * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .hero-title {
    color: #ffffff !important;
}

[data-theme="dark"] .hero-subtitle {
    color: #9ca3af !important;
}

/* Hero Search Bar - Dark Mode */
[data-theme="dark"] .hero-search .form-control {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .hero-search .form-control::placeholder {
    color: #9ca3af !important;
}

[data-theme="dark"] .hero-search .form-control:focus {
    background-color: #2d2d2d !important;
    border-color: var(--primary-color) !important;
    color: #e5e7eb !important;
    box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.2) !important;
}

[data-theme="dark"] .hero-search .input-group {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
}

[data-theme="dark"] .hero-search .btn {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
}

[data-theme="dark"] .hero-search .btn:hover {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

[data-theme="dark"] .hero-stats-minimal,
[data-theme="dark"] .hero-stats {
    color: #e5e7eb !important;
}

/* Group Detail Page - Comprehensive Dark Mode Fix for Squares/Cards */
[data-theme="dark"] .group-detail-page {
    background-color: #1a1a1a !important;
    background: #1a1a1a !important;
}

[data-theme="dark"] .group-hero {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%) !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .group-hero * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .group-header {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .group-header * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .content-section {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .content-section * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .section-header {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%) !important;
    background-color: #2d2d2d !important;
    border-bottom-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .section-header * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .section-header h3,
[data-theme="dark"] .section-header h5 {
    color: #e5e7eb !important;
}

[data-theme="dark"] .section-content {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .section-content * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .description-text {
    color: #9ca3af !important;
}

[data-theme="dark"] .sidebar-card {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .sidebar-card * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .sidebar-card .card-header {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%) !important;
    background-color: #2d2d2d !important;
    border-bottom-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .sidebar-card .card-header h5 {
    color: #e5e7eb !important;
}

[data-theme="dark"] .sidebar-card .card-body {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .info-item {
    background-color: #1a1a1a !important;
    background: #1a1a1a !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .info-label {
    color: #9ca3af !important;
}

[data-theme="dark"] .info-value {
    color: #e5e7eb !important;
}

/* All white backgrounds in group detail page */
[data-theme="dark"] .group-detail-page [style*="background: white"],
[data-theme="dark"] .group-detail-page [style*="background-color: white"],
[data-theme="dark"] .group-detail-page [style*="background:#fff"],
[data-theme="dark"] .group-detail-page [style*="background-color:#fff"],
[data-theme="dark"] .group-detail-page [style*="background: #fff"],
[data-theme="dark"] .group-detail-page [style*="background-color: #fff"] {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .group-detail-page [style*="background: white"] *,
[data-theme="dark"] .group-detail-page [style*="background-color: white"] *,
[data-theme="dark"] .group-detail-page [style*="background:#fff"] *,
[data-theme="dark"] .group-detail-page [style*="background-color:#fff"] * {
    color: #e5e7eb !important;
}

/* All light gray backgrounds */
[data-theme="dark"] .group-detail-page [style*="background: #f8f9fa"],
[data-theme="dark"] .group-detail-page [style*="background-color: #f8f9fa"],
[data-theme="dark"] .group-detail-page [style*="background:#f8f9fa"],
[data-theme="dark"] .group-detail-page [style*="background-color:#f8f9fa"] {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    border-color: #404040 !important;
}

/* Group Statistics Cards - Dark Mode (Universal Fix) */
[data-theme="dark"] .stat-item {
    background-color: rgba(45, 45, 45, 0.5) !important;
    background: rgba(45, 45, 45, 0.5) !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
    padding: 0.75rem 1rem !important;
    border-radius: 12px !important;
    border: 1px solid rgba(64, 64, 64, 0.5) !important;
}

[data-theme="dark"] .stat-item * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .stat-number {
    color: #ffffff !important;
}

[data-theme="dark"] .stat-label {
    color: #9ca3af !important;
}

[data-theme="dark"] .stat-item i {
    color: var(--primary-color) !important;
}

[data-theme="dark"] .group-stats .stat-item {
    background-color: rgba(45, 45, 45, 0.5) !important;
    background: rgba(45, 45, 45, 0.5) !important;
    border-color: #404040 !important;
    padding: 1rem !important;
    border-radius: 12px !important;
    border: 1px solid rgba(64, 64, 64, 0.5) !important;
}

/* All Statistics Cards - Universal Dark Mode */
[data-theme="dark"] [class*="stat"]:not(.stat-number):not(.stat-label):not(.stat-text):not(.stat-item i) {
    background-color: rgba(45, 45, 45, 0.5) !important;
    background: rgba(45, 45, 45, 0.5) !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] [class*="stats"]:not(.stat-item):not(.stat-number):not(.stat-label) {
    background-color: transparent !important;
    background: transparent !important;
}

/* Statistics Row - Dark Mode */
[data-theme="dark"] .stats-row {
    background-color: transparent !important;
    background: transparent !important;
}

[data-theme="dark"] .stats-row .stat-item {
    background-color: rgba(45, 45, 45, 0.5) !important;
    background: rgba(45, 45, 45, 0.5) !important;
    border-color: #404040 !important;
    padding: 0.75rem 1rem !important;
    border-radius: 12px !important;
    border: 1px solid rgba(64, 64, 64, 0.5) !important;
}

[data-theme="dark"] .stats-row .stat-item * {
    color: #e5e7eb !important;
}

[data-theme="dark"] .stats-row .stat-text {
    color: #ffffff !important;
}

/* All white/gray backgrounds in stat cards */
[data-theme="dark"] .stat-item[style*="background"],
[data-theme="dark"] .stat-item[style*="background-color"],
[data-theme="dark"] [class*="stat"][style*="background: white"],
[data-theme="dark"] [class*="stat"][style*="background-color: white"],
[data-theme="dark"] [class*="stat"][style*="background:#f8f9fa"],
[data-theme="dark"] [class*="stat"][style*="background-color:#f8f9fa"] {
    background-color: rgba(45, 45, 45, 0.5) !important;
    background: rgba(45, 45, 45, 0.5) !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

/* Universal Fix - All Rectangular Cards/Boxes with Gray/White Backgrounds */
[data-theme="dark"] div[style*="background: #f8f9fa"],
[data-theme="dark"] div[style*="background-color: #f8f9fa"],
[data-theme="dark"] div[style*="background:#f8f9fa"],
[data-theme="dark"] div[style*="background-color:#f8f9fa"],
[data-theme="dark"] div[style*="background: white"],
[data-theme="dark"] div[style*="background-color: white"],
[data-theme="dark"] div[style*="background:#fff"],
[data-theme="dark"] div[style*="background-color:#fff"],
[data-theme="dark"] div[style*="background: #fff"],
[data-theme="dark"] div[style*="background-color: #fff"],
[data-theme="dark"] div[style*="background: #e9ecef"],
[data-theme="dark"] div[style*="background-color: #e9ecef"],
[data-theme="dark"] div[style*="background:#e9ecef"],
[data-theme="dark"] div[style*="background-color:#e9ecef"],
[data-theme="dark"] div[style*="background: rgba(255, 255, 255"],
[data-theme="dark"] div[style*="background-color: rgba(255, 255, 255"] {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] div[style*="background: #f8f9fa"] *,
[data-theme="dark"] div[style*="background-color: #f8f9fa"] *,
[data-theme="dark"] div[style*="background:#f8f9fa"] *,
[data-theme="dark"] div[style*="background-color:#f8f9fa"] *,
[data-theme="dark"] div[style*="background: white"] *,
[data-theme="dark"] div[style*="background-color: white"] *,
[data-theme="dark"] div[style*="background:#fff"] *,
[data-theme="dark"] div[style*="background-color:#fff"] *,
[data-theme="dark"] div[style*="background: #fff"] *,
[data-theme="dark"] div[style*="background-color: #fff"] *,
[data-theme="dark"] div[style*="background: #e9ecef"] *,
[data-theme="dark"] div[style*="background-color: #e9ecef"] *,
[data-theme="dark"] div[style*="background:#e9ecef"] *,
[data-theme="dark"] div[style*="background-color:#e9ecef"] *,
[data-theme="dark"] div[style*="background: rgba(255, 255, 255"] *,
[data-theme="dark"] div[style*="background-color: rgba(255, 255, 255"] * {
    color: #e5e7eb !important;
}

/* Search Form Containers - Dark Mode */
[data-theme="dark"] form[style*="background"],
[data-theme="dark"] form[style*="background-color"],
[data-theme="dark"] .search-form[style*="background"],
[data-theme="dark"] .search-form[style*="background-color"],
[data-theme="dark"] .search-container[style*="background"],
[data-theme="dark"] .search-container[style*="background-color"] {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

/* Search Results Message - Dark Mode */
[data-theme="dark"] div[style*="background: linear-gradient(135deg, rgba(0, 136, 204, 0.05)"] {
    background: linear-gradient(135deg, rgba(0, 136, 204, 0.15) 0%, rgba(37, 211, 102, 0.15) 100%) !important;
    background-color: #2d2d2d !important;
    border-color: rgba(0, 136, 204, 0.3) !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] div[style*="background: linear-gradient(135deg, rgba(0, 136, 204, 0.05)"] h3,
[data-theme="dark"] div[style*="background: linear-gradient(135deg, rgba(0, 136, 204, 0.05)"] p,
[data-theme="dark"] div[style*="background: linear-gradient(135deg, rgba(0, 136, 204, 0.05)"] span {
    color: #e5e7eb !important;
}

[data-theme="dark"] div[style*="background: linear-gradient(135deg, rgba(0, 136, 204, 0.05)"] h3 span[style*="color: #6c757d"] {
    color: #9ca3af !important;
}

[data-theme="dark"] div[style*="background: linear-gradient(135deg, rgba(0, 136, 204, 0.05)"] h3 span[style*="color: var(--primary-color"] {
    color: var(--primary-color) !important;
}

[data-theme="dark"] div[style*="background: linear-gradient(135deg, rgba(0, 136, 204, 0.05)"] p strong {
    color: var(--primary-color) !important;
}

[data-theme="dark"] div[style*="background: linear-gradient(135deg, rgba(0, 136, 204, 0.05)"] i.fa-check-circle {
    color: #27ae60 !important;
}

[data-theme="dark"] div[style*="background: linear-gradient(135deg, rgba(0, 136, 204, 0.05)"] div[style*="background: var(--primary-color"] {
    background: var(--primary-color) !important;
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.4) !important;
}

[data-theme="dark"] input[style*="background: rgba(255, 255, 255"]::placeholder,
[data-theme="dark"] input[style*="background-color: rgba(255, 255, 255"]::placeholder,
[data-theme="dark"] input[style*="background: white"]::placeholder,
[data-theme="dark"] input[style*="background-color: white"]::placeholder,
[data-theme="dark"] .form-control[style*="background: rgba(255, 255, 255"]::placeholder,
[data-theme="dark"] .form-control[style*="background-color: rgba(255, 255, 255"]::placeholder,
[data-theme="dark"] .form-control[style*="background: white"]::placeholder,
[data-theme="dark"] .form-control[style*="background-color: white"]::placeholder {
    color: #9ca3af !important;
}

/* Input Group - Dark Mode */
[data-theme="dark"] .input-group[style*="background"],
[data-theme="dark"] .input-group[style*="background-color"] {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    border-color: #404040 !important;
}

[data-theme="dark"] .input-group[style*="background"] *,
[data-theme="dark"] .input-group[style*="background-color"] * {
    color: #e5e7eb !important;
}

/* All Form Controls - Universal Dark Mode Override */
[data-theme="dark"] .form-control:not([style*="background: rgba(255, 255, 255, 0"]) {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .form-control:focus {
    background-color: #2d2d2d !important;
    background: #2d2d2d !important;
    border-color: var(--primary-color) !important;
    color: #e5e7eb !important;
    box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.2) !important;
}




