/* =========================================
   TERMINATOR THEME OVERRIDES (BLACK & RED)
   ========================================= */
   html[data-theme="terminator"] {
    --primary-color: #ff0000; /* Pure Red for Terminator accents */
    --secondary-color: #8b0000; /* Dark red for secondary elements */
    --success-color: #82b704; 
    --danger-color: #ff3333; /* Standard Danger Color */
    --accent-dark: #ffffff; /* Bright white for headings */
    --accent-light: #1a0000; /* Very dark red/black for input backgrounds */
    --bg-color: #000000; /* Pure black background */
    --surface-color: #0a0a0a; /* Slightly lighter black for cards */
    --text-main: #e0e0e0; /* Light gray for main text */
    --text-muted: #888888; /* Darker gray for muted text */
    
    color-scheme: dark;
}

/* Aggressively target main containers */
html[data-theme="terminator"] body,
html[data-theme="terminator"] #wrapper,
html[data-theme="terminator"] #page-content-wrapper,
html[data-theme="terminator"] main {
    background-color: var(--bg-color) !important;
    color: var(--text-main) !important;
}

/* Surfaces & Cards */
html[data-theme="terminator"] .bg-white,
html[data-theme="terminator"] .material-card,
html[data-theme="terminator"] .sidebar,
html[data-theme="terminator"] .info-sidebar,
html[data-theme="terminator"] .app-bar,
html[data-theme="terminator"] .top-utility-bar,
html[data-theme="terminator"] .ticker-wrap,
html[data-theme="terminator"] .list-group-item,
html[data-theme="terminator"] .dropdown-menu,
html[data-theme="terminator"] .modal-content,
html[data-theme="terminator"] .modal-header,
html[data-theme="terminator"] .modal-footer {
    background-color: var(--surface-color) !important;
    color: var(--text-main) !important;
    border-color: rgba(255, 0, 0, 0.2) !important; /* Subtle red borders */
}

/* Slightly different background for contrast components */
html[data-theme="terminator"] .bg-light {
    background-color: rgba(255, 0, 0, 0.05) !important; /* Very faint red tint */
    color: var(--text-main) !important;
}

/* Typography Enforcement inside cards */
html[data-theme="terminator"] .material-card .text-dark,
html[data-theme="terminator"] .sidebar .text-dark,
html[data-theme="terminator"] .info-sidebar .text-dark,
html[data-theme="terminator"] .app-bar .text-dark,
html[data-theme="terminator"] .top-utility-bar .text-dark,
html[data-theme="terminator"] .material-card h1, 
html[data-theme="terminator"] .material-card h2, 
html[data-theme="terminator"] .material-card h3, 
html[data-theme="terminator"] .material-card h4, 
html[data-theme="terminator"] .material-card h5, 
html[data-theme="terminator"] .material-card h6 {
    color: #ffffff !important;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.3); /* Subtle red glow on headers */
}

/* Typography Enforcement outside cards (headers etc) */
html[data-theme="terminator"] h1:not(.material-card h1), 
html[data-theme="terminator"] h2:not(.material-card h2), 
html[data-theme="terminator"] h3:not(.material-card h3), 
html[data-theme="terminator"] h4:not(.material-card h4), 
html[data-theme="terminator"] h5:not(.material-card h5), 
html[data-theme="terminator"] h6:not(.material-card h6) {
    color: var(--accent-dark) !important;
}

html[data-theme="terminator"] .text-muted {
    color: var(--text-muted) !important;
}

html[data-theme="terminator"] .text-primary {
    color: var(--primary-color) !important;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(255, 0, 0, 0.6); /* Glow effect for primary text */
}

/* Danger Class Overrides */
html[data-theme="terminator"] .text-danger {
    color: var(--danger-color) !important;
}

html[data-theme="terminator"] .bg-danger {
    background-color: var(--danger-color) !important;
    color: #ffffff !important;
}

html[data-theme="terminator"] .btn-danger {
    background-color: var(--danger-color) !important;
    border-color: var(--danger-color) !important;
    color: #ffffff !important;
}

html[data-theme="terminator"] .btn-outline-danger {
    color: var(--danger-color) !important;
    border-color: var(--danger-color) !important;
}

html[data-theme="terminator"] .btn-outline-danger:hover {
    background-color: var(--danger-color) !important;
    color: #ffffff !important;
}

/* Borders and Lines */
html[data-theme="terminator"] .border,
html[data-theme="terminator"] .border-top,
html[data-theme="terminator"] .border-bottom,
html[data-theme="terminator"] .border-start,
html[data-theme="terminator"] .border-end,
html[data-theme="terminator"] hr {
    border-color: rgba(255, 0, 0, 0.2) !important; 
}

/* Tables */
html[data-theme="terminator"] .table {
    color: var(--text-main) !important;
    border-color: rgba(255, 0, 0, 0.2) !important;
    --bs-table-color: var(--text-main);
    --bs-table-bg: transparent;
    --bs-table-border-color: rgba(255, 0, 0, 0.2);
}

html[data-theme="terminator"] .table-light,
html[data-theme="terminator"] .table-light th,
html[data-theme="terminator"] .table-light td {
    background-color: rgba(255, 0, 0, 0.05) !important;
    color: #ffffff !important;
    border-color: rgba(255, 0, 0, 0.2) !important;
}

html[data-theme="terminator"] .table-hover tbody tr:hover td {
    background-color: rgba(255, 0, 0, 0.1) !important;
    color: #ffffff !important;
}

/* Forms and Inputs */
html[data-theme="terminator"] .form-control,
html[data-theme="terminator"] .form-select,
html[data-theme="terminator"] .input-group-text {
    background-color: var(--accent-light) !important;
    color: #ffffff !important;
    border-color: rgba(255, 0, 0, 0.3) !important;
}

html[data-theme="terminator"] .form-control::placeholder {
    color: #888888 !important;
}

html[data-theme="terminator"] .form-control:focus,
html[data-theme="terminator"] .form-select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.4) !important;
    background-color: #220000 !important; 
}

/* Buttons & Utilities */
html[data-theme="terminator"] .btn-primary,
html[data-theme="terminator"] .bg-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #000000 !important; /* Black text on red buttons for contrast */
    font-weight: bold;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

html[data-theme="terminator"] .btn-outline-primary {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

html[data-theme="terminator"] .btn-outline-primary:hover {
    background-color: var(--primary-color) !important;
    color: #000000 !important;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.8);
}

html[data-theme="terminator"] .btn-light {
    background-color: rgba(255, 0, 0, 0.1) !important;
    color: #ffffff !important;
    border-color: rgba(255, 0, 0, 0.2) !important;
}

html[data-theme="terminator"] .btn-light:hover {
    background-color: rgba(255, 0, 0, 0.2) !important;
}

html[data-theme="terminator"] .btn-secondary {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    color: #ffffff !important; 
}

html[data-theme="terminator"] .dropdown-item {
    color: var(--text-main) !important;
}

html[data-theme="terminator"] .dropdown-item:hover {
    background-color: rgba(255, 0, 0, 0.2) !important;
    color: #ffffff !important;
}

html[data-theme="terminator"] .sidebar-link.active {
    background-color: rgba(255, 0, 0, 0.15) !important;
    color: var(--primary-color) !important;
    border-right: 4px solid var(--primary-color);
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

html[data-theme="terminator"] .sidebar-link:hover {
    background-color: rgba(255, 0, 0, 0.08) !important;
}

html[data-theme="terminator"] .sidebar-link i {
    color: var(--secondary-color) !important;
}

html[data-theme="terminator"] .sidebar-link.active i {
    color: var(--primary-color) !important;
}

/* Pagination Overrides */
html[data-theme="terminator"] .pagination .page-link {
    background-color: var(--surface-color) !important;
    color: #ffffff !important;
    border-color: rgba(255, 0, 0, 0.3) !important;
}

html[data-theme="terminator"] .pagination .page-item.active .page-link {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #000000 !important;
    font-weight: bold;
}

html[data-theme="terminator"] .pagination .page-link:hover:not(.disabled) {
    background-color: rgba(255, 0, 0, 0.2) !important;
    color: #ffffff !important;
}

/* Fix text contrast on badges */
html[data-theme="terminator"] .badge.bg-secondary {
    background-color: var(--secondary-color) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 0, 0, 0.3) !important;
}

/* Custom Scrollbar for Terminator */
html[data-theme="terminator"] ::-webkit-scrollbar-track { 
    background: #0a0a0a !important; 
}
html[data-theme="terminator"] ::-webkit-scrollbar-thumb { 
    background: #8b0000 !important; 
}
html[data-theme="terminator"] ::-webkit-scrollbar-thumb:hover { 
    background: #ff0000 !important; 
}

/* Ensure logos show white variants */
html[data-theme="terminator"] .peaky-logo-light, 
html[data-theme="terminator"] .main-logo-light { 
    display: none; 
}
html[data-theme="terminator"] .peaky-logo-dark, 
html[data-theme="terminator"] .main-logo-dark { 
    display: inline-block; 
}