/* Radicals Mode Modal */
.radicals-modal {
    max-width: 440px;
    width: 90%;
}

.modal-hint {
    color: #71717a;
    font-size: 14px;
    margin-bottom: 20px;
}

.mode-toggles {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.mode-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.mode-toggle input[type="checkbox"] {
    display: none;
}

.toggle-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    padding: 12px 16px;
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 12px;
    transition: all 0.15s ease;
}

.mode-toggle input:checked + .toggle-content {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
}

.toggle-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
}

.toggle-text {
    flex: 1;
}

.toggle-title {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #fafafa;
}

.toggle-desc {
    display: block;
    font-size: 12px;
    color: #71717a;
}

.modal-options {
    padding: 16px;
    background: #0f0f11;
    border-radius: 12px;
    margin-bottom: 24px;
}

.switch-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.switch-label {
    color: #a1a1aa;
    font-size: 14px;
}

.switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #27272a;
    border-radius: 24px;
    transition: all 0.2s ease;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #71717a;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.switch input:checked + .switch-slider {
    background: #22c55e;
}

.switch input:checked + .switch-slider:before {
    transform: translateX(20px);
    background: #fafafa;
}

.start-practice-btn {
    width: 100%;
    padding: 14px 24px;
    background: #fafafa;
    color: #09090b;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.start-practice-btn:hover:not(:disabled) {
    background: #e4e4e7;
    transform: translateY(-1px);
}

.start-practice-btn:active:not(:disabled) {
    transform: translateY(0);
}

.start-practice-btn:disabled {
    background: #27272a;
    color: #52525b;
    cursor: not-allowed;
}

/* Radicals Page */
.radicals-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.radicals-mode-select {
    text-align: center;
}

.radicals-mode-select h2 {
    font-size: 28px;
    font-weight: 600;
    color: #fafafa;
    margin: 24px 0 8px;
}

.radicals-subtitle {
    color: #71717a;
    font-size: 14px;
    margin-bottom: 32px;
}

/* Mode Cards */
.mode-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.mode-card {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 12px;
    padding: 20px 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}

.mode-card:hover {
    background: #1f1f23;
    border-color: #3f3f46;
    transform: translateY(-2px);
}

.mode-card:active {
    transform: translateY(0);
}

.mode-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.mode-title {
    font-size: 14px;
    font-weight: 600;
    color: #fafafa;
    margin-bottom: 6px;
}

.mode-desc {
    font-size: 12px;
    color: #71717a;
    line-height: 1.4;
}

/* Radicals Options */
.radicals-options {
    margin-bottom: 24px;
}

.toggle-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    color: #a1a1aa;
    font-size: 14px;
}

.toggle-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #22c55e;
    cursor: pointer;
}

/* Stats Summary */
.radicals-stats-summary {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 16px;
    background: #0f0f11;
    border-radius: 12px;
    border: 1px solid #27272a;
}

.stat-item {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 24px;
    font-weight: 600;
    color: #fafafa;
    font-variant-numeric: tabular-nums;
}

.stat-text {
    font-size: 12px;
    color: #71717a;
}

.radicals-mode-indicator {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    color: #71717a;
}

/* Radicals Card - uses .flashcard base styles */
.radicals-card {
    min-height: 180px;
    display: grid;
    grid-template-rows: 1fr auto 1fr;
    align-items: center;
}

.radicals-card-center {
    grid-row: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.radicals-prompt {
    font-size: 56px;
    color: #fafafa;
    line-height: 1.2;
    text-align: center;
}

.radicals-prompt.audio-mode {
    font-size: 18px;
    color: #71717a;
}

.radicals-prompt.meaning-mode {
    font-size: 24px;
    text-transform: capitalize;
}

.radicals-prompt.revealed {
    color: #22c55e;
}

.radicals-card .speaker-btn {
    margin-bottom: 8px;
}

.radicals-card .speaker-btn.hidden {
    display: none;
}

.radicals-pinyin {
    grid-row: 3;
    align-self: start;
    padding-top: 12px;
    font-size: 14px;
    color: #71717a;
    text-align: center;
}

/* Radicals Choices */
.radicals-choices {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.radical-choice-btn {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 12px;
    padding: 16px 12px;
    min-height: 70px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.radical-choice-btn:hover:not(:disabled) {
    background: #1f1f23;
    border-color: #3f3f46;
}

.radical-choice-btn:disabled {
    cursor: default;
}

.radical-choice-btn.correct {
    background: rgba(34, 197, 94, 0.15);
    border-color: #22c55e;
}

.radical-choice-btn.incorrect {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
}

.choice-main {
    font-size: 20px;
    color: #fafafa;
    text-transform: capitalize;
}

.radical-choice-btn.correct .choice-main {
    color: #22c55e;
}

.radical-choice-btn.incorrect .choice-main {
    color: #ef4444;
}

.choice-hint {
    font-size: 11px;
    color: #71717a;
}

.radical-choice-btn.correct .choice-hint,
.radical-choice-btn.incorrect .choice-hint {
    color: #a1a1aa;
}

/* Radicals struggling indicator */
#radicals-struggling-indicator {
    color: #fbbf24;
    font-size: 13px;
    margin-top: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#radicals-struggling-indicator.visible {
    opacity: 1;
}

/* Mobile Responsive for Radicals */
@media (max-width: 768px) {
    .radicals-container {
        padding: 16px;
    }

    .mode-cards {
        grid-template-columns: 1fr;
    }

    .mode-card {
        padding: 16px;
    }

    .mode-icon {
        font-size: 28px;
    }

    .radicals-prompt.radical-mode {
        font-size: 56px;
    }

    .radicals-choices {
        grid-template-columns: 1fr 1fr;
    }

    .choice-main {
        font-size: 24px;
    }

    .radicals-stats-summary {
        gap: 20px;
    }

    .stat-num {
        font-size: 20px;
    }
}
