/* =========================================
   LINUX TERMINAL THEME OVERRIDES
   ========================================= */
   html[data-theme="linux"] {
    --primary-color: #39ff14; /* Neon terminal green */
    --secondary-color: #005500; /* Dark green for secondary elements */
    --success-color: #00ff00; 
    --danger-color: #ff3333; /* Standard Danger Color */
    --accent-dark: #39ff14; /* Bright green for headings */
    --accent-light: #0d0d0d; /* Very dark gray for input backgrounds */
    --bg-color: #000000; /* Pure black background */
    --surface-color: #050505; /* Barely lighter black for cards */
    --text-main: #33cc33; /* Standard terminal green for main text */
    --text-muted: #008800; /* Dimmer green for muted text */
    
    color-scheme: dark;
}

/* Aggressively target main containers and enforce Monospace font */
html[data-theme="linux"] body,
html[data-theme="linux"] #wrapper,
html[data-theme="linux"] #page-content-wrapper,
html[data-theme="linux"] main,
html[data-theme="linux"] .material-card,
html[data-theme="linux"] .form-control,
html[data-theme="linux"] .btn {
    background-color: var(--bg-color) !important;
    color: var(--text-main) !important;
    font-family: 'Courier New', Courier, monospace !important;
}

/* Surfaces & Cards */
html[data-theme="linux"] .bg-white,
html[data-theme="linux"] .material-card,
html[data-theme="linux"] .sidebar,
html[data-theme="linux"] .info-sidebar,
html[data-theme="linux"] .app-bar,
html[data-theme="linux"] .top-utility-bar,
html[data-theme="linux"] .ticker-wrap,
html[data-theme="linux"] .list-group-item,
html[data-theme="linux"] .dropdown-menu,
html[data-theme="linux"] .modal-content,
html[data-theme="linux"] .modal-header,
html[data-theme="linux"] .modal-footer {
    background-color: var(--surface-color) !important;
    color: var(--text-main) !important;
    border-color: rgba(57, 255, 20, 0.3) !important; /* Subtle green borders */
    border-radius: 0 !important; /* Blocky retro terminal feel */
}

/* Slightly different background for contrast components */
html[data-theme="linux"] .bg-light {
    background-color: rgba(57, 255, 20, 0.05) !important; /* Very faint green tint */
    color: var(--text-main) !important;
}

/* Typography Enforcement inside cards */
html[data-theme="linux"] .material-card .text-dark,
html[data-theme="linux"] .sidebar .text-dark,
html[data-theme="linux"] .info-sidebar .text-dark,
html[data-theme="linux"] .app-bar .text-dark,
html[data-theme="linux"] .top-utility-bar .text-dark,
html[data-theme="linux"] .material-card h1, 
html[data-theme="linux"] .material-card h2, 
html[data-theme="linux"] .material-card h3, 
html[data-theme="linux"] .material-card h4, 
html[data-theme="linux"] .material-card h5, 
html[data-theme="linux"] .material-card h6 {
    color: var(--primary-color) !important;
    text-shadow: 0 0 5px rgba(57, 255, 20, 0.4); /* Subtle green CRT glow */
}

/* Typography Enforcement outside cards (headers etc) */
html[data-theme="linux"] h1:not(.material-card h1), 
html[data-theme="linux"] h2:not(.material-card h2), 
html[data-theme="linux"] h3:not(.material-card h3), 
html[data-theme="linux"] h4:not(.material-card h4), 
html[data-theme="linux"] h5:not(.material-card h5), 
html[data-theme="linux"] h6:not(.material-card h6) {
    color: var(--accent-dark) !important;
    text-shadow: 0 0 5px rgba(57, 255, 20, 0.4);
}

html[data-theme="linux"] .text-muted {
    color: var(--text-muted) !important;
}

html[data-theme="linux"] .text-primary {
    color: var(--primary-color) !important;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.6);
}

/* Danger Class Overrides */
html[data-theme="linux"] .text-danger {
    color: var(--danger-color) !important;
}

html[data-theme="linux"] .bg-danger {
    background-color: var(--danger-color) !important;
    color: #ffffff !important;
}

html[data-theme="linux"] .btn-danger {
    background-color: var(--danger-color) !important;
    border-color: var(--danger-color) !important;
    color: #ffffff !important;
}

html[data-theme="linux"] .btn-outline-danger {
    color: var(--danger-color) !important;
    border-color: var(--danger-color) !important;
}

html[data-theme="linux"] .btn-outline-danger:hover {
    background-color: var(--danger-color) !important;
    color: #ffffff !important;
}

/* Borders and Lines */
html[data-theme="linux"] .border,
html[data-theme="linux"] .border-top,
html[data-theme="linux"] .border-bottom,
html[data-theme="linux"] .border-start,
html[data-theme="linux"] .border-end,
html[data-theme="linux"] hr {
    border-color: rgba(57, 255, 20, 0.3) !important; 
}

/* Tables */
html[data-theme="linux"] .table {
    color: var(--text-main) !important;
    border-color: rgba(57, 255, 20, 0.3) !important;
    --bs-table-color: var(--text-main);
    --bs-table-bg: transparent;
    --bs-table-border-color: rgba(57, 255, 20, 0.3);
}

html[data-theme="linux"] .table-light,
html[data-theme="linux"] .table-light th,
html[data-theme="linux"] .table-light td {
    background-color: rgba(57, 255, 20, 0.08) !important;
    color: var(--primary-color) !important;
    border-color: rgba(57, 255, 20, 0.3) !important;
}

html[data-theme="linux"] .table-hover tbody tr:hover td {
    background-color: rgba(57, 255, 20, 0.15) !important;
    color: var(--primary-color) !important;
}

/* Forms and Inputs */
html[data-theme="linux"] .form-control,
html[data-theme="linux"] .form-select,
html[data-theme="linux"] .input-group-text {
    background-color: var(--accent-light) !important;
    color: var(--primary-color) !important;
    border-color: rgba(57, 255, 20, 0.5) !important;
    border-radius: 0 !important;
}

html[data-theme="linux"] .form-control::placeholder {
    color: var(--text-muted) !important;
}

html[data-theme="linux"] .form-control:focus,
html[data-theme="linux"] .form-select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(57, 255, 20, 0.3) !important;
    background-color: #001a00 !important; 
}

/* Buttons & Utilities */
html[data-theme="linux"] .btn-primary,
html[data-theme="linux"] .bg-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #000000 !important; /* Black text on green buttons */
    font-weight: bold;
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.4);
    border-radius: 0 !important;
}

html[data-theme="linux"] .btn-outline-primary {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    border-radius: 0 !important;
}

html[data-theme="linux"] .btn-outline-primary:hover {
    background-color: var(--primary-color) !important;
    color: #000000 !important;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.6);
}

html[data-theme="linux"] .btn-light {
    background-color: rgba(57, 255, 20, 0.1) !important;
    color: var(--primary-color) !important;
    border-color: rgba(57, 255, 20, 0.3) !important;
    border-radius: 0 !important;
}

html[data-theme="linux"] .btn-light:hover {
    background-color: rgba(57, 255, 20, 0.2) !important;
}

html[data-theme="linux"] .btn-secondary {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    color: #ffffff !important; 
    border-radius: 0 !important;
}

html[data-theme="linux"] .dropdown-item {
    color: var(--text-main) !important;
}

html[data-theme="linux"] .dropdown-item:hover {
    background-color: rgba(57, 255, 20, 0.2) !important;
    color: var(--primary-color) !important;
}

html[data-theme="linux"] .sidebar-link.active {
    background-color: rgba(57, 255, 20, 0.15) !important;
    color: var(--primary-color) !important;
    border-right: 4px solid var(--primary-color);
    text-shadow: 0 0 5px rgba(57, 255, 20, 0.5);
}

html[data-theme="linux"] .sidebar-link:hover {
    background-color: rgba(57, 255, 20, 0.08) !important;
}

html[data-theme="linux"] .sidebar-link i {
    color: var(--secondary-color) !important;
}

html[data-theme="linux"] .sidebar-link.active i {
    color: var(--primary-color) !important;
}

/* Pagination Overrides */
html[data-theme="linux"] .pagination .page-link {
    background-color: var(--surface-color) !important;
    color: var(--primary-color) !important;
    border-color: rgba(57, 255, 20, 0.4) !important;
}

html[data-theme="linux"] .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="linux"] .pagination .page-link:hover:not(.disabled) {
    background-color: rgba(57, 255, 20, 0.2) !important;
    color: var(--primary-color) !important;
}

/* Fix text contrast on badges */
html[data-theme="linux"] .badge.bg-secondary {
    background-color: var(--secondary-color) !important;
    color: #ffffff !important;
    border: 1px solid rgba(57, 255, 20, 0.3) !important;
    border-radius: 0 !important;
}

/* Custom Momus Buttons Overrides for Linux Theme */
html[data-theme="linux"] .btn-momus-blue,
html[data-theme="linux"] .btn-momus-green {
    background-color: var(--surface-color) !important;
    border: 1px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

html[data-theme="linux"] .btn-momus-blue:hover,
html[data-theme="linux"] .btn-momus-green:hover {
    background-color: var(--primary-color) !important;
    color: #000000 !important;
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.4) !important;
}

/* Index Welcome Card Text Sizing for Linux Theme */
html[data-theme="linux"] .header-1 {
    font-size: 1.25rem !important; /* Smaller size */
    line-height: 1.4;
}

html[data-theme="linux"] .header-2 {
    font-size: 1rem !important; /* Smaller size */
}

/* Terminal Cursor Effect on Logo/Headers */
html[data-theme="linux"] .sidebar-heading h6::after {
    content: '_';
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Custom Scrollbar for Linux */
html[data-theme="linux"] ::-webkit-scrollbar-track { 
    background: #050505 !important; 
}
html[data-theme="linux"] ::-webkit-scrollbar-thumb { 
    background: #005500 !important; 
    border-radius: 0 !important;
}
html[data-theme="linux"] ::-webkit-scrollbar-thumb:hover { 
    background: #39ff14 !important; 
}

/* Ensure logos show white variants */
html[data-theme="linux"] .peaky-logo-light, 
html[data-theme="linux"] .main-logo-light { 
    display: none; 
}
html[data-theme="linux"] .peaky-logo-dark, 
html[data-theme="linux"] .main-logo-dark { 
    display: inline-block; 
}