/* ============================================
   DARK MODE STYLES - MUTYAIRI PLATFORM
   Deep Black Theme with Neon Green Accents
   ============================================ */

/* Color Palette Variables */
:root {
    --dark-bg-primary: #0a0a0a;
    --dark-bg-secondary: #141414;
    --dark-bg-tertiary: #1a1a1a;
    --dark-text-primary: #ffffff;
    --dark-text-secondary: #e0e0e0;
    --dark-text-muted: #a0a0a0;
    --dark-accent-primary: #00ff88;
    --dark-accent-hover: #00cc6f;
    --dark-border: #2a2a2a;
    --dark-border-light: #333333;
    --dark-danger: #ff4444;
    --dark-warning: #ffaa00;
    --dark-success: #00ff88;
    --dark-info: #00aaff;
}

/* ============================================
   BASE STYLES
   ============================================ */
body.dark-mode {
    background-color: var(--dark-bg-primary) !important;
    color: var(--dark-text-primary) !important;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode * {
    border-color: var(--dark-border);
}

/* Override hardcoded white backgrounds */
body.dark-mode .hero,
body.dark-mode .info-section,
body.dark-mode .test-section,
body.dark-mode .test-areas-section,
body.dark-mode .features,
body.dark-mode .preview-section,
body.dark-mode .pricing-section,
body.dark-mode .auth-card,
body.dark-mode .action-card,
body.dark-mode .recent-tests,
body.dark-mode .sample-question,
body.dark-mode .test-note,
body.dark-mode .info-grid,
body.dark-mode .test-areas-grid,
body.dark-mode .about-us-section {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    color: var(--dark-text-primary) !important;
}

/* CTA Section & About Hero - Keep gradient but adjust for dark mode */
body.dark-mode .cta-section,
body.dark-mode .about-hero {
    background: linear-gradient(135deg, #1e7e34 0%, #17a2b8 100%) !important;
}

body.dark-mode .cta-section h2,
body.dark-mode .cta-section p,
body.dark-mode .about-hero h1,
body.dark-mode .about-subtitle {
    color: white !important;
}

body.dark-mode .cta-section .btn {
    background: var(--dark-bg-secondary) !important;
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .cta-section .btn:hover {
    background: var(--dark-bg-tertiary) !important;
}

/* Ensure section headings are visible */
body.dark-mode .info-section h2,
body.dark-mode .test-section h2,
body.dark-mode .test-areas-section h2,
body.dark-mode .hero h1,
body.dark-mode .about-us-section h2 {
    color: var(--dark-text-primary) !important;
}

/* About Us content text */
body.dark-mode .about-us-content p {
    color: var(--dark-text-secondary) !important;
}

/* Floating traffic signs - increase opacity in dark mode */
body.dark-mode .traffic-sign {
    opacity: 0.25 !important;
    filter: brightness(1.2);
}

/* Card icons */
body.dark-mode .card-icon,
body.dark-mode .section-icon,
body.dark-mode .area-icon {
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .area-icon i,
body.dark-mode .card-icon i,
body.dark-mode .section-icon i {
    stroke: var(--dark-accent-primary) !important;
}

/* ============================================
   NAVIGATION
   ============================================ */
body.dark-mode .navbar {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border-bottom: 1px solid var(--dark-border) !important;
}

body.dark-mode .nav-container {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
}

body.dark-mode .nav-brand a {
    color: var(--dark-accent-primary) !important;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

body.dark-mode .nav-link {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .nav-link:hover {
    color: var(--dark-accent-primary) !important;
    background-color: var(--dark-bg-tertiary) !important;
}

body.dark-mode .test-navbar {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border-bottom: 1px solid var(--dark-border) !important;
}

body.dark-mode .test-nav-brand span {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .back-btn,
body.dark-mode .nav-collapse-btn {
    background-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-primary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .back-btn:hover,
body.dark-mode .nav-collapse-btn:hover {
    background-color: var(--dark-accent-primary) !important;
    color: var(--dark-bg-primary) !important;
    border-color: var(--dark-accent-primary) !important;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4) !important;
}

/* ============================================
   BUTTONS
   ============================================ */
body.dark-mode .btn,
body.dark-mode button[type="submit"],
body.dark-mode .button,
body.dark-mode .btn-primary {
    background-color: var(--dark-accent-primary) !important;
    background: var(--dark-accent-primary) !important;
    color: var(--dark-bg-primary) !important;
    border: none !important;
    font-weight: 600;
}

body.dark-mode .btn:hover,
body.dark-mode button[type="submit"]:hover,
body.dark-mode .button:hover,
body.dark-mode .btn-primary:hover {
    background-color: var(--dark-accent-hover) !important;
    background: var(--dark-accent-hover) !important;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5) !important;
    transform: translateY(-2px);
}

body.dark-mode .btn-secondary {
    background-color: var(--dark-bg-tertiary) !important;
    background: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-primary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .btn-secondary:hover {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border-color: var(--dark-accent-primary) !important;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3) !important;
}

body.dark-mode .btn-danger {
    background-color: var(--dark-danger) !important;
    background: var(--dark-danger) !important;
    color: var(--dark-text-primary) !important;
}

body.dark-mode .btn-danger:hover {
    background-color: #cc0000 !important;
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.5) !important;
}

/* ============================================
   CARDS & CONTAINERS
   ============================================ */
body.dark-mode .card,
body.dark-mode .info-card,
body.dark-mode .feature-card,
body.dark-mode .stat-card,
body.dark-mode .test-option-card,
body.dark-mode .test-area-card,
body.dark-mode .profile-section,
body.dark-mode .upgrade-section,
body.dark-mode .support-form-card,
body.dark-mode .admin-container,
body.dark-mode .dashboard-card,
body.dark-mode .pricing-card,
body.dark-mode .plan-card {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
    color: var(--dark-text-primary) !important;
}

body.dark-mode .card:hover,
body.dark-mode .test-option-card:hover,
body.dark-mode .feature-card:hover,
body.dark-mode .test-area-card:hover {
    border-color: var(--dark-accent-primary) !important;
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.2) !important;
    transform: translateY(-4px);
}

/* ============================================
   FORMS & INPUTS
   ============================================ */
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
    background-color: var(--dark-bg-tertiary);
    color: var(--dark-text-primary);
    border: 1px solid var(--dark-border);
}

body.dark-mode input:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus {
    border-color: var(--dark-accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
    outline: none;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: var(--dark-text-muted);
}

body.dark-mode .form-group label {
    color: var(--dark-text-secondary);
}

/* ============================================
   TABLES
   ============================================ */
body.dark-mode table {
    background-color: var(--dark-bg-secondary);
    border: 1px solid var(--dark-border);
}

body.dark-mode th {
    background-color: var(--dark-bg-tertiary);
    color: var(--dark-accent-primary);
    border-bottom: 2px solid var(--dark-border);
}

body.dark-mode td {
    border-bottom: 1px solid var(--dark-border);
    color: var(--dark-text-secondary);
}

body.dark-mode tr:hover {
    background-color: var(--dark-bg-tertiary);
}

/* ============================================
   DASHBOARD SPECIFIC
   ============================================ */
body.dark-mode .stat-item {
    background-color: var(--dark-bg-secondary);
    border: 1px solid var(--dark-border);
}

body.dark-mode .stat-item:hover {
    border-color: var(--dark-accent-primary);
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.2);
}

body.dark-mode .stat-value {
    color: var(--dark-accent-primary);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

body.dark-mode .stat-label {
    color: var(--dark-text-secondary);
}

body.dark-mode .progress-bar {
    background-color: var(--dark-bg-tertiary);
}

body.dark-mode .progress-fill {
    background: linear-gradient(90deg, var(--dark-accent-primary), var(--dark-accent-hover));
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* ============================================
   TEST SELECTION PAGE
   ============================================ */
body.dark-mode .test-selection-page {
    background-color: var(--dark-bg-primary) !important;
}

body.dark-mode .test-selection-page .page-header h1 {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .test-selection-page .page-header p {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .test-options-container h2 {
    color: var(--dark-text-primary) !important;
    border-bottom-color: var(--dark-border) !important;
}

body.dark-mode .test-option-card {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    color: var(--dark-text-primary) !important;
    border: 2px solid var(--dark-border) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .test-option-card:hover {
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.2) !important;
    border-color: var(--dark-accent-primary) !important;
}

body.dark-mode .test-option-card.recommended {
    background: linear-gradient(135deg, var(--dark-bg-secondary) 0%, var(--dark-bg-tertiary) 100%) !important;
    border-color: var(--dark-accent-primary) !important;
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.25) !important;
}

body.dark-mode .test-option-card.recommended:hover {
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.35) !important;
}

body.dark-mode .test-option-card .card-icon {
    background-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .test-option-card .card-content h3,
body.dark-mode .test-option-card .card-content h4 {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .test-option-card .card-content p {
    color: var(--dark-text-secondary) !important;
}

/* ============================================
   TEST INTERFACE - COMPREHENSIVE
   ============================================ */
/* Main Test Container */
body.dark-mode .test-interface {
    background-color: var(--dark-bg-primary) !important;
}

body.dark-mode .test-main-content {
    background-color: var(--dark-bg-primary) !important;
}

/* Credit Counter Banner */
body.dark-mode .credit-counter-banner {
    background: linear-gradient(135deg, #00ff88 0%, #00d4aa 100%) !important;
    border: 1px solid rgba(0, 255, 136, 0.3) !important;
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.3) !important;
}

body.dark-mode .credit-icon {
    background: rgba(255, 255, 255, 0.25) !important;
    color: white !important;
}

body.dark-mode .credit-label {
    color: rgba(255, 255, 255, 0.95) !important;
}

body.dark-mode .credit-value {
    color: white !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .credit-value.unlimited {
    background: rgba(255, 255, 255, 0.25) !important;
    color: white !important;
}

body.dark-mode .credit-value.low-credits {
    color: #ff6b6b !important;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5) !important;
}

body.dark-mode .btn-buy-credits {
    background: white !important;
    color: #00ff88 !important;
    box-shadow: 0 2px 12px rgba(255, 255, 255, 0.2) !important;
}

body.dark-mode .btn-buy-credits:hover {
    background: #f0f0f0 !important;
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.3) !important;
}

body.dark-mode .credit-warning {
    background: rgba(255, 107, 107, 0.25) !important;
    border: 1px solid rgba(255, 107, 107, 0.4) !important;
    color: white !important;
}

body.dark-mode .credit-warning a {
    color: white !important;
}

/* Test Header (Information Bar) */
body.dark-mode .test-header {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
    color: var(--dark-text-primary) !important;
}

body.dark-mode .test-category-info,
body.dark-mode .test-question-indicator,
body.dark-mode .test-timer {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .test-category-info i,
body.dark-mode .test-timer i {
    stroke: var(--dark-accent-primary) !important;
}

/* Question Card Container */
body.dark-mode .question-card {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .question-content-wrapper {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
}

body.dark-mode .question-body {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    color: var(--dark-text-primary) !important;
}

/* Question Text */
body.dark-mode .question-text {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .question-text h3 {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .question-text-and-options {
    background-color: transparent !important;
}

/* Answer Options Container */
body.dark-mode .answer-options {
    background-color: transparent !important;
}

/* Individual Option Items */
body.dark-mode .option-item {
    background-color: var(--dark-bg-tertiary) !important;
    background: var(--dark-bg-tertiary) !important;
    border: 2px solid var(--dark-border) !important;
}

body.dark-mode .option-item:hover {
    border-color: var(--dark-accent-primary) !important;
    background-color: var(--dark-bg-secondary) !important;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2) !important;
}

body.dark-mode .option-item label {
    background-color: transparent !important;
    color: var(--dark-text-primary) !important;
}

/* Option Marker (A, B, C, D circles) */
body.dark-mode .option-marker {
    background-color: var(--dark-bg-primary) !important;
    color: var(--dark-accent-primary) !important;
    border: 2px solid var(--dark-border) !important;
}

/* Option Text */
body.dark-mode .option-text {
    color: var(--dark-text-primary) !important;
}

/* Selected State */
body.dark-mode .option-item input[type="radio"]:checked + label {
    background-color: rgba(0, 255, 136, 0.1) !important;
}

body.dark-mode .option-item input[type="radio"]:checked + label .option-marker {
    background-color: var(--dark-accent-primary) !important;
    color: var(--dark-bg-primary) !important;
    border-color: var(--dark-accent-primary) !important;
}

/* Legacy classes for compatibility */
body.dark-mode .answer-option,
body.dark-mode .option-radio {
    background-color: var(--dark-bg-tertiary) !important;
    background: var(--dark-bg-tertiary) !important;
    border: 2px solid var(--dark-border) !important;
    color: var(--dark-text-primary) !important;
}

body.dark-mode .answer-option:hover,
body.dark-mode .option-radio:hover {
    border-color: var(--dark-accent-primary) !important;
    background-color: var(--dark-bg-secondary) !important;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2) !important;
}

body.dark-mode .answer-option.selected,
body.dark-mode .option-radio.selected {
    border-color: var(--dark-accent-primary) !important;
    background-color: rgba(0, 255, 136, 0.1) !important;
}

/* Question Image Container */
body.dark-mode .question-image {
    background-color: var(--dark-bg-primary) !important;
}

body.dark-mode .image-container {
    background-color: var(--dark-bg-primary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .image-placeholder {
    background-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-muted) !important;
}

body.dark-mode .image-controls {
    background-color: var(--dark-bg-tertiary) !important;
}

body.dark-mode .btn-image-zoom {
    background-color: var(--dark-bg-secondary) !important;
    color: var(--dark-text-primary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .btn-image-zoom:hover {
    background-color: var(--dark-accent-primary) !important;
    color: var(--dark-bg-primary) !important;
    border-color: var(--dark-accent-primary) !important;
}

/* Question Footer */
body.dark-mode .question-footer {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border-top: 1px solid var(--dark-border) !important;
}

body.dark-mode .nav-left,
body.dark-mode .nav-right {
    background-color: transparent !important;
}

/* Timer */
body.dark-mode .timer {
    background-color: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
    color: var(--dark-text-primary) !important;
}

body.dark-mode .timer.warning {
    border-color: var(--dark-warning) !important;
    color: var(--dark-warning) !important;
}

/* Question Navigator */
body.dark-mode .question-navigator {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .question-navigator h3 {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .question-grid {
    background-color: transparent !important;
}

body.dark-mode .navigator-legend {
    background-color: var(--dark-bg-tertiary) !important;
    border-top: 1px solid var(--dark-border) !important;
}

body.dark-mode .legend-item {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .legend-color {
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .legend-color.answered {
    background-color: var(--dark-accent-primary) !important;
}

body.dark-mode .legend-color.current {
    background-color: transparent !important;
    border-color: var(--dark-accent-primary) !important;
}

body.dark-mode .legend-color.unanswered {
    background-color: var(--dark-bg-tertiary) !important;
}

body.dark-mode .question-number {
    background-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-primary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .question-number:hover {
    border-color: var(--dark-accent-primary) !important;
    background-color: var(--dark-bg-secondary) !important;
}

body.dark-mode .question-number.answered {
    background-color: var(--dark-accent-primary) !important;
    color: var(--dark-bg-primary) !important;
}

body.dark-mode .question-number.current {
    border-color: var(--dark-accent-primary) !important;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.4) !important;
}

/* Test Results Cards */
body.dark-mode .test-results {
    background-color: transparent !important;
}

body.dark-mode .test-result {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
    color: var(--dark-text-primary) !important;
}

body.dark-mode .test-result:hover {
    border-color: var(--dark-accent-primary) !important;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.2) !important;
}

body.dark-mode .test-date {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .test-score {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .score {
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .percentage {
    color: var(--dark-text-secondary) !important;
}

/* Question Options */
body.dark-mode .question-options {
    background-color: transparent !important;
}

body.dark-mode .radio-custom {
    border-color: var(--dark-border) !important;
    background-color: var(--dark-bg-tertiary) !important;
}

body.dark-mode input[type="radio"]:checked + .radio-custom {
    border-color: var(--dark-accent-primary) !important;
    background-color: var(--dark-accent-primary) !important;
}

/* Question Badge and Meta */
body.dark-mode .question-badge,
body.dark-mode .question-meta {
    background-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-primary) !important;
    border-color: var(--dark-border) !important;
}

body.dark-mode .question-id,
body.dark-mode .question-category {
    color: var(--dark-accent-primary) !important;
}

/* ============================================
   ADMIN DASHBOARD
   ============================================ */
body.dark-mode .admin-header {
    background-color: var(--dark-bg-secondary) !important ;
    border-bottom: 2px solid var(--dark-accent-primary) !important;
}

body.dark-mode .admin-nav {
    background-color: var(--dark-bg-tertiary) !important;
}

body.dark-mode .admin-nav a {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .admin-nav a:hover,
body.dark-mode .admin-nav a.active {
    color: var(--dark-accent-primary) !important;
    background-color: var(--dark-bg-secondary)!important;
}

body.dark-mode .chart-container {
    background-color: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .revenue-item {
    background-color: var(--dark-bg-tertiary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .revenue-amount {
    color: var(--dark-accent-primary) !important;
}

/* Admin Dashboard Sections */
body.dark-mode .charts-row,
body.dark-mode .stats-grid,
body.dark-mode .daily-breakdown {
    background-color: transparent !important;
}

body.dark-mode .chart-wrapper,
body.dark-mode .stat-box {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
}

/* Admin Questions Container */
body.dark-mode .questions-container {
    background-color: transparent !important;
}

body.dark-mode .question-header {
    background-color: var(--dark-bg-tertiary) !important;
    border-bottom: 1px solid var(--dark-border) !important;
}

/* ============================================
   ADMIN USER MANAGEMENT
   ============================================ */
body.dark-mode .user-management-container {
    background-color: var(--dark-bg-primary) !important;
}

body.dark-mode .user-details-card {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .user-info-table {
    background-color: var(--dark-bg-tertiary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .user-info-table th {
    background-color: var(--dark-bg-secondary) !important;
    color: var(--dark-accent-primary) !important;
    border-bottom: 2px solid var(--dark-border) !important;
}

body.dark-mode .user-info-table td {
    background-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-primary) !important;
    border-bottom: 1px solid var(--dark-border) !important;
}

/* Quick Actions Section */
body.dark-mode .quick-actions {
    background-color: transparent !important;
}

body.dark-mode .quick-actions h2 {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .action-card {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .action-card:hover {
    border-color: var(--dark-accent-primary) !important;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.2) !important;
}

body.dark-mode .action-card h3 {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .action-card p {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .action-buttons {
    background-color: transparent !important;
}

body.dark-mode .action-btn {
    background-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-primary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .action-btn:hover {
    background-color: var(--dark-accent-primary) !important;
    color: var(--dark-bg-primary) !important;
    border-color: var(--dark-accent-primary) !important;
}

/* ============================================
   ADMIN TICKET MANAGEMENT
   ============================================ */
body.dark-mode .ticket-management-container {
    background-color: var(--dark-bg-primary) !important;
}

body.dark-mode .ticket-header {
    background-color: var(--dark-bg-secondary) !important;
    border-bottom: 2px solid var(--dark-border) !important;
}

body.dark-mode .ticket-header h1 {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .ticket-details-container {
    background-color: transparent !important;
}

body.dark-mode .ticket-info-card {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .ticket-info-card h3 {
    color: var(--dark-text-primary) !important;
}

/* Ticket Messages */
body.dark-mode .ticket-messages {
    background-color: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .message-item {
    background-color: var(--dark-bg-tertiary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .message-header {
    background-color: var(--dark-bg-secondary) !important;
    border-bottom: 1px solid var(--dark-border) !important;
}

body.dark-mode .message-author {
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .message-date {
    color: var(--dark-text-muted) !important;
}

body.dark-mode .message-content {
    color: var(--dark-text-primary) !important;
}

/* Add Response Section */
body.dark-mode .add-response {
    background-color: var(--dark-bg-tertiary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .add-response h3 {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .response-textarea {
    background-color: var(--dark-bg-secondary) !important;
    color: var(--dark-text-primary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .response-textarea:focus {
    border-color: var(--dark-accent-primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1) !important;
}

/* Update Status Section */
body.dark-mode .update-status {
    background-color: var(--dark-bg-tertiary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .update-status h3 {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .status-options {
    background-color: transparent !important;
}

body.dark-mode .status-option {
    background-color: var(--dark-bg-secondary) !important;
    border: 2px solid var(--dark-border) !important;
}

body.dark-mode .status-option:hover {
    border-color: var(--dark-accent-primary) !important;
    background-color: var(--dark-bg-tertiary) !important;
}

body.dark-mode .status-option.selected {
    border-color: var(--dark-accent-primary) !important;
    background-color: rgba(0, 255, 136, 0.1) !important;
}

/* User Info Sidebar */
body.dark-mode .user-info-sidebar {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .user-info-sidebar h3 {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .user-info-item {
    background-color: transparent !important;
    border-bottom: 1px solid var(--dark-border) !important;
}

body.dark-mode .user-info-item label {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .user-info-item span {
    color: var(--dark-text-primary) !important;
}

/* Admin Actions Card */
body.dark-mode .admin-actions-card {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .admin-actions-card h3 {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .admin-actions-card p {
    color: var(--dark-text-secondary) !important;
}

/* ============================================
   ADMIN TABS
   ============================================ */
body.dark-mode .admin-tabs {
    background-color: var(--dark-bg-secondary) !important;
    border-bottom: 1px solid var(--dark-border) !important;
}

body.dark-mode .tab-btn {
    background-color: transparent !important;
    color: var(--dark-text-secondary) !important;
    border: none !important;
}

body.dark-mode .tab-btn:hover {
    color: var(--dark-accent-primary) !important;
    background-color: var(--dark-bg-tertiary) !important;
}

body.dark-mode .tab-btn.active {
    color: var(--dark-accent-primary) !important;
    border-bottom: 2px solid var(--dark-accent-primary) !important;
    background-color: transparent !important;
}

/* Tab Content */
body.dark-mode .tab-content {
    background-color: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
}

/* ============================================
   ADMIN USER SEARCH & LIST
   ============================================ */
body.dark-mode .user-search {
    background-color: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .search-input {
    background-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-primary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .user-list {
    background-color: transparent !important;
}

body.dark-mode .user-list-item {
    background-color: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .user-list-item:hover {
    border-color: var(--dark-accent-primary) !important;
    box-shadow: 0 2px 10px rgba(0, 255, 136, 0.2) !important;
}

/* Priority Badges */
body.dark-mode .priority-badge {
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .priority-badge.low {
    background-color: rgba(0, 170, 255, 0.2) !important;
    color: var(--dark-info) !important;
    border-color: var(--dark-info) !important;
}

body.dark-mode .priority-badge.medium {
    background-color: rgba(255, 170, 0, 0.2) !important;
    color: var(--dark-warning) !important;
    border-color: var(--dark-warning) !important;
}

body.dark-mode .priority-badge.high {
    background-color: rgba(255, 68, 68, 0.2) !important;
    color: var(--dark-danger) !important;
    border-color: var(--dark-danger) !important;
}

/* ============================================
   SUPPORT TICKETS PAGE
   ============================================ */
body.dark-mode .tickets-page {
    background-color: var(--dark-bg-primary) !important;
}

body.dark-mode .page-header {
    background-color: transparent !important;
}

body.dark-mode .page-header h1 {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .tickets-list {
    background-color: transparent !important;
}

/* Ticket Cards */
body.dark-mode .ticket-card {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .ticket-card:hover {
    border-color: var(--dark-accent-primary) !important;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.2) !important;
}

body.dark-mode .ticket-card.status-open {
    border-left-color: var(--dark-info) !important;
}

body.dark-mode .ticket-card.status-in_progress {
    border-left-color: var(--dark-warning) !important;
}

body.dark-mode .ticket-card.status-resolved {
    border-left-color: var(--dark-accent-primary) !important;
}

/* Ticket Header */
body.dark-mode .ticket-header {
    background-color: transparent !important;
}

body.dark-mode .ticket-title h3 {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .ticket-id {
    color: var(--dark-text-muted) !important;
}

/* Ticket Badges */
body.dark-mode .ticket-badges {
    background-color: transparent !important;
}

body.dark-mode .status-badge.open {
    background-color: rgba(0, 170, 255, 0.2) !important;
    color: var(--dark-info) !important;
}

body.dark-mode .status-badge.in_progress {
    background-color: rgba(255, 170, 0, 0.2) !important;
    color: var(--dark-warning) !important;
}

body.dark-mode .status-badge.resolved {
    background-color: rgba(0, 255, 136, 0.2) !important;
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .status-badge.closed {
    background-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-muted) !important;
}

/* Ticket Meta */
body.dark-mode .ticket-meta {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .ticket-meta span {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .ticket-meta i {
    stroke: var(--dark-text-secondary) !important;
}

/* Ticket Description */
body.dark-mode .ticket-description {
    color: var(--dark-text-secondary) !important;
}

/* Admin Response */
body.dark-mode .admin-response {
    background-color: rgba(0, 255, 136, 0.05) !important;
    border-left-color: var(--dark-accent-primary) !important;
}

body.dark-mode .response-header {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .response-header i {
    stroke: var(--dark-accent-primary) !important;
}

body.dark-mode .admin-response p {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .admin-response small {
    color: var(--dark-text-muted) !important;
}

/* Empty State (No Tickets) */
body.dark-mode .no-tickets {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .empty-state {
    background-color: transparent !important;
}

body.dark-mode .empty-icon {
    color: var(--dark-border) !important;
    stroke: var(--dark-border) !important;
}

body.dark-mode .empty-state h3 {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .empty-state p {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .ticket-status {
    background-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-primary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .ticket-status.open {
    background-color: rgba(0, 255, 136, 0.2) !important;
    color: var(--dark-accent-primary) !important;
    border-color: var(--dark-accent-primary) !important;
}

body.dark-mode .ticket-status.closed {
    background-color: rgba(160, 160, 160, 0.2) !important;
    color: var(--dark-text-muted) !important;
}

body.dark-mode .message-bubble {
    background-color: var(--dark-bg-tertiary) !important;
    border: 1px solid var(--dark-border) !important;
    color: var(--dark-text-primary) !important;
}

body.dark-mode .message-bubble.admin {
    background-color: rgba(0, 255, 136, 0.1) !important;
    border-color: var(--dark-accent-primary) !important;
}

/* Support Page */
body.dark-mode .support-page {
    background-color: var(--dark-bg-primary) !important;
}

body.dark-mode .support-header {
    background-color: transparent !important;
}

body.dark-mode .support-header h1 {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .support-header p {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .support-container {
    background-color: transparent !important;
}

/* Support Form Card */
body.dark-mode .support-form-card {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .support-form-card h2 {
    color: var(--dark-text-primary) !important;
}

/* Support Info Card - CRITICAL */
body.dark-mode .support-info-card {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
    color: var(--dark-text-primary) !important;
}

body.dark-mode .support-info-card h3,
body.dark-mode .support-info-card h4 {
    color: var(--dark-text-primary) !important;
}

/* User Info Section */
body.dark-mode .user-info {
    background-color: var(--dark-bg-tertiary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .info-item {
    background-color: transparent !important;
    border-bottom: 1px solid var(--dark-border) !important;
}

body.dark-mode .info-item label {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .info-item span {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .info-item strong {
    color: var(--dark-accent-primary) !important;
}

/* Status Badges */
body.dark-mode .status-badge {
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .status-badge.active {
    background-color: rgba(0, 255, 136, 0.2) !important;
    color: var(--dark-accent-primary) !important;
    border-color: var(--dark-accent-primary) !important;
}

body.dark-mode .status-badge.free {
    background-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-muted) !important;
}

/* Anonymous Help Section */
body.dark-mode .anonymous-help {
    background-color: var(--dark-bg-tertiary) !important;
    border: 1px solid var(--dark-border) !important;
    color: var(--dark-text-primary) !important;
}

body.dark-mode .anonymous-help p {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .anonymous-help ul {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .anonymous-help li {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .anonymous-help strong {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .help-note {
    background-color: rgba(0, 170, 255, 0.1) !important;
    border: 1px solid var(--dark-info) !important;
    color: var(--dark-text-primary) !important;
}

/* Support Tips */
body.dark-mode .support-tips {
    background-color: var(--dark-bg-tertiary) !important;
    background: var(--dark-bg-tertiary) !important;
    border: 1px solid var(--dark-border) !important;
    color: var(--dark-text-primary) !important;
}

body.dark-mode .support-tips h4 {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .support-tips ul {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .support-tips li {
    color: var(--dark-text-secondary) !important;
}

/* View Tickets Section */
body.dark-mode .view-tickets {
    background-color: transparent !important;
}

body.dark-mode .btn-outline {
    background-color: transparent !important;
    color: var(--dark-text-primary) !important;
    border: 2px solid var(--dark-border) !important;
}

body.dark-mode .btn-outline:hover {
    background-color: var(--dark-accent-primary) !important;
    color: var(--dark-bg-primary) !important;
    border-color: var(--dark-accent-primary) !important;
}

/* Anonymous Notice */
body.dark-mode .anonymous-notice {
    background-color: rgba(0, 170, 255, 0.1) !important;
    border: 1px solid var(--dark-info) !important;
    color: var(--dark-text-primary) !important;
}

body.dark-mode .anonymous-notice p {
    color: var(--dark-text-primary) !important;
}

/* Form Elements in Support */
body.dark-mode .support-form .form-group label {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .support-form .required {
    color: var(--dark-danger) !important;
}

body.dark-mode .support-form .help-text {
    color: var(--dark-text-muted) !important;
}

/* Urgency Options */
body.dark-mode .urgency-options {
    background-color: transparent !important;
}

body.dark-mode .radio-option {
    background-color: var(--dark-bg-tertiary) !important;
    border: 2px solid var(--dark-border) !important;
}

body.dark-mode .radio-option:hover {
    border-color: var(--dark-accent-primary) !important;
    background-color: var(--dark-bg-secondary) !important;
}

body.dark-mode .radio-label {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .radio-label small {
    color: var(--dark-text-muted) !important;
}

body.dark-mode .urgency-badge {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .urgency-badge.low {
    background-color: rgba(0, 170, 255, 0.2) !important;
    color: var(--dark-info) !important;
}

body.dark-mode .urgency-badge.medium {
    background-color: rgba(255, 170, 0, 0.2) !important;
    color: var(--dark-warning) !important;
}

body.dark-mode .urgency-badge.high {
    background-color: rgba(255, 68, 68, 0.2) !important;
    color: var(--dark-danger) !important;
}

/* Legacy Support Classes */
body.dark-mode .support-info,
body.dark-mode .tips-card {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
    color: var(--dark-text-primary) !important;
}

/* ============================================
   PROFILE PAGE
   ============================================ */
body.dark-mode .profile-header {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .profile-avatar {
    background-color: var(--dark-accent-primary) !important;
    color: var(--dark-bg-primary) !important;
}

body.dark-mode .subscription-badge {
    background-color: var(--dark-accent-primary) !important;
    color: var(--dark-bg-primary) !important;
}

body.dark-mode .subscription-badge.free {
    background-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-muted) !important;
    border: 1px solid var(--dark-border) !important;
}

/* Profile Info Sections */
body.dark-mode .profile-info,
body.dark-mode .account-info,
body.dark-mode .user-info {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    color: var(--dark-text-primary) !important;
}

body.dark-mode .info-group {
    background-color: transparent !important;
    border-bottom: 1px solid var(--dark-border) !important;
}

body.dark-mode .info-group label {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .info-group span {
    color: var(--dark-text-primary) !important;
}

/* Account Type Badges */
body.dark-mode .account-type {
    background-color: transparent !important;
}

body.dark-mode .badge.premium {
    background-color: rgba(0, 255, 136, 0.2) !important;
    color: var(--dark-accent-primary) !important;
    border: 1px solid var(--dark-accent-primary) !important;
}

body.dark-mode .badge.free {
    background-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-muted) !important;
    border: 1px solid var(--dark-border) !important;
}

/* Test History Section */
body.dark-mode .test-history {
    background-color: transparent !important;
}

body.dark-mode .history-filters {
    background-color: transparent !important;
}

body.dark-mode .filter-btn {
    background-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-primary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .filter-btn:hover {
    background-color: var(--dark-accent-primary) !important;
    color: var(--dark-bg-primary) !important;
    border-color: var(--dark-accent-primary) !important;
}

body.dark-mode .filter-btn.active {
    background-color: var(--dark-accent-primary) !important;
    color: var(--dark-bg-primary) !important;
    border-color: var(--dark-accent-primary) !important;
}

/* History List */
body.dark-mode .history-list {
    background-color: transparent !important;
}

body.dark-mode .history-item {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
    color: var(--dark-text-primary) !important;
}

body.dark-mode .history-item:hover {
    border-color: var(--dark-accent-primary) !important;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.2) !important;
}

body.dark-mode .test-info {
    background-color: transparent !important;
}

body.dark-mode .test-date {
    color: var(--dark-text-muted) !important;
}

body.dark-mode .test-score {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .test-score .score {
    color: var(--dark-accent-primary) !important;
    font-weight: bold;
}

body.dark-mode .test-score .percentage {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .test-time {
    color: var(--dark-text-secondary) !important;
}

/* Performance Badges */
body.dark-mode .test-performance {
    background-color: transparent !important;
}

body.dark-mode .performance {
    color: var(--dark-text-primary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .performance.excellent {
    background-color: rgba(0, 255, 136, 0.2) !important;
    color: var(--dark-accent-primary) !important;
    border-color: var(--dark-accent-primary) !important;
}

body.dark-mode .performance.good {
    background-color: rgba(0, 170, 255, 0.2) !important;
    color: var(--dark-info) !important;
    border-color: var(--dark-info) !important;
}

body.dark-mode .performance.fair {
    background-color: rgba(255, 170, 0, 0.2) !important;
    color: var(--dark-warning) !important;
    border-color: var(--dark-warning) !important;
}

body.dark-mode .performance.poor {
    background-color: rgba(255, 68, 68, 0.2) !important;
    color: var(--dark-danger) !important;
    border-color: var(--dark-danger) !important;
}

/* Stats Grid */
body.dark-mode .stats-grid {
    background-color: transparent !important;
}

body.dark-mode .stat-icon {
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .stat-icon i {
    stroke: var(--dark-accent-primary) !important;
}

body.dark-mode .stat-content {
    background-color: transparent !important;
}

body.dark-mode .stat-number {
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .stat-label {
    color: var(--dark-text-secondary) !important;
}

/* ============================================
   SUBSCRIPTION PLANS
   ============================================ */
body.dark-mode .plan-card {
    background-color: var(--dark-bg-secondary);
    border: 1px solid var(--dark-border);
}

body.dark-mode .plan-card.featured {
    border: 2px solid var(--dark-accent-primary);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.3);
}

body.dark-mode .plan-card:hover {
    border-color: var(--dark-accent-primary);
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0, 255, 136, 0.3);
}

body.dark-mode .plan-price {
    color: var(--dark-accent-primary);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

body.dark-mode .plan-features li {
    color: var(--dark-text-secondary);
}

body.dark-mode .plan-features li::before {
    color: var(--dark-accent-primary);
}

/* ============================================
   MODALS
   ============================================ */
body.dark-mode .modal-content {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .modal-header {
    background-color: var(--dark-bg-secondary) !important;
    border-bottom: 1px solid var(--dark-border) !important;
}

body.dark-mode .modal-header h2 {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .modal-title {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .modal-body {
    background-color: var(--dark-bg-secondary) !important;
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .modal-footer {
    background-color: var(--dark-bg-secondary) !important;
    border-top: 1px solid var(--dark-border) !important;
}

body.dark-mode .close,
body.dark-mode .modal-close {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .close:hover,
body.dark-mode .modal-close:hover {
    color: var(--dark-accent-primary) !important;
}

/* ============================================
   TEST COMPLETION MODAL
   ============================================ */
body.dark-mode #completionModal .modal-content {
    background-color: var(--dark-bg-secondary) !important;
}

body.dark-mode .completion-content {
    background-color: var(--dark-bg-secondary) !important;
    color: var(--dark-text-primary) !important;
}

body.dark-mode .completion-stats {
    background-color: var(--dark-bg-tertiary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .stat-item {
    background-color: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .stat-label {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .stat-value {
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .completion-warning {
    background-color: rgba(255, 170, 0, 0.1) !important;
    border: 1px solid var(--dark-warning) !important;
    color: var(--dark-text-primary) !important;
}

body.dark-mode .completion-warning p {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .completion-actions {
    background-color: transparent !important;
}

/* ============================================
   TEST RESULTS MODAL
   ============================================ */
body.dark-mode #resultsModal .modal-content {
    background-color: var(--dark-bg-secondary) !important;
}

body.dark-mode .results-content {
    background-color: var(--dark-bg-secondary) !important;
    color: var(--dark-text-primary) !important;
}

body.dark-mode .score-circle {
    background-color: transparent !important;
}

body.dark-mode .progress-ring__circle {
    stroke: var(--dark-border) !important;
}

body.dark-mode .progress-ring__circle--progress {
    stroke: var(--dark-accent-primary) !important;
}

body.dark-mode .score-percentage {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .score-summary {
    background-color: transparent !important;
    color: var(--dark-text-primary) !important;
}

body.dark-mode .score-summary p {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .score-summary strong {
    color: var(--dark-accent-primary) !important;
}

body.dark-mode #resultMessage {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .results-actions {
    background-color: transparent !important;
}

/* ============================================
   DARK MODE TOGGLE BUTTON
   ============================================ */
/* Light Mode Styling (default) */
.dark-mode-toggle {
    background-color: #f7fafc !important;
    border: 2px solid #e2e8f0 !important;
    color: #2d3748 !important;
    transition: all 0.3s ease !important;
}

.dark-mode-toggle:hover {
    background-color: #00ff88 !important;
    border-color: #00ff88 !important;
    color: #ffffff !important;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3) !important;
    transform: scale(1.05);
}

.dark-mode-toggle i {
    stroke: currentColor !important;
}

/* Dark Mode Styling */
body.dark-mode .dark-mode-toggle {
    background-color: var(--dark-bg-tertiary) !important;
    border: 2px solid var(--dark-border) !important;
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .dark-mode-toggle:hover {
    background-color: var(--dark-accent-primary) !important;
    color: var(--dark-bg-primary) !important;
    border-color: var(--dark-accent-primary) !important;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4) !important;
    transform: scale(1.05);
}

/* ============================================
   ALERTS & NOTIFICATIONS
   ============================================ */
body.dark-mode .alert {
    background-color: var(--dark-bg-tertiary);
    border: 1px solid var(--dark-border);
    color: var(--dark-text-primary);
}

body.dark-mode .alert-success {
    background-color: rgba(0, 255, 136, 0.1);
    border-color: var(--dark-accent-primary);
    color: var(--dark-accent-primary);
}

body.dark-mode .alert-danger {
    background-color: rgba(255, 68, 68, 0.1);
    border-color: var(--dark-danger);
    color: var(--dark-danger);
}

body.dark-mode .alert-warning {
    background-color: rgba(255, 170, 0, 0.1);
    border-color: var(--dark-warning);
    color: var(--dark-warning);
}

body.dark-mode .alert-info {
    background-color: rgba(0, 170, 255, 0.1);
    border-color: var(--dark-info);
    color: var(--dark-info);
}

body.dark-mode .toast {
    background-color: var(--dark-bg-secondary);
    border: 1px solid var(--dark-border);
    color: var(--dark-text-primary);
}

body.dark-mode .toast-success {
    border-left: 4px solid var(--dark-accent-primary);
}

body.dark-mode .toast-error {
    border-left: 4px solid var(--dark-danger);
}

/* ============================================
   PAGINATION
   ============================================ */
body.dark-mode .pagination {
    background-color: var(--dark-bg-secondary);
}

body.dark-mode .pagination a,
body.dark-mode .pagination span {
    background-color: var(--dark-bg-tertiary);
    color: var(--dark-text-primary);
    border: 1px solid var(--dark-border);
}

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

body.dark-mode .pagination .active {
    background-color: var(--dark-accent-primary);
    color: var(--dark-bg-primary);
    border-color: var(--dark-accent-primary);
}

/* ============================================
   FOOTER
   ============================================ */
body.dark-mode .footer {
    background-color: var(--dark-bg-secondary);
    border-top: 1px solid var(--dark-border);
    color: var(--dark-text-secondary);
}

body.dark-mode .footer a {
    color: var(--dark-accent-primary);
}

body.dark-mode .footer a:hover {
    color: var(--dark-accent-hover);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

/* ============================================
   BADGES & LABELS
   ============================================ */
body.dark-mode .badge {
    background-color: var(--dark-bg-tertiary);
    color: var(--dark-text-primary);
    border: 1px solid var(--dark-border);
}

body.dark-mode .badge-success {
    background-color: var(--dark-accent-primary);
    color: var(--dark-bg-primary);
}

body.dark-mode .badge-danger {
    background-color: var(--dark-danger);
    color: var(--dark-text-primary);
}

body.dark-mode .badge-warning {
    background-color: var(--dark-warning);
    color: var(--dark-bg-primary);
}

body.dark-mode .badge-info {
    background-color: var(--dark-info);
    color: var(--dark-text-primary);
}

/* ============================================
   SCROLLBAR
   ============================================ */
body.dark-mode ::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

body.dark-mode ::-webkit-scrollbar-track {
    background: var(--dark-bg-primary);
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background: var(--dark-bg-tertiary);
    border: 2px solid var(--dark-bg-primary);
    border-radius: 6px;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: var(--dark-accent-primary);
}

/* ============================================
   LINKS
   ============================================ */
body.dark-mode a {
    color: var(--dark-accent-primary);
}

body.dark-mode a:hover {
    color: var(--dark-accent-hover);
}

/* ============================================
   HEADINGS
   ============================================ */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: var(--dark-text-primary) !important;
}

/* ============================================
   TEXT ELEMENTS
   ============================================ */
body.dark-mode p,
body.dark-mode span,
body.dark-mode li,
body.dark-mode label,
body.dark-mode div {
    color: var(--dark-text-secondary);
}

body.dark-mode .hero-subtitle,
body.dark-mode .section-subtitle,
body.dark-mode .question-text,
body.dark-mode .option-text {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode strong,
body.dark-mode b {
    color: var(--dark-text-primary) !important;
}

/* ============================================
   CODE BLOCKS
   ============================================ */
body.dark-mode code,
body.dark-mode pre {
    background-color: var(--dark-bg-tertiary);
    color: var(--dark-accent-primary);
    border: 1px solid var(--dark-border);
}

/* ============================================
   IMAGES
   ============================================ */
body.dark-mode img {
    opacity: 0.9;
}

body.dark-mode img:hover {
    opacity: 1;
}

/* ============================================
   DIVIDERS
   ============================================ */
body.dark-mode hr {
    border-color: var(--dark-border);
}

/* ============================================
   DROPDOWN MENUS
   ============================================ */
body.dark-mode .dropdown-menu {
    background-color: var(--dark-bg-secondary);
    border: 1px solid var(--dark-border);
}

body.dark-mode .dropdown-item {
    color: var(--dark-text-primary);
}

body.dark-mode .dropdown-item:hover {
    background-color: var(--dark-bg-tertiary);
    color: var(--dark-accent-primary);
}

/* ============================================
   LOADING SPINNER
   ============================================ */
body.dark-mode .spinner {
    border-color: var(--dark-border);
    border-top-color: var(--dark-accent-primary);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    body.dark-mode .nav-menu {
        background-color: var(--dark-bg-secondary);
        border: 1px solid var(--dark-border);
    }
    
    body.dark-mode .nav-toggle span {
        background-color: var(--dark-text-primary);
    }
}

/* ============================================
   DARK MODE TOGGLE BUTTON
   ============================================ */
.dark-mode-toggle {
    background-color: transparent;
    border: 2px solid var(--dark-border);
    color: var(--dark-text-primary);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.dark-mode-toggle:hover {
    border-color: var(--dark-accent-primary);
    background-color: rgba(0, 255, 136, 0.1);
    transform: scale(1.05);
}

body.dark-mode .dark-mode-toggle {
    border-color: var(--dark-accent-primary);
    color: var(--dark-accent-primary);
}

body.dark-mode .dark-mode-toggle:hover {
    background-color: var(--dark-accent-primary);
    color: var(--dark-bg-primary);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
}

/* ============================================
   TEST REVIEW PAGE
   ============================================ */
body.dark-mode .test-review-interface {
    background-color: var(--dark-bg-primary) !important;
}

/* Review Header */
body.dark-mode .review-header {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border-bottom: 1px solid var(--dark-border) !important;
}

body.dark-mode .review-header h1 {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .header-left,
body.dark-mode .header-right {
    background-color: transparent !important;
}

body.dark-mode .test-meta {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .category-badge {
    background-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-accent-primary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .test-date {
    color: var(--dark-text-muted) !important;
}

body.dark-mode .score-badge {
    background-color: var(--dark-bg-tertiary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .score-number {
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .score-percent {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .btn-header {
    background-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-primary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .btn-header:hover {
    background-color: var(--dark-accent-primary) !important;
    color: var(--dark-bg-primary) !important;
    border-color: var(--dark-accent-primary) !important;
}

body.dark-mode .btn-header.btn-primary {
    background-color: var(--dark-accent-primary) !important;
    color: var(--dark-bg-primary) !important;
}

/* Review Content Area */
body.dark-mode .review-content-area {
    background-color: var(--dark-bg-primary) !important;
}

/* Question Badge */
body.dark-mode .question-badge {
    background-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-primary) !important;
    border: 1px solid var(--dark-border) !important;
}

/* Question Content */
body.dark-mode .question-content {
    background-color: transparent !important;
}

/* Image Section */
body.dark-mode .image-section {
    background-color: var(--dark-bg-tertiary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .image-section img {
    border: 1px solid var(--dark-border) !important;
}

/* Options Section */
body.dark-mode .options-section {
    background-color: transparent !important;
}

body.dark-mode .option {
    background-color: var(--dark-bg-tertiary) !important;
    background: var(--dark-bg-tertiary) !important;
    border: 2px solid var(--dark-border) !important;
    color: var(--dark-text-primary) !important;
}

body.dark-mode .option.correct {
    background-color: rgba(0, 255, 136, 0.1) !important;
    border-color: var(--dark-accent-primary) !important;
}

body.dark-mode .option.wrong {
    background-color: rgba(255, 68, 68, 0.1) !important;
    border-color: var(--dark-danger) !important;
}

body.dark-mode .option-letter {
    background-color: var(--dark-bg-primary) !important;
    color: var(--dark-accent-primary) !important;
    border: 2px solid var(--dark-border) !important;
}

body.dark-mode .option.correct .option-letter {
    background-color: var(--dark-accent-primary) !important;
    color: var(--dark-bg-primary) !important;
}

body.dark-mode .option.wrong .option-letter {
    background-color: var(--dark-danger) !important;
    color: var(--dark-text-primary) !important;
}

body.dark-mode .option-content {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .option-badge {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .correct-badge {
    background-color: rgba(0, 255, 136, 0.2) !important;
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .wrong-badge {
    background-color: rgba(255, 68, 68, 0.2) !important;
    color: var(--dark-danger) !important;
}

/* Explanation Box */
body.dark-mode .explanation {
    background-color: rgba(0, 170, 255, 0.1) !important;
    border: 1px solid var(--dark-info) !important;
    color: var(--dark-text-primary) !important;
}

body.dark-mode .explanation-icon {
    color: var(--dark-info) !important;
}

body.dark-mode .explanation-text {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .explanation-text strong {
    color: var(--dark-accent-primary) !important;
}

/* Navigation Buttons */
body.dark-mode .navigation {
    background-color: var(--dark-bg-secondary) !important;
    border-top: 1px solid var(--dark-border) !important;
}

body.dark-mode .nav-btn {
    background-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-primary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .nav-btn:hover {
    background-color: var(--dark-accent-primary) !important;
    color: var(--dark-bg-primary) !important;
    border-color: var(--dark-accent-primary) !important;
}

body.dark-mode .nav-btn-primary {
    background-color: var(--dark-accent-primary) !important;
    color: var(--dark-bg-primary) !important;
}

body.dark-mode .nav-btn:disabled {
    background-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-muted) !important;
    opacity: 0.5;
}

/* ============================================
   CATCH-ALL RULES FOR WHITE BACKGROUNDS
   ============================================ */
/* Containers and Wrappers */
body.dark-mode .container,
body.dark-mode .wrapper,
body.dark-mode .content,
body.dark-mode .content-wrapper,
body.dark-mode .main-container,
body.dark-mode .section-container,
body.dark-mode .page-container {
    background-color: var(--dark-bg-primary) !important;
}

/* All divs with white or light backgrounds */
body.dark-mode div[style*="background: white"],
body.dark-mode div[style*="background: #fff"],
body.dark-mode div[style*="background: #ffffff"],
body.dark-mode div[style*="background-color: white"],
body.dark-mode div[style*="background-color: #fff"],
body.dark-mode div[style*="background-color: #ffffff"] {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
}

/* Review and Question Cards */
body.dark-mode .review-question-card,
body.dark-mode .review-content-area {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
}

/* Form Containers */
body.dark-mode .form-container,
body.dark-mode .form-wrapper,
body.dark-mode form {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
}

/* Dashboard Sections */
body.dark-mode .dashboard,
body.dark-mode .dashboard-section,
body.dark-mode .dashboard-content {
    background-color: var(--dark-bg-primary) !important;
}

/* ============================================
   MOBILE TEST INTERFACE
   ============================================ */
body.dark-mode .mobile-test-body {
    background-color: var(--dark-bg-primary) !important;
}

/* Mobile Test Header */
body.dark-mode .mobile-test-header {
    background-color: var(--dark-bg-secondary) !important;
    border-bottom: 1px solid var(--dark-border) !important;
}

body.dark-mode .mobile-exit-btn {
    background-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-primary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .mobile-timer {
    background-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-primary) !important;
    border: 1px solid var(--dark-border) !important;
}

/* Mobile Credit Banner */
body.dark-mode .mobile-credit-banner {
    background: var(--dark-bg-tertiary) !important;
    border-bottom: 1px solid var(--dark-border) !important;
}

body.dark-mode .mobile-credit-banner i {
    color: var(--dark-accent-primary) !important;
    stroke: var(--dark-accent-primary) !important;
}

body.dark-mode .mobile-credit-text {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .mobile-credit-text strong {
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .mobile-credit-text.low-credits strong {
    color: #ff6b6b !important;
}

body.dark-mode .mobile-topup-btn {
    background: var(--dark-accent-primary) !important;
    color: var(--dark-bg-primary) !important;
}

/* Progress Bar */
body.dark-mode .mobile-progress-bar {
    background-color: var(--dark-bg-tertiary) !important;
}

body.dark-mode .mobile-progress-fill {
    background-color: var(--dark-accent-primary) !important;
}

body.dark-mode .mobile-question-counter {
    background-color: var(--dark-bg-secondary) !important;
    color: var(--dark-text-primary) !important;
}

/* Mobile Test Container */
body.dark-mode .mobile-test-container {
    background-color: var(--dark-bg-primary) !important;
}

/* Question Section */
body.dark-mode .mobile-question-section {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
    color: var(--dark-text-primary) !important;
}

body.dark-mode .mobile-question-section h2 {
    color: var(--dark-text-primary) !important;
}

/* Image Section */
body.dark-mode .mobile-image-section {
    background-color: var(--dark-bg-tertiary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .mobile-zoom-btn {
    background-color: var(--dark-bg-secondary) !important;
    color: var(--dark-text-primary) !important;
    border: 1px solid var(--dark-border) !important;
}

/* Mobile Options */
body.dark-mode .mobile-options-section {
    background-color: transparent !important;
}

body.dark-mode .mobile-option {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border: 2px solid var(--dark-border) !important;
}

body.dark-mode .mobile-option:active,
body.dark-mode .mobile-option:hover {
    border-color: var(--dark-accent-primary) !important;
    background-color: var(--dark-bg-tertiary) !important;
}

body.dark-mode .mobile-option input[type="radio"]:checked + label {
    background-color: rgba(0, 255, 136, 0.1) !important;
}

body.dark-mode .mobile-option label {
    background-color: transparent !important;
    color: var(--dark-text-primary) !important;
}

body.dark-mode .mobile-option-letter {
    background-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-accent-primary) !important;
    border: 2px solid var(--dark-border) !important;
}

body.dark-mode .mobile-option input[type="radio"]:checked + label .mobile-option-letter {
    background-color: var(--dark-accent-primary) !important;
    color: var(--dark-bg-primary) !important;
}

body.dark-mode .mobile-option-text {
    color: var(--dark-text-primary) !important;
}

/* Mobile Navigation Footer */
body.dark-mode .mobile-nav-footer {
    background-color: var(--dark-bg-secondary) !important;
    border-top: 1px solid var(--dark-border) !important;
}

body.dark-mode .mobile-nav-btn {
    background-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-primary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .mobile-next-btn,
body.dark-mode .mobile-finish-btn {
    background-color: var(--dark-accent-primary) !important;
    color: var(--dark-bg-primary) !important;
    border: none !important;
}

body.dark-mode .mobile-prev-btn:disabled {
    opacity: 0.5;
    background-color: var(--dark-bg-tertiary) !important;
}

/* Mobile Modal */
body.dark-mode .mobile-modal {
    background-color: rgba(0, 0, 0, 0.9) !important;
}

body.dark-mode .mobile-modal-content {
    background-color: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .mobile-modal-close {
    background-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-primary) !important;
}

/* ============================================
   MOBILE TEST REVIEW
   ============================================ */
body.dark-mode .mobile-review-body {
    background-color: var(--dark-bg-primary) !important;
}

/* Review Header */
body.dark-mode .mobile-review-header {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border-bottom: 1px solid var(--dark-border) !important;
}

body.dark-mode .mobile-review-header h1 {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .back-link {
    color: var(--dark-accent-primary) !important;
}

/* Score Summary */
body.dark-mode .score-summary {
    background-color: var(--dark-accent-primary) !important;
    background: linear-gradient(135deg, #00ff88 0%, #00cc6f 100%) !important;
}

body.dark-mode .score-circle {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border: 4px solid rgba(255, 255, 255, 0.5) !important;
}

body.dark-mode .score-percentage {
    color: var(--dark-bg-primary) !important;
    font-weight: bold;
}

body.dark-mode .score-details {
    color: var(--dark-bg-primary) !important;
}

body.dark-mode .score-details h2 {
    color: var(--dark-bg-primary) !important;
}

body.dark-mode .score-label,
body.dark-mode .test-date {
    color: rgba(10, 10, 10, 0.8) !important;
}

/* Questions Review */
body.dark-mode .questions-review {
    background-color: var(--dark-bg-primary) !important;
}

body.dark-mode .questions-review h3 {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .review-question-card {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .review-question-card.correct {
    border-left: 4px solid var(--dark-accent-primary) !important;
}

body.dark-mode .review-question-card.incorrect {
    border-left: 4px solid var(--dark-danger) !important;
}

/* Review Question Header */
body.dark-mode .review-question-header {
    background-color: var(--dark-bg-tertiary) !important;
    border-bottom: 1px solid var(--dark-border) !important;
}

body.dark-mode .question-number {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .result-badge {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .review-question-card.correct .result-badge {
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .review-question-card.incorrect .result-badge {
    color: var(--dark-danger) !important;
}

/* Review Image */
body.dark-mode .review-image {
    background-color: var(--dark-bg-tertiary) !important;
    border: 1px solid var(--dark-border) !important;
}

/* Review Question Text */
body.dark-mode .review-question-text {
    background-color: transparent !important;
    color: var(--dark-text-primary) !important;
}

body.dark-mode .review-question-text p {
    color: var(--dark-text-primary) !important;
}

/* Review Options */
body.dark-mode .review-options {
    background-color: transparent !important;
}

body.dark-mode .review-option {
    background-color: var(--dark-bg-tertiary) !important;
    background: var(--dark-bg-tertiary) !important;
    border: 2px solid var(--dark-border) !important;
}

body.dark-mode .review-option.correct-answer {
    background-color: rgba(0, 255, 136, 0.1) !important;
    border-color: var(--dark-accent-primary) !important;
}

body.dark-mode .review-option.user-answer:not(.correct-answer) {
    background-color: rgba(255, 68, 68, 0.1) !important;
    border-color: var(--dark-danger) !important;
}

body.dark-mode .option-letter {
    background-color: var(--dark-bg-primary) !important;
    color: var(--dark-accent-primary) !important;
    border: 2px solid var(--dark-border) !important;
}

body.dark-mode .review-option.correct-answer .option-letter {
    background-color: var(--dark-accent-primary) !important;
    color: var(--dark-bg-primary) !important;
}

body.dark-mode .review-option.user-answer:not(.correct-answer) .option-letter {
    background-color: var(--dark-danger) !important;
    color: var(--dark-text-primary) !important;
}

body.dark-mode .option-text {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .answer-label {
    background-color: rgba(255, 68, 68, 0.2) !important;
    color: var(--dark-danger) !important;
}

body.dark-mode .correct-label {
    background-color: rgba(0, 255, 136, 0.2) !important;
    color: var(--dark-accent-primary) !important;
}

/* Explanation */
body.dark-mode .explanation {
    background-color: rgba(0, 170, 255, 0.1) !important;
    border: 1px solid var(--dark-info) !important;
    color: var(--dark-text-primary) !important;
}

body.dark-mode .explanation p {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .explanation strong {
    color: var(--dark-accent-primary) !important;
}

/* Mobile Results/Complete Page */
body.dark-mode .mobile-results-container {
    background-color: var(--dark-bg-primary) !important;
}

body.dark-mode .results-header {
    background-color: var(--dark-bg-secondary) !important;
    color: var(--dark-text-primary) !important;
}

body.dark-mode .results-score {
    background-color: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .results-actions {
    background-color: transparent !important;
}

/* ============================================
   MOBILE SUBMIT TEST MODAL (Completion Confirmation)
   ============================================ */
body.dark-mode #mobileCompletionModal {
    background-color: rgba(0, 0, 0, 0.9) !important;
}

body.dark-mode #mobileCompletionModal .mobile-modal-content {
    background-color: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode #mobileCompletionModal h2 {
    color: var(--dark-text-primary) !important;
}

/* Questions Answered & Time Used Card */
body.dark-mode .mobile-completion-stats {
    background-color: var(--dark-bg-tertiary) !important;
    background: var(--dark-bg-tertiary) !important;
    border: 1px solid var(--dark-border) !important;
    padding: 1rem !important;
    border-radius: 8px !important;
}

body.dark-mode .mobile-completion-stats p {
    color: var(--dark-text-secondary) !important;
    margin: 0.5rem 0 !important;
}

body.dark-mode .mobile-completion-stats strong {
    color: var(--dark-accent-primary) !important;
}

/* Warning Message Card */
body.dark-mode .mobile-warning {
    background-color: rgba(255, 170, 0, 0.1) !important;
    background: rgba(255, 170, 0, 0.1) !important;
    border: 1px solid var(--dark-warning) !important;
    color: var(--dark-warning) !important;
    padding: 0.75rem !important;
    border-radius: 8px !important;
}

/* Action Buttons */
body.dark-mode .mobile-completion-actions {
    background-color: transparent !important;
}

body.dark-mode .mobile-secondary {
    background-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-primary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .mobile-secondary:hover {
    background-color: var(--dark-bg-secondary) !important;
    border-color: var(--dark-accent-primary) !important;
}

body.dark-mode .mobile-primary {
    background-color: var(--dark-accent-primary) !important;
    color: var(--dark-bg-primary) !important;
    border: none !important;
}

body.dark-mode .mobile-primary:hover {
    opacity: 0.9;
}

/* Legacy class names (fallback) */
body.dark-mode .mobile-submit-modal {
    background-color: rgba(0, 0, 0, 0.9) !important;
}

body.dark-mode .mobile-submit-content {
    background-color: var(--dark-bg-secondary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .submit-stats {
    background-color: var(--dark-bg-tertiary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .submit-stats p {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .submit-stats strong {
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .submit-warning {
    background-color: rgba(255, 170, 0, 0.1) !important;
    border: 1px solid var(--dark-warning) !important;
    color: var(--dark-warning) !important;
}

/* ============================================
   MOBILE BOTTOM NAVIGATION BAR
   ============================================ */
body.dark-mode .mobile-bottom-nav {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border-top: 1px solid var(--dark-border) !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5) !important;
}

body.dark-mode .mobile-nav-item {
    background-color: transparent !important;
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .mobile-nav-item:hover,
body.dark-mode .mobile-nav-item:active {
    background-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .mobile-nav-item.active {
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .mobile-nav-icon {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .mobile-nav-item.active .mobile-nav-icon {
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .mobile-nav-label {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .mobile-nav-item.active .mobile-nav-label {
    color: var(--dark-accent-primary) !important;
}

/* Mobile Action Buttons at Bottom */
body.dark-mode .mobile-action-bar {
    background-color: var(--dark-bg-secondary) !important;
    border-top: 1px solid var(--dark-border) !important;
}

body.dark-mode .mobile-action-btn {
    background-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-primary) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .mobile-action-btn.primary {
    background-color: var(--dark-accent-primary) !important;
    color: var(--dark-bg-primary) !important;
    border: none !important;
}

body.dark-mode .mobile-action-btn:hover {
    opacity: 0.9;
}

/* ============================================
   ADMIN DASHBOARD DARK MODE
   ============================================ */

/* Admin Dashboard Container */
body.dark-mode .admin-dashboard {
    background-color: var(--dark-bg-primary) !important;
    background: var(--dark-bg-primary) !important;
}

/* Admin Header */
body.dark-mode .admin-header h1 {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .admin-header h1 i {
    color: var(--dark-accent-primary) !important;
}

/* Admin Action Buttons */
body.dark-mode .admin-actions .btn {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .admin-actions .btn:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
}

/* Stats Cards */
body.dark-mode .stat-card {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    border-left-color: var(--dark-accent-primary) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .stat-card:hover {
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.4) !important;
}

body.dark-mode .stat-card.primary {
    border-left-color: #007bff !important;
}

body.dark-mode .stat-card.success {
    border-left-color: var(--dark-accent-primary) !important;
}

body.dark-mode .stat-card.warning {
    border-left-color: var(--dark-warning) !important;
}

body.dark-mode .stat-card.info {
    border-left-color: var(--dark-info) !important;
}

body.dark-mode .stat-icon {
    background-color: var(--dark-bg-tertiary) !important;
    background: var(--dark-bg-tertiary) !important;
}

body.dark-mode .stat-icon i {
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .stat-content h3 {
    color: var(--dark-text-muted) !important;
}

body.dark-mode .stat-number {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .stat-change {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .stat-change.positive {
    color: var(--dark-accent-primary) !important;
}

/* Chart Cards */
body.dark-mode .chart-card {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .chart-card h3 {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .chart-card h3 i {
    color: var(--dark-accent-primary) !important;
}

/* Revenue Section */
body.dark-mode .revenue-section h2 {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .revenue-section h2 i {
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .revenue-card {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .revenue-card h4 {
    color: var(--dark-text-muted) !important;
}

body.dark-mode .revenue-amount {
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .revenue-count {
    color: var(--dark-text-secondary) !important;
}

/* Test Analytics Section */
body.dark-mode .test-analytics-section h2,
body.dark-mode .question-analytics-section h2 {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .test-analytics-section h2 i,
body.dark-mode .question-analytics-section h2 i {
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .performance-card {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .performance-card h4 {
    color: var(--dark-text-muted) !important;
}

body.dark-mode .performance-number {
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .progress-bar {
    background-color: var(--dark-bg-tertiary) !important;
}

body.dark-mode .progress-fill {
    background-color: #007bff !important;
}

body.dark-mode .progress-fill.success {
    background-color: var(--dark-accent-primary) !important;
}

/* Data Table */
body.dark-mode .table-container {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .data-table th,
body.dark-mode .data-table td {
    color: var(--dark-text-primary) !important;
    border-bottom-color: var(--dark-border) !important;
}

body.dark-mode .data-table th {
    background-color: var(--dark-bg-tertiary) !important;
    background: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .data-table tbody tr:hover {
    background-color: var(--dark-bg-tertiary) !important;
}

/* Percentage Badges */
body.dark-mode .percentage.success {
    background-color: rgba(0, 255, 136, 0.2) !important;
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .percentage.warning {
    background-color: rgba(255, 170, 0, 0.2) !important;
    color: var(--dark-warning) !important;
}

body.dark-mode .percentage.danger {
    background-color: rgba(255, 68, 68, 0.2) !important;
    color: var(--dark-danger) !important;
}

/* Difficulty Badges */
body.dark-mode .difficulty-badge.easy {
    background-color: rgba(0, 255, 136, 0.2) !important;
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .difficulty-badge.medium {
    background-color: rgba(255, 170, 0, 0.2) !important;
    color: var(--dark-warning) !important;
}

body.dark-mode .difficulty-badge.hard {
    background-color: rgba(255, 68, 68, 0.2) !important;
    color: var(--dark-danger) !important;
}

/* Status Badges */
body.dark-mode .status-badge.good {
    background-color: rgba(0, 255, 136, 0.2) !important;
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .status-badge.medium {
    background-color: rgba(255, 170, 0, 0.2) !important;
    color: var(--dark-warning) !important;
}

body.dark-mode .status-badge.needs-attention {
    background-color: rgba(255, 68, 68, 0.2) !important;
    color: var(--dark-danger) !important;
}

/* ============================================
   ADMIN RECENT ACTIVITY SECTION
   ============================================ */
body.dark-mode .activity-section {
    background-color: transparent !important;
}

body.dark-mode .activity-section h2 {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .activity-section h2 i {
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .activity-grid {
    background-color: transparent !important;
}

body.dark-mode .activity-card {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .activity-card h4 {
    color: var(--dark-text-primary) !important;
    border-bottom-color: var(--dark-border) !important;
}

body.dark-mode .activity-list {
    background-color: transparent !important;
}

body.dark-mode .activity-item {
    background-color: transparent !important;
    color: var(--dark-text-primary) !important;
}

body.dark-mode .activity-item:hover {
    background-color: var(--dark-bg-tertiary) !important;
}

body.dark-mode .activity-item i {
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .activity-item span {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .activity-item small {
    color: var(--dark-text-muted) !important;
}

/* Quick Actions Section */
body.dark-mode .quick-actions-section h2 {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .quick-actions-section h2 i {
    color: var(--dark-accent-primary) !important;
}

body.dark-mode .action-btn {
    background-color: var(--dark-bg-secondary) !important;
    background: var(--dark-bg-secondary) !important;
    color: var(--dark-text-primary) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .action-btn:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
    color: var(--dark-accent-primary) !important;
    background-color: var(--dark-bg-tertiary) !important;
}

body.dark-mode .action-btn i {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .action-btn:hover i {
    color: var(--dark-accent-primary) !important;
}

/* ============================================
   MOBILE TEST SELECTION PAGE
   ============================================ */
body.dark-mode .mobile-body {
    background-color: var(--dark-bg-primary) !important;
}

body.dark-mode .mobile-header {
    background-color: var(--dark-bg-secondary) !important;
    border-bottom: 1px solid var(--dark-border) !important;
}

body.dark-mode .mobile-header h1 {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .mobile-back-btn {
    color: var(--dark-text-primary) !important;
}

body.dark-mode .mobile-back-btn:active {
    background: rgba(0, 255, 136, 0.1) !important;
}

body.dark-mode .mobile-subtitle {
    color: var(--dark-text-secondary) !important;
}

body.dark-mode .mobile-test-card {
    background-color: #1a1a1a !important;
    background: #1a1a1a !important;
    color: #e0e0e0 !important;
    border: 1px solid #2a2a2a !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .mobile-test-card:active {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4) !important;
    border-color: #00ff88 !important;
}

body.dark-mode .mobile-test-card.featured {
    background: linear-gradient(135deg, #00ff88 0%, #00d4aa 100%) !important;
    color: #0a0a0a !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.3) !important;
}

body.dark-mode .card-icon {
    background-color: #2a2a2a !important;
    color: #00ff88 !important;
}

body.dark-mode .mobile-test-card.featured .card-icon {
    background: rgba(10, 10, 10, 0.15) !important;
    color: #0a0a0a !important;
}

body.dark-mode .card-content h3,
body.dark-mode .card-content h4 {
    color: #e0e0e0 !important;
}

body.dark-mode .card-content p {
    color: #999 !important;
}

body.dark-mode .mobile-test-card.featured .card-content h3 {
    color: #0a0a0a !important;
}

body.dark-mode .mobile-test-card.featured .card-content p {
    color: rgba(10, 10, 10, 0.8) !important;
}

body.dark-mode .card-arrow {
    color: #666 !important;
}

body.dark-mode .mobile-test-card.featured .card-arrow {
    color: #0a0a0a !important;
}

body.dark-mode .mobile-section-title {
    color: #e0e0e0 !important;
}

body.dark-mode .mobile-subtitle {
    color: #999 !important;
}

/* ============================================
   SMOOTH TRANSITIONS
   ============================================ */
body.dark-mode * {
    transition: background-color 0.3s ease, 
                color 0.3s ease, 
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}

/* Disable transitions for performance on certain elements */
body.dark-mode .no-transition,
body.dark-mode .no-transition * {
    transition: none !important;
}
