.light-mode {
    --bk-light-bg: #f8ecd0;
    --bk-light-surface: #fff9e9;
    --bk-light-surface-2: #fff4d6;
    --bk-light-border: rgba(145, 114, 41, 0.28);
    --bk-light-text: #2a2f3b;
    --bk-light-muted: #546072;
    --bk-light-accent: #b9851d;
    --bk-light-accent-soft: rgba(255, 211, 120, 0.45);
  }

  .light-mode {
    background: linear-gradient(140deg, #fff8df 0%, #f8ecd0 42%, #efe1c2 100%) !important;
    color: #2a2f3b !important;
  }

  .light-mode .navbar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(244, 231, 197, 0.98) 100%) !important;
    border-bottom: 1px solid rgba(142, 116, 56, 0.28) !important;
    box-shadow: 0 8px 22px rgba(122, 93, 34, 0.16) !important;
  }

  .light-mode .hero,
  .light-mode .content-section,
  .light-mode .features-section,
  .light-mode .shop-section,
  .light-mode .timeline-container,
  .light-mode .panel,
  .light-mode .profile-container,
  .light-mode .settings-card,
  .light-mode .card {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 247, 224, 0.7) 55%, rgba(246, 232, 196, 0.66) 100%) !important;
    border-color: rgba(154, 124, 57, 0.2) !important;
    box-shadow: 0 16px 36px rgba(126, 95, 26, 0.14) !important;
  }

  .light-mode .feature-card,
  .light-mode .shop-card,
  .light-mode .news-card,
  .light-mode .timeline-item {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 244, 214, 0.85) 100%) !important;
    border-color: rgba(162, 129, 53, 0.26) !important;
    box-shadow: 0 10px 24px rgba(118, 88, 22, 0.14) !important;
  }

  .light-mode .nav-links a,
  .light-mode .footer-links a,
  .light-mode h1,
  .light-mode h2,
  .light-mode h3 {
    color: #2a2f3b !important;
    text-shadow: none !important;
  }

  .light-mode .nav-links a:hover,
  .light-mode .footer-links a:hover {
    color: #7f5f1d !important;
  }

  .light-mode .footer {
    background: linear-gradient(180deg, rgba(252, 243, 217, 0.95) 0%, rgba(236, 220, 181, 0.96) 100%) !important;
    border-top: 1px solid rgba(134, 102, 34, 0.24) !important;
  }

  .light-mode .footer-content p {
    color: #4b5565 !important;
  }

  .light-mode .main-content,
  .light-mode .container,
  .light-mode .content,
  .light-mode .section,
  .light-mode .wiki-container,
  .light-mode .forum-container {
    color: var(--bk-light-text) !important;
  }

  .light-mode .dropdown,
  .light-mode select,
  .light-mode option,
  .light-mode input,
  .light-mode textarea {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 247, 226, 0.96) 100%) !important;
    border: 1px solid var(--bk-light-border) !important;
    color: var(--bk-light-text) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75) !important;
  }

  .light-mode input::placeholder,
  .light-mode textarea::placeholder {
    color: rgba(66, 79, 96, 0.68) !important;
  }

  .light-mode button,
  .light-mode .btn,
  .light-mode .dropdown-btn,
  .light-mode .nav-btn,
  .light-mode .confirm-btn,
  .light-mode .cancel-btn,
  .light-mode .toolbar-btn {
    background: linear-gradient(165deg, #ffe7ab 0%, #ffd778 100%) !important;
    border: 1px solid rgba(144, 107, 25, 0.44) !important;
    color: #1f2630 !important;
    text-shadow: none !important;
    box-shadow: 0 6px 14px rgba(136, 96, 21, 0.18) !important;
  }

  .light-mode button:hover,
  .light-mode .btn:hover,
  .light-mode .dropdown-btn:hover,
  .light-mode .nav-btn:hover,
  .light-mode .confirm-btn:hover,
  .light-mode .cancel-btn:hover,
  .light-mode .toolbar-btn:hover {
    background: linear-gradient(165deg, #ffeec0 0%, #ffe090 100%) !important;
    border-color: rgba(144, 107, 25, 0.58) !important;
    box-shadow: 0 8px 18px rgba(136, 96, 21, 0.24) !important;
    color: #1b222c !important;
  }

  .light-mode .danger-btn,
  .light-mode .delete-btn {
    background: linear-gradient(165deg, #ffd6d6 0%, #ffb3b3 100%) !important;
    border-color: rgba(153, 40, 40, 0.46) !important;
    color: #3b1717 !important;
  }

  .light-mode .danger-btn:hover,
  .light-mode .delete-btn:hover {
    background: linear-gradient(165deg, #ffe1e1 0%, #ffc4c4 100%) !important;
    border-color: rgba(153, 40, 40, 0.58) !important;
    color: #321313 !important;
  }

  .light-mode .modal,
  .light-mode .modal-content,
  .light-mode .popup,
  .light-mode .popup-content,
  .light-mode .dialog,
  .light-mode .dialog-content {
    background: linear-gradient(165deg, rgba(255, 251, 239, 0.97) 0%, rgba(245, 234, 203, 0.97) 100%) !important;
    border: 1px solid rgba(134, 103, 35, 0.34) !important;
    color: var(--bk-light-text) !important;
    box-shadow: 0 16px 30px rgba(96, 72, 19, 0.2) !important;
  }

  .light-mode .users-table th,
  .light-mode table th,
  .light-mode .table thead th {
    background: linear-gradient(180deg, #ffe6a3 0%, #ffd882 100%) !important;
    color: #1f2630 !important;
    border-color: rgba(140, 105, 30, 0.42) !important;
  }

  .light-mode .users-table td,
  .light-mode table td,
  .light-mode .table tbody td {
    color: var(--bk-light-text) !important;
    border-color: rgba(133, 105, 46, 0.2) !important;
    background: rgba(255, 251, 238, 0.75) !important;
  }

  .light-mode .tab,
  .light-mode .tabs button,
  .light-mode .sidebar-tab {
    background: rgba(255, 237, 182, 0.9) !important;
    border-color: rgba(145, 111, 37, 0.38) !important;
    color: #283141 !important;
  }

  .light-mode .tab.active,
  .light-mode .tabs button.active,
  .light-mode .sidebar-tab.active {
    background: linear-gradient(165deg, #ffe49d 0%, #ffcd66 100%) !important;
    color: #18202b !important;
    box-shadow: 0 8px 18px rgba(120, 86, 17, 0.2) !important;
  }

  .light-mode .notification-badge,
  .light-mode .message-badge {
    background: #ffd33b !important;
    color: #2c2204 !important;
    border: 1px solid rgba(145, 104, 8, 0.5) !important;
    text-shadow: none !important;
    box-shadow: 0 0 0 2px rgba(255, 244, 203, 0.72) !important;
  }

  .light-mode .copyright-bar,
  .light-mode .copyright-container {
    background: linear-gradient(180deg, rgba(252, 243, 217, 0.95) 0%, rgba(236, 220, 181, 0.96) 100%) !important;
    border-top: 1px solid rgba(134, 102, 34, 0.24) !important;
    color: #485365 !important;
  }

  /* Targeted fallback layer for legacy dark containers */
  .light-mode .dark,
  .light-mode .dark-card,
  .light-mode .dark-panel,
  .light-mode .dark-box,
  .light-mode .bg-dark,
  .light-mode .panel-dark,
  .light-mode .card-dark,
  .light-mode .modal-dark,
  .light-mode .dialog-dark,
  .light-mode .popup-dark,
  .light-mode .users-table-wrap,
  .light-mode .danger-table-wrap,
  .light-mode .performance-container,
  .light-mode .performance-main,
  .light-mode .performance-sidebar,
  .light-mode .news-item,
  .light-mode .settings-section,
  .light-mode .wiki-article,
  .light-mode .forum-post,
  .light-mode .shop-card,
  .light-mode .feature-card,
  .light-mode .timeline-item {
    background: linear-gradient(165deg, rgba(255, 251, 238, 0.94) 0%, rgba(245, 234, 203, 0.94) 100%) !important;
    border-color: rgba(145, 114, 41, 0.24) !important;
    color: var(--bk-light-text) !important;
  }

  .light-mode .text-muted,
  .light-mode .muted,
  .light-mode small,
  .light-mode .helper-text {
    color: var(--bk-light-muted) !important;
  }

  /* Final cleanup for legacy blocks that still force dark backgrounds */
  .light-mode .bg-dark,
  .light-mode .background-dark,
  .light-mode .theme-dark,
  .light-mode .is-dark,
  .light-mode [style*="background:#000"],
  .light-mode [style*="background: #000"],
  .light-mode [style*="background-color:#000"],
  .light-mode [style*="background-color: #000"],
  .light-mode [style*="background:#111"],
  .light-mode [style*="background: #111"],
  .light-mode [style*="background-color:#111"],
  .light-mode [style*="background-color: #111"],
  .light-mode [style*="background:#1a1a1a"],
  .light-mode [style*="background: #1a1a1a"],
  .light-mode [style*="background-color:#1a1a1a"],
  .light-mode [style*="background-color: #1a1a1a"] {
    background: linear-gradient(165deg, rgba(255, 251, 238, 0.94) 0%, rgba(245, 234, 203, 0.94) 100%) !important;
    border-color: rgba(145, 114, 41, 0.24) !important;
    color: var(--bk-light-text) !important;
  }

  .light-mode .navbar,
  .light-mode .footer,
  .light-mode .copyright-bar,
  .light-mode .copyright-container {
    color: inherit !important;
  }

  .light-mode table,
  .light-mode thead,
  .light-mode tbody,
  .light-mode tr,
  .light-mode th,
  .light-mode td {
    border-color: rgba(133, 105, 46, 0.22) !important;
    color: var(--bk-light-text) !important;
  }

  .light-mode .content-section a,
  .light-mode .features-section a,
  .light-mode .profile-container a,
  .light-mode .settings-card a {
    color: #4c5f7c !important;
  }

  .light-mode .content-section a:hover,
  .light-mode .features-section a:hover,
  .light-mode .profile-container a:hover,
  .light-mode .settings-card a:hover {
    color: #334967 !important;
  }
