/* Premium Brand Title & Header Styles */
#setup-container header {
    position: relative;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#setup-container header h1 {
    font-family: 'Inter', sans-serif !important;
    font-size: 2.5rem;
    font-weight: 850;
    letter-spacing: -0.04em;
    line-height: 1.15;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, #0f172a 20%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme="dark"] #setup-container header h1 {
    background: linear-gradient(135deg, #f8fafc 30%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#setup-container header p {
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    color: #475569;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

html[data-theme="dark"] #setup-container header p {
    color: #cbd5e1;
}

#setup-container header p::after {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    margin-left: 2px;
}

#daily-streak-badge.streak-enter {
    animation: streakSlideIn 0.4s ease-out;
}

/* Celebration streak badge — unified amber F59E0B */
#daily-streak-badge {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid #F59E0B;
    color: #F59E0B;
    font-weight: 600;
}
html[data-theme="light"] #daily-streak-badge {
    background: rgba(245, 158, 11, 0.08);
    border-color: #F59E0B;
    color: #F59E0B;
}
html[data-theme="dark"] #daily-streak-badge {
    background: rgba(245, 158, 11, 0.1);
    border-color: #F59E0B;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.15);
    color: #F59E0B;
}

.filter-controls-row {
    padding: 0 12px 12px;
    justify-content: space-between;
    gap: 16px;
}
.type-filter-container {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.type-filter-container::-webkit-scrollbar {
    display: none;
}

.type-filter-btn {
    flex: 1;
    flex-shrink: 0;
    min-width: max-content;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1.5px solid transparent;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    color: var(--text-main);
    opacity: 0.75;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    line-height: 1.4;
    user-select: none;
}
.type-filter-btn:hover {
    opacity: 0.9;
    background: rgba(37, 99, 235, 0.05);
}
.type-filter-btn:active {
    transform: scale(0.95);
}
.type-filter-btn.active {
    opacity: 1;
    background: var(--accent) !important;
    color: #fff !important;
    border-color: var(--accent);
}

/* NEW badge — blue pill */
.new-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.4;
    background: rgba(59, 130, 246, 0.2);
    color: #60A5FA;
    margin-left: 8px;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}
html[data-theme="dark"] .new-badge {
    background: rgba(59, 130, 246, 0.2);
    color: #60A5FA;
}

/* Focus-visible ring for interactive elements */
[type="text"][id="catalog-search"]:focus-visible,
#share-btn:focus-visible,
.list-box:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Force Inter on all form elements */
input, button, textarea {
    font-family: 'Inter', sans-serif !important;
}

/* Search input polish */
#catalog-search {
    font-size: 14px;
    padding-left: 20px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#catalog-search:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Focus-within glow on search parent */
div:has(> #catalog-search:focus) {
    border-color: var(--accent) !important;
}

/* List container — subtle border + scrollbar breathing room */
.list-container {
    border: 1px solid #334155;
    border-radius: 8px;
    padding-right: 4px;
    overflow: hidden;
}

/* Custom list-box dropdown */
.list-box {
    width: 100%;
    border: none;
    font-family: 'Inter', sans-serif !important;
    background-color: var(--card-bg);
    font-size: 14px;
    padding: 8px;
    outline: none;
    cursor: pointer;
    max-height: 320px;
    overflow-y: auto;
    scrollbar-gutter: stable;
}
.list-box::-webkit-scrollbar { width: 6px; }
.list-box::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
.list-box::-webkit-scrollbar-track { background: transparent; }

html[data-theme="dark"] .list-box {
    scrollbar-color: #475569 transparent;
}
html[data-theme="dark"] .list-box::-webkit-scrollbar-thumb {
    background: #475569;
}

/* REFINED GRID & ELEMENT STRUCTURAL ASSIGNMENT FOR ROW UNIFICATION */
.list-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: 6px;
    color: #64748B;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}
html[data-theme="dark"] .list-item {
    color: #94A3B8;
}
.list-item:last-child {
    margin-bottom: 0;
}
.list-item:hover {
    background-color: rgba(59, 130, 246, 0.06);
    color: var(--text-main);
}
html[data-theme="dark"] .list-item:hover {
    color: #FFFFFF;
}
.list-item.selected {
    background: #1E293B;
    color: #FFFFFF;
    font-weight: 700;
    border-left: 3px solid #3B82F6;
    border-radius: 0 6px 6px 0;
}
html[data-theme="light"] .list-item.selected {
    background: #F1F5F9;
    color: #1E293B;
    border-left: 3px solid #2563EB;
}

/* Overrides inner inline elements from forcing accidental line breaks */
.list-item > * {
    display: inline-block !important;
    margin: 0 !important;
    white-space: nowrap !important;
}

.list-item-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.6;
    display: inline-block !important;
}
.list-item.selected .list-item-icon {
    opacity: 1;
}

/* Explicit scaling assignment for dynamically targeted title nodes */
.list-item .list-item-text, 
.list-item span:not(.new-badge):not(.list-item-icon),
.list-item div:not(.new-badge):not(.list-item-icon) {
    flex: 1 !important;
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    text-align: left !important;
}

.list-empty {
    padding: 24px 16px;
    text-align: center;
    color: #64748B;
    font-size: 13px;
    font-weight: 500;
}

.option-btn {
    position: relative;
    padding-right: 3.5rem;
    padding-top: 14px;
    padding-bottom: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.option-btn:hover:not(:disabled) {
    transform: translateX(4px);
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.05);
}
.option-btn:active:not(:disabled) {
    transform: scale(0.99) translateX(4px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.option-btn.correct::after,
.option-btn.wrong::after {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
}
.option-btn.correct::after { content: '✓'; color: #166534; animation: fadeSlideIn 0.3s ease-out 0.1s both; }
.option-btn.wrong::after { content: '✗'; color: #dc2626; animation: fadeSlideIn 0.3s ease-out 0.1s both; }

/* Physical Keyboard Shortcut Keycap Styling (.key-hint) */
.key-hint {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: monospace !important;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 5px;
    letter-spacing: 0.5px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #cbd5e1;
    box-shadow: 0 1.5px 0 #cbd5e1;
    background: #f8fafc;
    color: #64748b;
    line-height: 1;
    box-sizing: border-box;
}
html[data-theme="dark"] .key-hint {
    border-color: #334155;
    box-shadow: 0 1.5px 0 #334155;
    background: #1e293b;
    color: #94a3b8;
}
.option-btn:disabled .key-hint { display: none; }

.correct { background: #dcfce7 !important; border-color: #22c55e !important; color: #166534 !important; }
.wrong { background: #fee2e2 !important; border-color: #ef4444 !important; color: #991b1b !important; }

/* Option label badges and key-hints inherit state color */
.option-btn.correct .key-hint {
  background: rgba(22, 101, 52, 0.12) !important;
  color: #166534 !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
.option-btn.wrong .key-hint {
  background: rgba(153, 27, 27, 0.12) !important;
  color: #991b1b !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Restored Robust Achievement Card Template */
#achievement-card-template {
    position: fixed;
    left: -9999px;
    top: -9999px;
    width: 800px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 60px;
    border-radius: 40px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

#ach-cert-name {
    font-family: 'Great Vibes', cursive;
    font-size: 82px;
    color: #3b82f6;
    margin: 10px 0;
    display: block;
}

.ach-badge { font-size: 80px; margin-bottom: 10px; }
.ach-title { font-size: 14px; text-transform: uppercase; letter-spacing: 6px; color: #60a5fa; font-weight: 800; margin-bottom: 5px; }
.ach-course-name { font-size: 42px; font-weight: 900; color: #f8fafc; line-height: 1.1; margin: 10px 0; text-transform: uppercase; }
.ach-module-info { font-size: 18px; color: #94a3b8; font-weight: 700; margin-bottom: 40px; }

.ach-stats-grid {
    display: flex;
    justify-content: space-around;
    background: rgba(255,255,255,0.05);
    padding: 30px;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.1);
}
.ach-stat-box { display: flex; flex-direction: column; }
.ach-stat-val { font-size: 32px; font-weight: 900; color: #ffffff; }
.ach-stat-lab { font-size: 10px; text-transform: uppercase; letter-spacing: 2px; opacity: 0.5; margin-top: 5px; }

.ach-footer { margin-top: 40px; font-size: 14px; opacity: 0.4; }

/* Question Card Styles (used by dynamically created share elements) */
.qc-badge { font-size: 60px; margin-bottom: 8px; display: inline-block; }
.qc-module { font-size: 12px; text-transform: uppercase; letter-spacing: 4px; color: #60a5fa; font-weight: 800; margin-bottom: 24px; }
.qc-title { font-size: 18px; font-weight: 600; margin-bottom: 20px; color: #64748b; }
.qc-description { font-size: 26px; font-weight: 700; line-height: 1.4; margin-bottom: 30px; color: #f8fafc; }
.qc-options { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.qc-option {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 14px 20px;
    background: rgba(255,255,255,0.04);
    border: 1.5px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    font-size: 18px;
    font-weight: 500;
    color: #e2e8f0;
    text-align: left;
    line-height: 1.5;
}
.qc-opt-letter {
    flex-shrink: 0;
    font-size: 18px;
    font-weight: 800;
    color: #60a5fa;
    min-width: 28px;
}
.qc-footer { margin-top: 40px; font-size: 14px; opacity: 0.4; }

/* Theme Toggle Button */
#theme-toggle {
    background: var(--card-bg);
    border: 1.5px solid rgba(148, 163, 184, 0.2);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}
#theme-toggle:hover {
    border-color: var(--accent);
}
#theme-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Preview Screen */
#progress-fill { transition: width 0.3s ease; }
#preview-container { transition: all 0.3s ease; }
.preview-option {
    position: relative;
    padding-right: 3.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}
.preview-option:hover {
    transform: translateX(4px);
    border-color: var(--accent);
}

/* Chapter Grid */
.chapter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1.5px solid rgba(148, 163, 184, 0.2);
    background: var(--card-bg);
    color: var(--text-main);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}
.chapter-btn:hover {
    border-color: var(--accent);
    background: rgba(37, 99, 235, 0.06);
    transform: translateY(-2px);
}
.chapter-btn:active {
    transform: scale(0.95);
}
.chapter-btn-active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}
.chapter-btn-active:hover {
    background: var(--accent);
    border-color: var(--accent);
}
.chapter-btn-completed {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}
.chapter-btn-completed:hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}
.chapter-btn-completed.chapter-btn-active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

/* Mode badge positioning */
#mode-badge {
    display: inline;
    white-space: nowrap;
}

/* True/False buttons */
.tf-btn {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}
.tf-btn:hover:not(:disabled) {
    transform: translateX(4px);
}
.tf-btn:active:not(:disabled) {
    transform: scale(0.99) translateX(4px);
}
.tf-btn.correct {
    background: #dcfce7 !important;
    border-color: #22c55e !important;
    color: #166534 !important;
}
.tf-btn.wrong {
    background: #fee2e2 !important;
    border-color: #ef4444 !important;
    color: #991b1b !important;
}
.tf-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Fill-blank input */
#fillblank-input {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#fillblank-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
#fillblank-input.correct {
    border-color: #22c55e !important;
    background: #f0fdf4 !important;
}
#fillblank-input.wrong {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
}
html[data-theme="dark"] #fillblank-input.correct {
    background: rgba(34, 197, 94, 0.1) !important;
}
html[data-theme="dark"] #fillblank-input.wrong {
    background: rgba(239, 68, 68, 0.1) !important;
}

/* Hide Completed icon button */
.hide-completed-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1.5px solid transparent;
    background: transparent;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.75;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    flex-shrink: 0;
}
.hide-completed-btn:hover {
    opacity: 0.9;
    background: rgba(37, 99, 235, 0.05);
}
.hide-completed-btn:active {
    transform: scale(0.95);
}
.hide-completed-btn.active {
    opacity: 1;
    color: #3B82F6;
}
.hide-completed-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.hide-completed-text {
    white-space: nowrap;
}

/* AI Persona Buttons */
.ai-persona-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 12px;
    border: 1.5px solid rgba(148, 163, 184, 0.2);
    background: transparent;
    color: var(--text-main);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    line-height: 1.3;
    white-space: nowrap;
}
.ai-persona-btn:hover {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.06);
}
.ai-persona-btn:active {
    transform: scale(0.96);
}
.ai-persona-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}
html[data-theme="dark"] .ai-persona-btn {
    border-color: rgba(148, 163, 184, 0.15);
}
html[data-theme="dark"] .ai-persona-btn:hover {
    border-color: #818cf8;
    background: rgba(129, 140, 248, 0.1);
}

/* AI Chat Bubbles */
#ai-response {
    max-height: 420px;
    overflow-y: auto;
}
.chat-bubble {
    padding: 12px 16px;
    border-radius: 14px;
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.6;
    word-wrap: break-word;
}
.chat-bubble:last-child {
    margin-bottom: 0;
}
.chat-bubble.user {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    color: var(--text-main);
    margin-left: 20px;
    border-bottom-right-radius: 4px;
}
.chat-bubble.assistant {
    background: transparent;
    color: var(--text-main);
    border: 1px solid rgba(148, 163, 184, 0.15);
    margin-right: 20px;
    border-bottom-left-radius: 4px;
}
.chat-bubble.error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
}
html[data-theme="dark"] .chat-bubble.user {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.25);
}
html[data-theme="dark"] .chat-bubble.assistant {
    border-color: rgba(148, 163, 184, 0.12);
}
html[data-theme="dark"] .chat-bubble.error {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
}
.chat-bubble pre {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 12px;
    overflow-x: auto;
    margin: 8px 0;
    font-size: 12px;
    line-height: 1.5;
}
.chat-bubble code {
    background: rgba(0, 0, 0, 0.06);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', Consolas, monospace;
}
.chat-bubble pre code {
    background: none;
    padding: 0;
    border-radius: 0;
}
html[data-theme="dark"] .chat-bubble pre {
    background: rgba(255, 255, 255, 0.06);
}
html[data-theme="dark"] .chat-bubble code {
    background: rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] .chat-bubble pre code {
    background: none;
}

/* ---------- Flashcard Flip Card ---------- */
.flashcard-container {
    perspective: 1000px;
    cursor: pointer;
    user-select: none;
}
.flashcard-inner {
    position: relative;
    width: 100%;
    min-height: 220px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}
.flashcard-container.flipped .flashcard-inner {
    transform: rotateY(180deg);
}
.flashcard-front,
.flashcard-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 1rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    min-height: 220px;
}
html[data-theme="dark"] .flashcard-front,
html[data-theme="dark"] .flashcard-back {
    border-color: #334155;
    background: #1e293b;
}
.flashcard-back {
    transform: rotateY(180deg);
}
.flashcard-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #94a3b8;
    margin-bottom: 0.75rem;
}
.flashcard-concept {
    font-size: 1.5rem;
    font-weight: 800;
    color: #2563eb;
    line-height: 1.3;
}
html[data-theme="dark"] .flashcard-concept {
    color: #60a5fa;
}
.flashcard-hint {
    margin-top: 1rem;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    animation: pulse 2s ease-in-out infinite;
}
.flashcard-content {
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}
html[data-theme="dark"] .flashcard-content {
    color: #e2e8f0;
}
.flashcard-desc {
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    line-height: 1.6;
    font-style: italic;
}
html[data-theme="dark"] .flashcard-desc {
    color: #94a3b8;
}
.flashcard-container.flipped + #flashcard-buttons {
    opacity: 1 !important;
    transform: translateY(0) !important;
}
/* When flipped via JS class on parent, target sibling */
#flashcard-buttons.visible {
    opacity: 1;
    transform: translateY(0);
}
/* Pulse keyframe */
@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ---------- 50/50 Lifeline ---------- */
.lifeline-btn {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1.5px solid #818cf8;
    background: rgba(129, 140, 248, 0.08);
    color: #6366f1;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
}
.lifeline-btn:hover {
    background: rgba(129, 140, 248, 0.18);
    transform: translateY(-1px);
}
.lifeline-btn.used {
    opacity: 0.35;
    pointer-events: none;
    border-color: #94a3b8;
    color: #94a3b8;
    background: transparent;
}
html[data-theme="dark"] .lifeline-btn {
    color: #a5b4fc;
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.12);
}
html[data-theme="dark"] .lifeline-btn:hover {
    background: rgba(99, 102, 241, 0.25);
}
html[data-theme="dark"] .lifeline-btn.used {
    opacity: 0.3;
    border-color: #475569;
    color: #64748b;
    background: transparent;
}

/* ---------- Dimmed option (50/50 elimination) ---------- */
.option-dimmed {
    opacity: 0.3;
    pointer-events: none;
    text-decoration: line-through;
}

/* ---------- Confidence bar ---------- */
.conf-btn {
    flex: 1;
    padding: 10px 8px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1.2;
}
.conf-btn:hover {
    border-color: #818cf8;
    background: rgba(129, 140, 248, 0.08);
    color: #4338ca;
}
.conf-btn.selected {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.12);
    color: #4338ca;
    box-shadow: 0 0 0 1px #6366f1;
}
html[data-theme="dark"] .conf-btn {
    border-color: #334155;
    background: #1e293b;
    color: #cbd5e1;
}
html[data-theme="dark"] .conf-btn:hover {
    border-color: #818cf8;
    background: rgba(129, 140, 248, 0.12);
    color: #a5b4fc;
}
html[data-theme="dark"] .conf-btn.selected {
    border-color: #818cf8;
    background: rgba(129, 140, 248, 0.18);
    color: #a5b4fc;
}
