[data-theme="dark"] body {
    color: var(--text);
}

[data-theme="dark"] body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    background: rgba(0, 0, 0, 0.55);
    pointer-events: none;
}

[data-theme="dark"] .screen {
    background: var(--bg-card);
    color: var(--text);
}

[data-theme="dark"] h1 {
    color: #ff8a70;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .close-btn {
    background: #2a2a3e;
    border-color: #444;
    color: #e0e0e0;
}

[data-theme="dark"] button {
    background: #1a1a2e;
    color: #e8e8f0;
    border-color: #555;
    box-shadow: 0 5px 0 #0a0a18;
}

[data-theme="dark"] button:hover:not(:disabled) {
    box-shadow: 0 1px 0 #0a0a18;
}

[data-theme="dark"] #choices button,
[data-theme="dark"] #timerChoices button,
[data-theme="dark"] #trainingChoices button {
    background: #1a1a2e;
    color: #e8e8f0;
    border-color: #555;
    box-shadow: 0 5px 0 #0a0a18;
}

[data-theme="dark"] .image-box {
    background: linear-gradient(180deg, #1e2a3a 0%, #252535 60%, #1a1a2e 100%);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .hint-box {
    background: #2a2200;
    border-color: var(--gold);
    color: var(--gold);
}

[data-theme="dark"] .mode-label {
    color: #aaa;
}

[data-theme="dark"] .train-gen-btn {
    background: #1e1e2e;
    color: #e0e0e0;
    border-color: #444;
    box-shadow: 0 4px 0 #111;
}

[data-theme="dark"] .train-gen-all {
    background: #1b3a1b;
    border-color: #2e7d32;
    box-shadow: 0 4px 0 #1b5e20;
}

[data-theme="dark"] .site-footer {
    background: rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] li.score-entry {
    background: #1a1a2e;
    border-color: #444;
    box-shadow: 0 3px 0 #0a0a18;
    color: #e8e8f0;
}

[data-theme="dark"] .top-three {
    background: linear-gradient(135deg, #2a2200, #3a3000) !important;
    border-color: var(--gold) !important;
}

[data-theme="dark"] .me {
    background: #001a2e !important;
    border-color: var(--blue) !important;
}

[data-theme="dark"] .tab-btn {
    background: #1e1e2e;
    color: #e0e0e0;
    border-color: #444;
    box-shadow: 0 4px 0 #111;
}

[data-theme="dark"] .tab-btn:hover:not(:disabled) {
    box-shadow: 0 1px 0 #111;
}

[data-theme="dark"] .tab-btn.active {
    background: var(--red);
    color: white;
    border-color: var(--red-dark);
    box-shadow: 0 4px 0 #700;
}

[data-theme="dark"] .stat-item {
    background: #1a1a2e;
    border-color: #444;
}

[data-theme="dark"] .stat-val {
    color: #ff8a70;
}

[data-theme="dark"] .stat-lbl {
    color: #9090aa;
}

[data-theme="dark"] .badge-item.locked {
    background: #1e1e2e;
    border-color: #333;
}

[data-theme="dark"] .badge-item.unlocked {
    background: #2a2200;
    border-color: var(--gold-dark);
    color: var(--gold);
}

[data-theme="dark"] .worst-pokemon-card {
    background: #2a2200;
    border-color: var(--gold-dark);
}

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

[data-theme="dark"] .worst-pokemon-name {
    color: #e0e0e0;
}

[data-theme="dark"] .worst-pokemon-img {
    background: #1a1a2e;
    border-color: var(--gold-dark);
}

[data-theme="dark"] .badge-progress-wrap {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .badge-progress-bar {
    background: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .badge-progress-fill {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.7));
}

[data-theme="dark"] .profile-section button {
    color: #ff6b6b;
    border-color: #ff6b6b;
    box-shadow: 0 4px 0 #a00;
}

[data-theme="dark"] .pokedex-bar {
    background: #333;
}

[data-theme="dark"] .rule-block {
    background: #1e1e2e;
    border-color: #333;
    color: #e0e0e0;
}

[data-theme="dark"] .badge-rule-item {
    background: #2a2200;
    border-color: var(--gold-dark);
    color: var(--gold);
}

[data-theme="dark"] .attempt-bubble.empty {
    background: #2a2a3e;
    border-color: #444;
    color: #555;
}

[data-theme="dark"] .daily-search-box input {
    background: #1e1e2e;
    color: #e0e0e0;
    border-color: #444;
}

[data-theme="dark"] .suggestions-list {
    background: #1e1e2e;
    border-color: #444;
}

[data-theme="dark"] .suggestion-item {
    color: #e0e0e0;
    border-bottom-color: #333;
}

[data-theme="dark"] .mode-stats-section {
    background: #1e1e2e;
    border-color: #333;
}

[data-theme="dark"] .mode-stat-item {
    background: #2a2a3e;
    border-color: #444;
}

[data-theme="dark"] .mode-stat-val {
    color: #ff6b6b;
}

[data-theme="dark"] .mode-stat-lbl {
    color: #aaa;
}

[data-theme="dark"] .history-section {
    background: #1e1e2e;
}

[data-theme="dark"] .history-item {
    background: #2a2a3e;
    border-color: #333;
    color: #e0e0e0;
}

[data-theme="dark"] .history-score {
    color: #6b9bff;
}

[data-theme="dark"] .filter-btn {
    background: #1e1e2e;
    color: #e0e0e0;
    border-color: #444;
}

[data-theme="dark"] .filter-btn.active {
    background: var(--red);
    color: white;
    border-color: var(--red-dark);
}

[data-theme="dark"] .xp-bar-bg {
    background: #333;
}

[data-theme="dark"] .badge-level-req {
    color: #aaa;
}

[data-theme="dark"] .suggestion-item:first-child {
    background: #2a2200;
    border-left-color: var(--gold);
}

[data-theme="dark"] .modal-box {
    background: #1e1e2e;
    color: #e0e0e0;
}

[data-theme="dark"] .modal-box p {
    color: #aaa;
}

[data-theme="dark"] .modal-box input {
    background: #2a2a3e;
    color: #e0e0e0;
    border-color: #444;
}

[data-theme="dark"] #pseudoInfo {
    color: #aaa;
}

[data-theme="dark"] .setting-item {
    background: var(--bg-input);
    border-color: var(--border);
    color: var(--text);
}

[data-theme="dark"] .setting-label {
    color: var(--text);
}

[data-theme="dark"] .notif-btn {
    background: var(--bg-input);
    border-color: #ff6b6b;
    color: #ff6b6b;
    box-shadow: 0 3px 0 #700;
}

[data-theme="dark"] .notif-btn--danger {
    border-color: #e74c3c;
    color: #e74c3c;
    box-shadow: 0 3px 0 #700;
}

[data-theme="dark"] .volume-slider {
    background: linear-gradient(to right, #ff6b6b 0%, #ff6b6b var(--val, 30%), #333 var(--val, 30%), #333 100%);
}

[data-theme="dark"] #volumeValue {
    color: #ff6b6b;
}

[data-theme="dark"] .toggle-slider {
    background: #444;
}

[data-theme="dark"] .toggle-slider::before {
    background: #ccc;
}

[data-theme="dark"] .pokedex-item.discovered {
    background: #1e2e1e;
    border-color: var(--green-dark);
}

[data-theme="dark"] .pokedex-item.discovered span {
    color: var(--green);
}

[data-theme="dark"] .pokedex-item.undiscovered {
    background: #111120;
    border-color: #1a1a3a;
}

[data-theme="dark"] .pokedex-gen-header {
    background: #1e1e2e;
    border-color: #333;
    color: #e0e0e0;
    box-shadow: 0 3px 0 #111;
}

[data-theme="dark"] .pokedex-gen-header:hover {
    background: #2a2a3e;
    box-shadow: 0 1px 0 #111;
}

[data-theme="dark"] .pokedex-gen-header.open {
    background: var(--red);
    color: white;
    border-color: var(--red-dark);
    box-shadow: 0 3px 0 #700;
}

[data-theme="dark"] .image-box.shiny-encounter {
    background: linear-gradient(135deg, #3e3a20, #4a4222, #3e3a20);
    border-color: #ffd700;
}

[data-theme="dark"] .pokedex-item.discovered.shiny {
    background: #3e3a20;
    border-color: #ffd700;
}

[data-theme="dark"] .pokedex-item.discovered.shiny span {
    color: #ffd700;
}

[data-theme="dark"] .shiny-header {
    background: #3e3a20 !important;
    border-color: #ffd700 !important;
    color: #ffd700 !important;
}

[data-theme="dark"] .shiny-header.open {
    background: #5a5020 !important;
    color: #ffd700 !important;
    border-color: #e6a800 !important;
    box-shadow: 0 3px 0 #7a6a00 !important;
}

[data-theme="dark"] #friendLobbyInfo {
    color: #aaa;
}

[data-theme="dark"] #friendEndScores {
    color: #aaa;
}

[data-theme="dark"] .friend-join-box input {
    background: var(--bg-input);
    color: var(--text);
    border-color: var(--border);
}

[data-theme="dark"] .friend-code-display {
    background: #2a2a3e;
    border-color: #444;
    color: var(--text);
}

[data-theme="dark"] .ach-item.locked {
    background: #1e1e2e;
    border-color: #333;
}

[data-theme="dark"] .ach-item.unlocked {
    background: linear-gradient(135deg, #2a2000, #1a1500);
    border-color: var(--gold-dark);
}

[data-theme="dark"] .ach-item.unlocked .ach-item-name {
    color: var(--gold);
}

[data-theme="dark"] .ach-item.unlocked .ach-item-desc {
    color: var(--gold-dark);
}

[data-theme="dark"] .ach-count {
    color: #aaa;
}

[data-theme="dark"] .ach-progress-bar-wrap {
    background: #333;
}

[data-theme="dark"] .ach-item-name {
    color: #e0e0e0;
}

[data-theme="dark"] #achievements {
    background: transparent;
}

[data-theme="dark"] .sq-toast--info {
    background: #0d0d1a;
    border-color: #333;
}

[data-theme="dark"] .ios-install-banner {
    background: #0d0d1a;
}

[data-theme="dark"] .sw-update-banner {
    background: #0d1a3a;
    border-color: var(--blue);
}

[data-theme="dark"] .wallpaper-card {
    background: var(--bg-input);
    border-color: var(--border);
    color: var(--text);
    box-shadow: 0 3px 0 #111;
}

[data-theme="dark"] .wallpaper-card.active {
    border-color: #ff6b6b;
    box-shadow: 0 3px 0 #700;
}

[data-theme="dark"] .wp-section-header {
    color: #666;
}

[data-theme="dark"] .lsr-row {
    background: var(--bg-input);
    border-color: var(--border);
}

[data-theme="dark"] .lsr-row.claimed {
    background: #0a2e1a;
    border-color: #1a4a2a;
}

[data-theme="dark"] .lsr-row.current {
    background: linear-gradient(135deg, #2a1800, #3a2200);
    border-color: #a06020;
}

[data-theme="dark"] .wp-swatch {
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .wp-swatch-default {
    background: linear-gradient(135deg, #333, #555, #333);
}

[data-theme="dark"] .answer-input-box input {
    background: #1e1e2e;
    color: #e0e0e0;
    border-color: #555;
    box-shadow: 0 5px 0 #111;
}

[data-theme="dark"] .answer-input-box input:focus {
    border-color: var(--primary, #4a7aff);
    box-shadow: 0 4px 0 var(--primary, #4a7aff);
}

[data-theme="dark"] .inverse-choice-btn {
    background: #1e1e2e;
    border-color: #444;
}

[data-theme="dark"] .inverse-choice-btn:hover:not(:disabled) {
    background: #2a2a3e;
}

[data-theme="dark"] .inverse-choice-btn.correct {
    background: #1e2e1e !important;
    border-color: #4caf50 !important;
}

[data-theme="dark"] .inverse-choice-btn.wrong {
    background: #2e1e1e !important;
    border-color: #f44336 !important;
}

[data-theme="dark"] .sound-choices button {
    background: #1e1e2e;
    color: #e0e0e0;
    border-color: #555;
    box-shadow: 0 4px 0 #111;
}

[data-theme="dark"] .sound-choices button:hover:not(:disabled) {
    background: #2a2a3e;
    box-shadow: 0 1px 0 #111;
}