/* ============================================
    다크 테마 (모든 요소에 대한 어두운 오버라이드)
    ============================================ */

/* 전역 다크 테마 */
body.dark-theme {
    background:
        radial-gradient(1200px 640px at 20% 0%, rgba(120, 15, 15, 0.35) 0%, rgba(0, 0, 0, 0) 60%),
        linear-gradient(180deg, #050507 0%, #120406 45%, #050507 100%);
    color: #e2e8f0;

    /* 다크 테마 표면(블럭) 팔레트: 배경보다 확실히 어둡게 */
    --dark-surface-1: #0b0d12; /* 가장 어두운 블럭 */
    --dark-surface-2: #0f131a; /* 기본 패널 */
    --dark-surface-3: #141a25; /* hover/강조 패널 */
    --dark-border: rgba(127, 29, 29, 0.38);
    --dark-border-weak: rgba(51, 65, 85, 0.45);
}

/* 다크 모드: 폼 요소 기본 글자/배경 보정(공유 컴포넌트의 고정 색상 대비) */
body.dark-theme input,
body.dark-theme select,
body.dark-theme textarea {
    background: #111827;
    color: #e5e7eb;
    border-color: #2d3e4f;
}

body.dark-theme input::placeholder,
body.dark-theme textarea::placeholder {
    color: #94a3b8;
}

/* 티커 편집 모달(다크) */
body.dark-theme .ticker-editor-textarea {
    background: #111827;
    color: #e5e7eb;
    border-color: rgba(51, 65, 85, 0.70);
}

body.dark-theme .ticker-control {
    background: var(--dark-surface-2);
    border-color: var(--dark-border-weak);
}

body.dark-theme .ticker-control-label {
    color: #e2e8f0;
}

body.dark-theme .ticker-control-hint {
    color: #94a3b8;
}

body.dark-theme label {
    color: #e5e7eb;
}

/* 전투 결과 모달(시간 종료 등): 승리자 텍스트 대비 보정 */
body.dark-theme #battle-result-winner {
    color: #f8fafc !important;
}

/* 공유 컴포넌트(고정 색상 텍스트) 대비 보정 */
body.dark-theme .skill-uses-readonly {
    color: #e5e7eb;
}

body.dark-theme .skill-uses-status,
body.dark-theme .skill-uses-label,
body.dark-theme .skill-uses-note,
body.dark-theme .number-prompt-message {
    color: #cbd5e1;
}

body.dark-theme .number-prompt-input {
    background: #111827;
    border-color: #2d3e4f;
    color: #e5e7eb;
}

/* 컨테이너 및 주요 섹션 */
body.dark-theme .container {
    background: transparent;
}

body.dark-theme main {
    background: rgba(0, 0, 0, 0.10);
    border: 1px solid rgba(127, 29, 29, 0.35);
}

body.dark-theme .main-layout,
body.dark-theme .teams-grid {
    background: transparent;
}

body.dark-theme .team-box {
    background: var(--dark-surface-2);
    border-color: var(--dark-border-weak);
    color: #e2e8f0;
}

/* 다크 모드에서도 팀 컬러를 명확하게 */
body.dark-theme .teams-grid .team-box:nth-child(1) { border-top-color: var(--team-hero); }
body.dark-theme .teams-grid .team-box:nth-child(2) { border-top-color: var(--team-gov); }
body.dark-theme .teams-grid .team-box:nth-child(3) { border-top-color: var(--team-villain); }

body.dark-theme .teams-grid .team-box:nth-child(1) .team-title { color: var(--team-hero); }
body.dark-theme .teams-grid .team-box:nth-child(2) .team-title { color: var(--team-gov); }
body.dark-theme .teams-grid .team-box:nth-child(3) .team-title { color: var(--team-villain); }

body.dark-theme .team-box:hover {
    border-color: #667eea;
    background: var(--dark-surface-3);
}

body.dark-theme .teams-grid .team-box:nth-child(1):hover { border-color: var(--team-hero); }
body.dark-theme .teams-grid .team-box:nth-child(2):hover { border-color: var(--team-gov); }
body.dark-theme .teams-grid .team-box:nth-child(3):hover { border-color: var(--team-villain); }

body.dark-theme .team-title {
    color: #e2e8f0;
    font-weight: 700;
}

body.dark-theme .team-box-content {
    background: transparent;
}

body.dark-theme .team-box h3 {
    color: #e2e8f0;
}

body.dark-theme .team-header {
    color: #a0aec0;
}

/* 캐릭터 아이템 */
body.dark-theme .character-item {
    background: var(--dark-surface-2);
    border-color: var(--dark-border-weak);
    color: #e2e8f0;
}

/* 사망/실종 상태: 다크 모드 대비(밝은 배경 금지) */
body.dark-theme .character-item.is-dead { background: #2a1115; border-color: #7f1d1d; }
body.dark-theme .character-item.is-missing { background: #2a1f0f; border-color: #a16207; }

body.dark-theme .character-item:hover {
    border-color: #667eea;
    background: var(--dark-surface-3);
}

body.dark-theme .character-item.selected {
    background: var(--dark-surface-3);
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

body.dark-theme .character-name {
    color: #e2e8f0;
}

body.dark-theme .character-status {
    color: #b8c9d9;
}

body.dark-theme .character-item input[type="checkbox"] {
    accent-color: #667eea;
}

/* 오른쪽 패널 */
body.dark-theme .right-panel {
    background: var(--dark-surface-2);
    border-color: var(--dark-border-weak);
    color: #e2e8f0;
}

body.dark-theme .time-display {
    background: var(--dark-surface-1);
    border-color: var(--dark-border-weak);
    color: #e2e8f0;
}

body.dark-theme .time-value {
    color: #667eea;
}

body.dark-theme .mode-section {
    background: var(--dark-surface-1);
    border-color: var(--dark-border-weak);
    color: #e2e8f0;
}

body.dark-theme .mode-buttons button {
    background: var(--dark-surface-2);
    border-color: var(--dark-border-weak);
    color: #e2e8f0;
}

body.dark-theme .mode-buttons button:hover {
    background: var(--dark-surface-3);
    border-color: #667eea;
}

body.dark-theme .mode-buttons button.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* 전투 모드 스타일 */
body.dark-theme .battle-mode {
    background: var(--dark-surface-2) !important;
    border-color: var(--dark-border-weak) !important;
}

body.dark-theme .mode-label {
    color: #e2e8f0 !important;
}

body.dark-theme .mode-toggle {
    color: #e2e8f0;
}

body.dark-theme .mode-btn {
    background: var(--dark-surface-1) !important;
    border-color: var(--dark-border-weak) !important;
    color: #e2e8f0 !important;
}

body.dark-theme .mode-btn:hover {
    background: var(--dark-surface-3) !important;
    border-color: #667eea !important;
}

body.dark-theme .mode-btn.active {
    background: #667eea !important;
    border-color: #667eea !important;
    color: white !important;
}

body.dark-theme .mode-btn:last-child {
    background: #c53030 !important;
    border-color: #c53030 !important;
    color: white !important;
}

body.dark-theme .mode-btn:last-child:hover {
    background: #a41e1e !important;
    border-color: #a41e1e !important;
}

/* 캐릭터 관리 스타일 */
body.dark-theme .character-management {
    background: var(--dark-surface-2) !important;
    border-color: var(--dark-border-weak) !important;
}

body.dark-theme .management-title {
    color: #e2e8f0 !important;
}

body.dark-theme .management-status {
    background: #1f3a28 !important;
    border-color: #2d5a38 !important;
    color: #86efac !important;
}

/* 관리 패널 */
body.dark-theme .manage-section {
    background: var(--dark-surface-1);
    border-color: var(--dark-border-weak);
    color: #e2e8f0;
}

body.dark-theme .btn-management {
    background: var(--dark-surface-2);
    border-color: var(--dark-border-weak);
    color: #e2e8f0;
}

body.dark-theme .btn-management:hover {
    background: var(--dark-surface-3);
    border-color: #667eea;
    color: #667eea;
}

body.dark-theme .add-character-btn {
    background: var(--dark-surface-2);
    border-color: var(--dark-border-weak);
    color: #e2e8f0;
}

body.dark-theme .add-character-btn:hover {
    background: var(--dark-surface-3);
    border-color: #667eea;
}

/* 탐색 탭 */
body.dark-theme .nav-tabs {
    background: var(--dark-surface-2);
    border-color: var(--dark-border-weak);
}

body.dark-theme .nav-tab-btn {
    background: var(--dark-surface-2);
    border-color: var(--dark-border-weak);
    color: #b8c9d9;
}

body.dark-theme .nav-tab-btn:hover {
    background: var(--dark-surface-3);
}

body.dark-theme .nav-tab-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* 콘텐츠 섹션 */
body.dark-theme .content-section {
    background: #0c1626;
}

/* 스탯 선택기 */
body.dark-theme .stat-display {
    background: #1f2f3f;
    color: #667eea;
}

body.dark-theme .stat-selector {
    color: #e2e8f0;
}

body.dark-theme .stat-circle span {
    background: #1f2f3f;
    border-color: #3d4f5f;
    color: #b8c9d9;
}

body.dark-theme .stat-circle input:checked + span {
    background: linear-gradient(#667eea, #764ba2, #fbb6ce);
    border-color: #667eea;
    color: #ffffff;
}

/* 스킬 타입 선택기 */
body.dark-theme .skill-type-selector {
    color: #e2e8f0;
}

body.dark-theme .skill-type-option {
    background: #1f2f3f;
    border-color: #2d3e4f;
    color: #e2e8f0;
}

body.dark-theme .skill-type-option:hover {
    border-color: #667eea;
    background: #232d3a;
}

body.dark-theme .skill-type-option input[type="checkbox"] {
    accent-color: #667eea;
}

body.dark-theme .skill-type-option:has(input:checked) {
    border-color: #667eea;
    background: #232d3a;
}

body.dark-theme .skill-type-option:has(input:checked) span {
    color: #90cdf4;
}

/* 스킬 대상 선택기 */
body.dark-theme .skill-target-selector {
    color: #e2e8f0;
}

body.dark-theme .skill-target-option {
    background: #1f2f3f;
    border-color: #2d3e4f;
    color: #e2e8f0;
}

body.dark-theme .skill-target-option:hover {
    border-color: #667eea;
    background: #232d3a;
}

body.dark-theme .skill-target-option:has(input:checked) {
    border-color: #667eea;
    background: #232d3a;
}

body.dark-theme .skill-target-option:has(input:checked) span {
    color: #90cdf4;
}

body.dark-theme .skill-include-self {
    background: #1f2f3f;
    border-color: #2d3e4f;
    color: #e2e8f0;
}

body.dark-theme .skill-config-note {
    color: #a0aec0;
}

/* 스킬 대상 선택 모달 */
body.dark-theme .skill-target-subtitle {
    color: #b8c9d9;
}

body.dark-theme .skill-target-group {
    background: #1f2f3f;
    border-color: #2d3e4f;
}

body.dark-theme .skill-target-group-title {
    color: #e2e8f0;
}

body.dark-theme .skill-target-btn {
    background: #0f1a24;
    border-color: #2d3e4f;
}

body.dark-theme .skill-target-btn:hover {
    border-color: #667eea;
}

body.dark-theme .skill-target-btn.is-selected {
    background: #232d3a;
    border-color: #667eea;
}

body.dark-theme .skill-target-btn-name {
    color: #e2e8f0;
}

body.dark-theme .skill-target-btn-hp {
    color: #a0aec0;
}

body.dark-theme .skill-target-note {
    color: #a0aec0;
}

/* 상태 선택기 */
body.dark-theme .status-selector {
    color: #e2e8f0;
}

body.dark-theme .status-option {
    background: #1f2f3f;
    border-color: #2d3e4f;
    color: #e2e8f0;
}

body.dark-theme .status-option:hover {
    border-color: #667eea;
}

body.dark-theme .status-option:has(input:checked) {
    border-color: #667eea;
    background: #232d3a;
}

/* 텍스트영역 */
body.dark-theme textarea {
    background: #1f2f3f;
    border-color: #2d3e4f;
    color: #e2e8f0;
}

body.dark-theme textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

body.dark-theme .left-panel h2 {
    color: #667eea;
}

body.dark-theme .search-input {
    background: #1f2f3f;
    border-color: #2d3e4f;
    color: #e2e8f0;
}

body.dark-theme .search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

body.dark-theme .search-input::placeholder {
    color: #718096;
}

body.dark-theme .character-list::-webkit-scrollbar-track {
    background: #1a2a3a;
}

body.dark-theme .character-list::-webkit-scrollbar-thumb {
    background: #2d3e4f;
}

body.dark-theme .filter-select {
    background: #1f2f3f;
    border-color: #2d3e4f;
    color: #e2e8f0;
}

body.dark-theme .filter-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* 캐릭터 목록 테이블 */
body.dark-theme .character-list-table {
    background: #1a2a3a;
    border-color: #2d3e4f;
}

/* 캐릭터 목록: 카드(다크) */
body.dark-theme .character-list-table.is-cards {
    background: #1a2a3a;
}

body.dark-theme .char-card {
    background: #1f2f3f;
    border-color: #2d3e4f;
    color: #e2e8f0;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

body.dark-theme .char-card.team-hero { box-shadow: inset 4px 0 0 #3b82f6, 0 10px 26px rgba(0, 0, 0, 0.35); }
body.dark-theme .char-card.team-gov { box-shadow: inset 4px 0 0 #8b5cf6, 0 10px 26px rgba(0, 0, 0, 0.35); }
body.dark-theme .char-card.team-villain { box-shadow: inset 4px 0 0 #ef4444, 0 10px 26px rgba(0, 0, 0, 0.35); }

body.dark-theme .char-card:hover {
    border-color: #667eea;
    box-shadow: 0 16px 38px rgba(102, 126, 234, 0.18);
}

body.dark-theme .char-card-team {
    color: #cbd5e1;
}

body.dark-theme .char-card-name {
    color: #f8fafc;
}

body.dark-theme .char-card-stat {
    background: #232d3a;
    border-color: #2d3e4f;
}

body.dark-theme .char-card-stat .k {
    color: #94a3b8;
}

body.dark-theme .char-card-stat .v {
    color: #e2e8f0;
}

body.dark-theme .char-card-target {
    color: #a0aec0;
}

body.dark-theme .char-card-hpbar {
    background: #111827;
    border-color: #2d3e4f;
}

body.dark-theme .char-card-hptext {
    color: #cbd5e1;
}

body.dark-theme .char-table-row {
    background: #1f2f3f;
    border-color: #2d3e4f;
    color: #e2e8f0;
}

/* 소속별 테두리(다크) */
body.dark-theme .char-table-row.team-hero { box-shadow: inset 4px 0 0 #3b82f6; }
body.dark-theme .char-table-row.team-gov { box-shadow: inset 4px 0 0 #8b5cf6; }
body.dark-theme .char-table-row.team-villain { box-shadow: inset 4px 0 0 #ef4444; }

body.dark-theme .char-table-row:hover {
    border-color: #667eea;
}

body.dark-theme .char-table-row.header {
    background: #667eea;
    color: white;
}

body.dark-theme .char-table-cell {
    color: #e2e8f0;
}

body.dark-theme .char-table-cell + .char-table-cell {
    border-left: 1px solid #2d3e4f;
}

body.dark-theme .char-table-row.header .char-table-cell + .char-table-cell {
    border-left-color: rgba(255, 255, 255, 0.28);
}

body.dark-theme .skill-tag {
    background: #232d3a;
    color: #e2e8f0;
    border-color: #2d3e4f;
}

body.dark-theme .skill-tag.skill-tag--attack { background: #3a2a1f; color: #fdba74; border-color: #7c2d12; }
body.dark-theme .skill-tag.skill-tag--defense { background: #1f2a3a; color: #93c5fd; border-color: #1e3a8a; }
body.dark-theme .skill-tag.skill-tag--support { background: #132b2f; color: #67e8f9; border-color: #155e75; }
body.dark-theme .skill-tag.skill-tag--heal { background: #132a1c; color: #86efac; border-color: #166534; }

body.dark-theme .char-status {
    font-weight: 600;
}

body.dark-theme .char-status.active {
    background: #1f3a28;
    color: #86efac;
}

body.dark-theme .char-status.dead {
    background: #3a1f1f;
    color: #fca5a5;
}

body.dark-theme .char-status.missing {
    background: #3a2a1f;
    color: #fb923c;
}

/* 전투 기록 */
body.dark-theme .battle-history-list {
    color: #e2e8f0;
}

body.dark-theme .battle-record {
    background: #1a2a3a;
    border-color: #2d3e4f;
}

body.dark-theme .battle-record:hover {
    border-color: #667eea;
}

body.dark-theme .battle-record-header {
    border-color: #2d3e4f;
    color: #e2e8f0;
}

body.dark-theme .battle-record-title {
    color: #667eea;
}

body.dark-theme .battle-record-date {
    color: #a0aec0;
}

body.dark-theme .battle-team-section {
    background: #232d3a;
    border-color: #2d3e4f;
    color: #e2e8f0;
}

body.dark-theme .battle-team-title {
    color: #e2e8f0;
}

body.dark-theme .battle-team-chars {
    color: #a0aec0;
}

body.dark-theme .battle-winner {
    background: #1f3a28;
    border-color: #2d5a38;
}

body.dark-theme .battle-winner .battle-team-title {
    color: #86efac;
}

/* 버튼 */
body.dark-theme .btn-primary {
    background: #667eea;
    color: white;
}

body.dark-theme .btn-primary:hover {
    background: #5568d3;
}

body.dark-theme .btn-secondary {
    background: #2d3e4f;
    color: #e2e8f0;
    border-color: #3d4f5f;
}

body.dark-theme .btn-secondary:hover {
    background: #3d4f5f;
    border-color: #667eea;
}

body.dark-theme .btn-danger {
    background: #e53e3e;
    color: white;
}

body.dark-theme .btn-danger:hover {
    background: #c53030;
}

/* 모달 */
body.dark-theme .modal-content {
    background: #1a2a3a;
    color: #e2e8f0;
}

body.dark-theme .modal-header {
    background: #1a2a3a;
    border-color: #2d3e4f;
    color: #e2e8f0;
}

body.dark-theme .modal-header h2 {
    color: #667eea;
}

body.dark-theme .skip-turn-modal .skip-turn-text {
     background: rgba(37, 99, 235, 0.16);
     border-color: rgba(147, 197, 253, 0.28);
     color: #e5e7eb;
}

body.dark-theme .skip-turn-modal .skip-turn-note {
     color: rgba(229, 231, 235, 0.72);
}

body.dark-theme .modal-close {
    color: #a0aec0;
}

body.dark-theme .modal-close:hover {
    color: #fca5a5;
}

/* 방어자 응답 선택 모달 */
body.dark-theme .defense-response-modal .modal-header h2 {
    color: #e2e8f0;
}

body.dark-theme .defense-response-modal .defense-response-title {
    color: #93c5fd;
}

body.dark-theme .defense-response-modal .defense-response-banner {
    background: #111827;
    color: #e5e7eb;
}

body.dark-theme .defense-response-modal .defense-response-banner__grade {
    color: #22c55e;
}

body.dark-theme .defense-response-modal .dr-btn--counter {
    background: linear-gradient(90deg, #c9bf2c, #b56e1d);
    color: #111827;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}

body.dark-theme .defense-response-modal .dr-btn--dodge {
    background: linear-gradient(90deg, #4f6bff, #6a4bff);
}

body.dark-theme .defense-response-modal .dr-btn--pass {
    background: linear-gradient(90deg, #ff2d2d, #ff1f7a);
}

body.dark-theme .defense-response-modal .dr-btn--defense-skill {
    background: linear-gradient(90deg, #16a34a, #15997f);
}

body.dark-theme .defense-response-modal .defense-response-footnote {
    border-top-color: #2d3e4f;
}

body.dark-theme .defense-response-modal .defense-response-footnote__hint {
    color: #a0aec0;
}

body.dark-theme .form-group {
    color: #e2e8f0;
}

body.dark-theme .form-group label {
    color: #e2e8f0;
}

body.dark-theme .form-group input[type="text"],
body.dark-theme .form-group input[type="number"] {
    background: #232d3a;
    border-color: #2d3e4f;
    color: #e2e8f0;
}

body.dark-theme .form-group input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* 전투 화면 */
body.dark-theme .combat-shell {
    background: transparent;
}

body.dark-theme .combat-header-row {
    color: #cbd5e1;
}

body.dark-theme .team-cards-row {
    background: rgba(12, 10, 10, 0.72);
    border: 1px solid rgba(127, 29, 29, 0.35);
    box-shadow: 0 10px 22px rgba(0,0,0,0.22);
}

body.dark-theme .battle-badge {
    background: #1f2f3f;
    border-color: #2d3e4f;
    color: #e2e8f0;
}

body.dark-theme .battle-badge:hover {
    border-color: #667eea;
}

body.dark-theme .battle-badge .label {
    color: #a0aec0;
}

body.dark-theme .battle-badge .value {
    color: #667eea;
}

body.dark-theme .team-card {
    background: #1a2a3a;
    border-color: #2d3e4f;
    color: #e2e8f0;
}

body.dark-theme .team-card.team-hero { border-left-color: var(--team-hero); }
body.dark-theme .team-card.team-gov { border-left-color: var(--team-gov); }
body.dark-theme .team-card.team-villain { border-left-color: var(--team-villain); }

body.dark-theme .team-card.team-a {
    border-left-color: #667eea;
}

body.dark-theme .team-card.team-a:hover {
    border-color: #667eea;
}

body.dark-theme .team-card.team-b {
    border-left-color: #e53e3e;
}

body.dark-theme .team-card.team-b:hover {
    border-color: #e53e3e;
}

body.dark-theme .team-label {
    color: inherit;
}

body.dark-theme .team-card.team-a .team-label {
    color: #667eea;
}

body.dark-theme .team-card.team-b .team-label {
    color: #fca5a5;
}

body.dark-theme .combat-char-card {
    background: #232d3a;
    border-color: #2d3e4f;
    color: #e2e8f0;
}

body.dark-theme .combat-char-card:hover {
    border-color: #667eea;
    background: #2a3a4a;
}

body.dark-theme .combat-char-card.is-excluded {
    opacity: 0.55;
    filter: grayscale(1);
    border-style: dashed;
}

body.dark-theme .combat-char-card.is-excluded:hover {
    border-color: #64748b;
    background: #1f2937;
}

body.dark-theme .char-name-stat {
    color: #e2e8f0;
}

body.dark-theme .char-name {
    color: #f1f5f9;
}

body.dark-theme .turn-order-hint {
    color: #cbd5e1;
}

body.dark-theme .turn-order-hint .turn-order-title {
    color: #f1f5f9;
}

body.dark-theme .turn-order-hint .turn-order-item {
    border-color: var(--dark-border-weak);
    background: rgba(15, 19, 26, 0.72);
    color: #e2e8f0;
}

body.dark-theme .turn-order-hint .turn-order-item.is-current {
    border-color: rgba(37, 99, 235, 0.70);
    background: rgba(37, 99, 235, 0.20);
    color: #f1f5ff;
}

body.dark-theme .turn-order-hint .turn-order-idx {
    color: #e2e8f0;
}

body.dark-theme .turn-order-hint .turn-order-agi {
    color: #86efac;
}

body.dark-theme .char-level {
    background: #667eea;
}

body.dark-theme .char-tag {
    background: #232d3a;
    color: #667eea;
    border-color: #2d3e4f;
}

body.dark-theme .hp-bar-container {
    background: #1f2f3f;
    border-color: #2d3e4f;
}

body.dark-theme .hp-bar {
    background: #1f2f3f;
    border-color: #2d3e4f;
}

body.dark-theme .hp-text {
    color: #b8c9d9;
}

body.dark-theme .stat-item {
    background: #1f2f3f;
    border-color: #2d3e4f;
    color: #b8c9d9;
}

body.dark-theme .stat-item strong {
    color: #667eea;
}

/* 액션 바 */
body.dark-theme .action-bar {
    background: #1a2a3a;
    border-color: #2d3e4f;
}

body.dark-theme .btn-action {
    background: #1f2f3f;
    border-color: #2d3e4f;
    color: #e2e8f0;
}

body.dark-theme .btn-action.attack {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

body.dark-theme .btn-action.attack:hover {
    background: #5568d3;
}

body.dark-theme .btn-action.defend {
    background: #b8860b;
    color: white;
    border-color: #b8860b;
}

body.dark-theme .btn-action.defend:hover {
    background: #9d700e;
}

body.dark-theme .btn-action.skill {
    background: #9d7eb8;
    color: white;
    border-color: #9d7eb8;
}

body.dark-theme .btn-action.skill:hover {
    background: #8a6a9e;
}

body.dark-theme .btn-action.end-turn {
    background: #e53e3e;
    color: white;
    border-color: #e53e3e;
}

body.dark-theme .btn-action.end-turn:hover {
    background: #c53030;
}

/* 로그 패널 */
body.dark-theme .log-panel {
    background: #0c1626;
    border-color: #2d3e4f;
    color: #e2e8f0;
}

body.dark-theme .log-entry {
    color: #e2e8f0;
}

body.dark-theme .log-timestamp {
    color: #718096;
}

/* 실시간 패널 */
body.dark-theme .realtime-panel {
    background: #1a2a3a;
    border-color: #2d3e4f;
    color: #e2e8f0;
}

body.dark-theme .realtime-title {
    color: #e2e8f0;
}

body.dark-theme .realtime-clock {
    background: #232d3a;
    border-color: #2d3e4f;
    color: #e2e8f0;
}

body.dark-theme .clock-time {
    color: #667eea;
}

body.dark-theme .clock-date {
    color: #a0aec0;
}

/* 스킬 블록 */
body.dark-theme .skill-block {
    background: #232d3a;
    border-color: #2d3e4f;
    color: #e2e8f0;
}

body.dark-theme .skill-block-title {
    color: #e2e8f0;
    border-color: #2d3e4f;
}

body.dark-theme .skill-block-body {
    color: #e2e8f0;
}

body.dark-theme .skill-detail-label {
    color: #cbd5e1;
}

body.dark-theme .skill-detail-value {
    color: #f1f5f9;
}

body.dark-theme .skill-uses.is-locked {
    color: #fca5a5;
}

body.dark-theme .skill-block-body.placeholder {
    color: #a0aec0;
}

body.dark-theme .skill-status {
    color: #e2e8f0;
}

body.dark-theme .skill-icon {
    background: #667eea;
}

body.dark-theme .skill-name {
    color: #e2e8f0;
}

body.dark-theme .skill-value {
    color: #667eea;
    background: #232d3a;
    border-color: #2d3e4f;
}

/* 타겟 패널 */
body.dark-theme .target-panel {
    background: #232d3a;
    border-color: #2d3e4f;
    color: #e2e8f0;
}

body.dark-theme .target-title {
    color: #e2e8f0;
    border-color: #2d3e4f;
}

body.dark-theme .target-option {
    background: #1f2f3f;
    border-color: #2d3e4f;
    color: #e2e8f0;
}

body.dark-theme .target-option:hover {
    border-color: #667eea;
    background: #232d3a;
}

body.dark-theme .target-option.selected {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* 헤더 */
body.dark-theme .app-header {
    background: #1a2a3a;
    border-color: #2d3e4f;
}

body.dark-theme .app-header h1 {
    color: #ffffff;
    font-weight: 700;
}

body.dark-theme .app-header .subtitle {
    color: #a0aec0;
}

body.dark-theme .nav-btn {
    background: #232d3a;
    border-color: #2d3e4f;
    color: #e2e8f0;
}

body.dark-theme .nav-btn:hover {
    background: #2a3a4a;
    border-color: #667eea;
}

body.dark-theme .nav-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

body.dark-theme .theme-toggle-btn {
    background: #232d3a;
    border-color: #2d3e4f;
    color: #e2e8f0;
}

body.dark-theme .theme-toggle-btn:hover {
    background: #2a3a4a;
    border-color: #667eea;
}

body.dark-theme .btn-icon {
    background: var(--dark-surface-2);
    border-color: var(--dark-border-weak);
    color: #e2e8f0;
}

body.dark-theme .btn-icon:hover {
    background: var(--dark-surface-3);
}

/* 선택된 캐릭터 및 추가 버튼 */
body.dark-theme .btn-add-character {
    background: var(--dark-surface-2);
    border-color: var(--dark-border-weak);
    color: #a0aec0;
}

body.dark-theme .btn-add-character:hover {
    border-color: #667eea;
    color: #667eea;
    background: var(--dark-surface-3);
}

body.dark-theme .btn-bulk-import {
    border-color: #60a5fa;
    background: rgba(37, 99, 235, 0.18);
    color: #93c5fd;
}

body.dark-theme .btn-bulk-import:hover {
    border-color: #93c5fd;
    background: rgba(37, 99, 235, 0.26);
    color: #bfdbfe;
}

body.dark-theme #bulk-import-team2 {
    border-color: #34d399;
    background: rgba(16, 185, 129, 0.16);
    color: #86efac;
}

body.dark-theme #bulk-import-team2:hover {
    border-color: #86efac;
    background: rgba(16, 185, 129, 0.24);
    color: #bbf7d0;
}

body.dark-theme #bulk-import-team3 {
    border-color: #fb7185;
    background: rgba(244, 63, 94, 0.16);
    color: #fda4af;
}

body.dark-theme #bulk-import-team3:hover {
    border-color: #fda4af;
    background: rgba(244, 63, 94, 0.24);
    color: #fecdd3;
}

body.dark-theme .btn-remove {
    color: #fca5a5;
}

body.dark-theme .btn-remove:hover {
    color: #fc8181;
}

body.dark-theme .selected-characters-section {
    background: var(--dark-surface-2);
    border-color: var(--dark-border-weak);
}

body.dark-theme .selected-title {
    color: #e2e8f0;
}

body.dark-theme .selected-team {
    background: var(--dark-surface-1);
    border-color: var(--dark-border-weak);
}

body.dark-theme .selected-team:nth-child(1) {
    border-color: var(--team-hero);
}

body.dark-theme .selected-team:nth-child(2) {
    border-color: var(--team-gov);
}

body.dark-theme .selected-team:nth-child(3) {
    border-color: var(--team-villain);
}

body.dark-theme #hero-selected .team-label { color: var(--team-hero); }
body.dark-theme #gov-selected .team-label { color: var(--team-gov); }
body.dark-theme #villain-selected .team-label { color: var(--team-villain); }

/* Team-specific selected pills must override main-screen.css (#id selector specificity). */
body.dark-theme #hero-selected .selected-character {
    background: var(--dark-surface-3);
    border-color: var(--team-hero);
}

body.dark-theme #gov-selected .selected-character {
    background: var(--dark-surface-3);
    border-color: var(--team-gov);
}

body.dark-theme #villain-selected .selected-character {
    background: var(--dark-surface-3);
    border-color: var(--team-villain);
}

body.dark-theme .team-label {
    color: #e2e8f0;
}

body.dark-theme .selected-character {
    background: var(--dark-surface-3);
    color: #e2e8f0;
    border-color: var(--dark-border-weak);
}
