.vocab-container {
    display: flex;
    height: calc(100vh - 73px);
    background: #f1f5f9;
}

.vocab-sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid #e2e8f0;
    overflow-y: auto;
    padding: 1.5rem;
    flex-shrink: 0;
}

.sidebar-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: 1rem;
    font-weight: 700;
}

.topic-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.topic-item {
    padding: 0.625rem 0.875rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: #475569;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topic-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.topic-item.active {
    background: rgba(99, 102, 241, 0.08);
    color: #6366f1;
}

.topic-badge {
    font-size: 0.7rem;
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 100px;
    color: #64748b;
    font-weight: 700;
}

.topic-item.active .topic-badge {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
}

.vocab-main {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.vocab-header {
    margin-bottom: 1.5rem;
}

.vocab-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.topic-progress {
    color: #64748b;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.progress-bar-wrap {
    height: 6px;
    background: #e2e8f0;
    border-radius: 100px;
    overflow: hidden;
    max-width: 400px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 100px;
    transition: width 0.5s ease;
}

.game-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.game-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: white;
    font-weight: 600;
    font-size: 0.85rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.game-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
}

.game-btn.active {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

.game-btn i {
    width: 16px;
    height: 16px;
}

.game-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state {
    text-align: center;
    color: #94a3b8;
}

.empty-state h3 {
    margin-top: 1rem;
    font-weight: 700;
    color: #64748b;
}

.empty-state p {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    max-width: 400px;
}

.flashcard-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.flashcard {
    width: 100%;
    min-height: 300px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 2.5rem 2rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    user-select: none;
}

.flashcard.flipped {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.flashcard-word {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 1rem;
}

.flashcard-def {
    font-size: 1.1rem;
    color: #475569;
    line-height: 1.6;
}

.flashcard-example {
    margin-top: 1rem;
    font-style: italic;
    color: #64748b;
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    background: #f1f5f9;
    border-radius: 0.5rem;
}

.flashcard-hint {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-top: 1rem;
}

.flashcard-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
}

.flashcard-nav button {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: white;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.flashcard-nav button:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: rgba(99,102,241,0.04);
}

.mc-container {
    width: 100%;
    max-width: 550px;
    margin: 0 auto;
}

.mc-question {
    text-align: center;
    margin-bottom: 2rem;
}

.mc-question h3 {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.mc-question p {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.5;
}

.mc-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mc-option {
    padding: 1rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    background: white;
    font-weight: 600;
    font-size: 1rem;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.mc-option:hover {
    border-color: #6366f1;
    background: rgba(99,102,241,0.04);
}

.mc-option.correct {
    border-color: #10b981;
    background: rgba(16,185,129,0.08);
    color: #059669;
}

.mc-option.wrong {
    border-color: #ef4444;
    background: rgba(239,68,68,0.08);
    color: #dc2626;
}

.mc-option.disabled {
    pointer-events: none;
    opacity: 0.7;
}

.type-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.type-def {
    font-size: 1.2rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
}

.type-input-wrap {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.type-input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    font-family: inherit;
    font-weight: 600;
}

.type-input:focus {
    outline: none;
    border-color: #6366f1;
}

.type-submit {
    padding: 0.875rem 1.5rem;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 700;
    cursor: pointer;
}

.type-feedback {
    font-weight: 700;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.type-feedback.correct {
    color: #10b981;
}

.type-feedback.wrong {
    color: #ef4444;
}

.speed-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.speed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
}

.speed-score {
    font-weight: 800;
    font-size: 1.25rem;
    color: #0f172a;
}

.speed-timer {
    font-weight: 800;
    font-size: 1.25rem;
    font-variant-numeric: tabular-nums;
    color: #6366f1;
}

.speed-timer.warning {
    color: #ef4444;
    animation: pulse 0.5s infinite;
}

.speed-word {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
}

.speed-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.speed-option {
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    background: white;
    font-weight: 600;
    font-size: 0.95rem;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s;
}

.speed-option:hover {
    border-color: #6366f1;
}

.speed-option.correct {
    border-color: #10b981;
    background: rgba(16,185,129,0.08);
}

.speed-option.wrong {
    border-color: #ef4444;
    background: rgba(239,68,68,0.08);
}

.game-result {
    text-align: center;
    padding: 2rem;
}

.game-result h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.game-result .score {
    font-size: 3rem;
    font-weight: 900;
    color: #6366f1;
}

.game-result .detail {
    color: #64748b;
    margin-top: 0.5rem;
}

.game-result .btn-restart {
    margin-top: 1.5rem;
    padding: 0.75rem 2rem;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 700;
    cursor: pointer;
}

.vocab-dashboard {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.dash-stat {
    text-align: center;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    transition: all 0.2s;
}

.dash-stat:hover {
    background: rgba(99,102,241,0.04);
}

.dash-num {
    display: block;
    font-size: 1.5rem;
    font-weight: 900;
    color: #6366f1;
    line-height: 1.2;
}

.dash-label {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dashboard-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

.dash-bar-track {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 100px;
    overflow: hidden;
}

.dash-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 100px;
    transition: width 0.5s ease;
}

.dash-bar-fill.zero { background: #e2e8f0; }

#dashPercent {
    font-weight: 800;
    color: #6366f1;
    min-width: 40px;
    text-align: right;
}

@media (max-width: 640px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .vocab-container {
        flex-direction: column;
        height: auto;
    }
    .vocab-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        max-height: 200px;
    }
    .vocab-main {
        padding: 1.25rem;
    }
    .speed-options {
        grid-template-columns: 1fr;
    }
}
