/* VocabLab Plugin Styles */
.vocablab-app {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 760px;
    margin: 0 auto;
    padding: 0 0 40px;
    color: #1a1a1a;
    line-height: 1.5;
}

/* Header */
.vl-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 24px;
}
.vl-logo {
    font-size: 22px;
    font-weight: 700;
    color: #534AB7;
    letter-spacing: -0.5px;
}
.vl-header-right { display: flex; align-items: center; gap: 16px; }
.vl-score-wrap { display: flex; align-items: center; gap: 6px; background: #f4f4f8; border-radius: 20px; padding: 6px 14px; }
.vl-score-label { font-size: 12px; color: #888; }
.vl-score-val { font-size: 16px; font-weight: 700; color: #534AB7; }

/* Day selector */
.vl-day-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.vl-empty { color: #888; font-size: 15px; padding: 20px 0; }
.vl-day-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 16px;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
}
.vl-day-btn:hover { border-color: #534AB7; background: #f8f7ff; }
.vl-day-btn.completed { border-color: #4CAF50; background: #f0fff4; }
.vl-day-num { font-size: 13px; font-weight: 700; color: #534AB7; }
.vl-day-lbl { font-size: 12px; color: #555; line-height: 1.3; }
.vl-day-prog { font-size: 11px; color: #888; margin-top: 4px; font-weight: 600; }

/* Breadcrumb */
.vl-breadcrumb { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.vl-back-btn {
    background: none; border: none; color: #534AB7; cursor: pointer;
    font-size: 14px; font-weight: 500; padding: 4px 0;
}
.vl-back-btn:hover { text-decoration: underline; }
.vl-current-day { font-size: 15px; font-weight: 600; color: #333; }

/* Tabs */
.vl-tabs {
    display: flex;
    gap: 4px;
    background: #f4f4f4;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 24px;
}
.vl-tab {
    flex: 1;
    padding: 9px 4px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    color: #666;
    transition: all 0.15s;
    font-weight: 500;
}
.vl-tab.active { background: #fff; color: #534AB7; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.vl-tab:hover:not(.active) { color: #333; }

/* Screens */
.vl-screen { display: none; }
.vl-screen.active { display: block; }

/* ============ FLASHCARD ============ */
.vl-fc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.vl-fc-counter { font-size: 13px; color: #888; }
.vl-fc-dots { display: flex; gap: 5px; flex-wrap: wrap; }
.vl-fc-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #e0e0e0; transition: background 0.3s;
}
.vl-fc-dot.seen { background: #AFA9EC; }
.vl-fc-dot.easy { background: #4CAF50; }
.vl-fc-dot.ok   { background: #FF9800; }
.vl-fc-dot.hard { background: #f44336; }

.vl-card {
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 16px;
    min-height: 240px;
    padding: 28px 24px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.1s;
    position: relative;
    user-select: none;
}
.vl-card:hover { border-color: #AFA9EC; }
.vl-card:active { transform: scale(0.99); }
.vl-card-front, .vl-card-back {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
}
.vl-card-pos {
    font-size: 11px; font-weight: 600; color: #534AB7;
    background: #EEEDFE; border-radius: 20px; padding: 3px 12px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.vl-card-word { font-size: 36px; font-weight: 700; color: #1a1a1a; }
.vl-card-phonetic { font-size: 15px; color: #999; }
.vl-card-tap { font-size: 13px; color: #bbb; margin-top: 20px; }
.vl-card-def { font-size: 16px; color: #333; line-height: 1.6; margin-top: 6px; }
.vl-card-ex { font-size: 14px; color: #777; font-style: italic; }
.vl-syn-ant { font-size: 13px; color: #555; margin-top: 10px; line-height: 1.8; text-align: left; width: 100%; }
.vl-syn-lbl { font-weight: 600; color: #4CAF50; }
.vl-ant-lbl { font-weight: 600; color: #f44336; }

.vl-rating-row { display: flex; gap: 10px; margin: 16px 0; }
.vl-rate-btn {
    flex: 1; padding: 12px 0; border-radius: 10px; font-size: 14px;
    font-weight: 600; border: 1.5px solid #e0e0e0; cursor: pointer;
    transition: all 0.15s; background: #fff;
}
.vl-rate-hard { border-color: #ffcdd2; color: #c62828; }
.vl-rate-hard:hover { background: #ffebee; }
.vl-rate-ok   { border-color: #ffe0b2; color: #e65100; }
.vl-rate-ok:hover { background: #fff3e0; }
.vl-rate-easy { border-color: #c8e6c9; color: #2e7d32; }
.vl-rate-easy:hover { background: #e8f5e9; }

.vl-fc-nav { display: flex; justify-content: space-between; margin-top: 12px; }
.vl-nav-btn {
    padding: 8px 16px; border: 1px solid #ddd; border-radius: 8px;
    background: #fff; cursor: pointer; font-size: 13px; color: #555;
    transition: all 0.15s;
}
.vl-nav-btn:hover { background: #f4f4f4; }
.vl-nav-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.vl-fc-done {
    text-align: center; padding: 40px 20px;
    background: #f8f7ff; border-radius: 16px; border: 1.5px dashed #AFA9EC;
}
.vl-done-icon { font-size: 48px; margin-bottom: 12px; }
.vl-done-title { font-size: 22px; font-weight: 700; color: #534AB7; margin-bottom: 6px; }
.vl-done-sub { font-size: 15px; color: #888; margin-bottom: 20px; }

/* ============ QUIZ ============ */
.vl-quiz-types { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.vl-qtype {
    padding: 8px 16px; border-radius: 20px; font-size: 13px; font-weight: 500;
    border: 1.5px solid #e0e0e0; background: #fff; cursor: pointer; color: #666;
    transition: all 0.15s;
}
.vl-qtype.active { background: #EEEDFE; border-color: #AFA9EC; color: #534AB7; }
.vl-qtype:hover:not(.active) { border-color: #bbb; }

.vl-quiz-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; font-size: 13px; color: #888; }
.vl-qprogbar { flex: 1; height: 6px; background: #eee; border-radius: 99px; overflow: hidden; }
.vl-qprogfill { height: 6px; background: #534AB7; border-radius: 99px; transition: width 0.4s; }

.vl-quiz-sentence {
    background: #f8f7ff; border-radius: 12px; padding: 16px 20px;
    font-size: 16px; line-height: 1.7; color: #333; margin-bottom: 16px;
    border-left: 4px solid #534AB7;
}
.vl-blank { display: inline-block; min-width: 90px; border-bottom: 2px solid #534AB7; font-weight: 700; color: #534AB7; }
.vl-quiz-instruction { font-size: 14px; color: #888; margin-bottom: 12px; }

.vl-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.vl-opt {
    padding: 14px 16px; border: 1.5px solid #e0e0e0; border-radius: 10px;
    background: #fff; cursor: pointer; font-size: 14px; color: #333;
    text-align: left; transition: all 0.15s; line-height: 1.4;
}
.vl-opt:hover:not(:disabled) { border-color: #534AB7; background: #f8f7ff; }
.vl-opt.correct { background: #e8f5e9; border-color: #4CAF50; color: #2e7d32; font-weight: 600; }
.vl-opt.wrong   { background: #ffebee; border-color: #f44336; color: #c62828; }
.vl-opt:disabled { cursor: not-allowed; }

.vl-quiz-feedback {
    border-radius: 10px; padding: 14px 16px; font-size: 14px;
    line-height: 1.6; margin-bottom: 14px;
}
.vl-quiz-feedback.correct { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.vl-quiz-feedback.wrong   { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }

.vl-fill-hint { font-size: 12px; color: #aaa; margin-bottom: 8px; }
.vl-fill-row { display: flex; gap: 8px; margin-bottom: 12px; }
.vl-fill-row input {
    flex: 1; padding: 11px 14px; border: 1.5px solid #e0e0e0; border-radius: 10px;
    font-size: 15px; color: #333; outline: none; transition: border 0.2s;
    background: #fff;
}
.vl-fill-row input:focus { border-color: #534AB7; }
.vl-check-btn {
    padding: 11px 20px; border: 1.5px solid #534AB7; border-radius: 10px;
    background: #534AB7; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all 0.15s;
}
.vl-check-btn:hover { background: #3F38A0; }

/* MATCH */
.vl-match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.vl-match-col { display: flex; flex-direction: column; gap: 8px; }
.vl-match-item {
    padding: 12px 14px; border: 1.5px solid #e0e0e0; border-radius: 10px;
    background: #fff; cursor: pointer; font-size: 13px; color: #333;
    transition: all 0.15s; line-height: 1.4; text-align: center;
}
.vl-match-item:hover { border-color: #AFA9EC; background: #f8f7ff; }
.vl-match-item.selected { border-color: #534AB7; background: #EEEDFE; color: #534AB7; }
.vl-match-item.correct  { border-color: #4CAF50; background: #e8f5e9; color: #2e7d32; cursor: default; }
.vl-match-item.wrong    { border-color: #f44336; background: #ffebee; color: #c62828; }

/* Quiz result */
.vl-quiz-result { font-size: 24px; font-weight: 700; color: #534AB7; margin: 12px 0 20px; }

/* ============ CONTEXT ============ */
.vl-ctx-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; font-size: 13px; color: #888; }
.vl-ctx-card {
    background: #fff; border: 1.5px solid #e0e0e0; border-radius: 16px;
    padding: 24px; margin-bottom: 16px;
}
.vl-ctx-word { font-size: 28px; font-weight: 700; color: #1a1a1a; margin-bottom: 4px; }
.vl-ctx-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.vl-ctx-phon { font-size: 14px; color: #999; }
.vl-ctx-pos {
    font-size: 11px; font-weight: 700; color: #534AB7;
    background: #EEEDFE; border-radius: 20px; padding: 2px 10px;
    text-transform: uppercase;
}
.vl-ctx-def { font-size: 16px; color: #333; line-height: 1.6; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #f0f0f0; }
.vl-ctx-divider { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #bbb; margin-bottom: 12px; }
.vl-ctx-story {
    font-size: 15px; line-height: 1.8; color: #444;
    background: #f8f7ff; border-radius: 10px; padding: 16px;
    margin-bottom: 20px;
}
.vl-ctx-story .highlight { color: #534AB7; font-weight: 700; border-bottom: 2px solid #AFA9EC; }
.vl-ctx-syn-ant { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vl-ctx-col-title { font-size: 12px; font-weight: 700; color: #888; text-transform: uppercase; margin-bottom: 8px; }
.vl-ctx-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.vl-ctx-tag { font-size: 12px; padding: 4px 10px; border-radius: 20px; background: #f0f0f0; color: #555; }
.vl-ctx-tag.syn { background: #e8f5e9; color: #2e7d32; }
.vl-ctx-tag.ant { background: #ffebee; color: #c62828; }
.vl-ctx-dots { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.vl-ctx-dot { width: 8px; height: 8px; border-radius: 50%; background: #e0e0e0; cursor: pointer; transition: background 0.2s; }
.vl-ctx-dot.active { background: #534AB7; }

/* ============ PROGRESS ============ */
.vl-prog-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.vl-prog-stat { background: #f8f7ff; border-radius: 12px; padding: 16px; text-align: center; }
.vl-prog-stat-num { font-size: 28px; font-weight: 700; color: #534AB7; }
.vl-prog-stat-lbl { font-size: 12px; color: #888; margin-top: 2px; }
.vl-prog-title { font-size: 14px; font-weight: 600; color: #888; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.vl-prog-list { display: flex; flex-direction: column; gap: 8px; }
.vl-prog-row {
    display: flex; align-items: center; justify-content: space-between;
    background: #fff; border: 1px solid #eee; border-radius: 10px; padding: 12px 16px;
}
.vl-prog-word-info { display: flex; flex-direction: column; gap: 2px; }
.vl-prog-word { font-size: 15px; font-weight: 600; color: #333; }
.vl-prog-def  { font-size: 12px; color: #999; }
.vl-prog-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.vl-prog-bar-wrap { width: 80px; height: 5px; background: #eee; border-radius: 99px; overflow: hidden; }
.vl-prog-bar-fill { height: 5px; border-radius: 99px; transition: width 0.4s; }
.vl-prog-badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.badge-unseen  { background: #f0f0f0; color: #999; }
.badge-hard    { background: #ffebee; color: #c62828; }
.badge-ok      { background: #fff3e0; color: #e65100; }
.badge-easy    { background: #e8f5e9; color: #2e7d32; }

/* Buttons */
.vl-primary-btn {
    display: inline-block; padding: 12px 28px; background: #534AB7; color: #fff;
    border: none; border-radius: 10px; font-size: 15px; font-weight: 600;
    cursor: pointer; transition: background 0.15s; margin-top: 10px;
}
.vl-primary-btn:hover { background: #3F38A0; }
.vl-secondary-btn {
    display: inline-block; padding: 12px 24px; background: #fff; color: #534AB7;
    border: 1.5px solid #534AB7; border-radius: 10px; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all 0.15s; margin-top: 10px; margin-left: 10px;
}
.vl-secondary-btn:hover { background: #f8f7ff; }

/* Responsive */
@media (max-width: 480px) {
    .vl-options { grid-template-columns: 1fr; }
    .vl-match-grid { grid-template-columns: 1fr 1fr; }
    .vl-prog-stats { grid-template-columns: repeat(3,1fr); }
    .vl-card-word { font-size: 28px; }
    .vl-tabs { gap: 2px; }
    .vl-tab { font-size: 11px; padding: 8px 2px; }
    .vl-ctx-syn-ant { grid-template-columns: 1fr; }
}
