/* ─── IELTS Vocabulary App ─────────────────────────── */
#ielts-vocab-root { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; max-width: 900px; margin: 0 auto; }

/* Login notice */
.ielts-vocab-login-notice { text-align: center; padding: 40px 20px; background: #f0f6ff; border-radius: 12px; border: 1px solid #c5d8f7; }
.ielts-vocab-login-notice p { font-size: 16px; color: #444; margin-bottom: 16px; }
.ielts-vocab-login-btn { display: inline-block; background: #2271b1; color: #fff; padding: 10px 28px; border-radius: 6px; text-decoration: none; font-weight: 600; }
.ielts-vocab-login-btn:hover { background: #135e96; color: #fff; }

/* Header */
.iv-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 2px solid #e0e0e0; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.iv-header h2 { margin: 0; font-size: 22px; color: #1d2327; }
.iv-user-info { font-size: 13px; color: #666; }
.iv-user-info strong { color: #2271b1; }

/* Navigation tabs */
.iv-nav { display: flex; gap: 6px; margin-bottom: 24px; flex-wrap: wrap; }
.iv-nav-btn { padding: 8px 18px; border: 2px solid #e0e0e0; background: #fff; border-radius: 20px; cursor: pointer; font-size: 14px; font-weight: 500; color: #444; transition: all .2s; }
.iv-nav-btn:hover { border-color: #2271b1; color: #2271b1; }
.iv-nav-btn.active { background: #2271b1; border-color: #2271b1; color: #fff; }

/* Stats bar */
.iv-stats { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.iv-stat { background: #fff; border: 1px solid #e0e0e0; border-radius: 10px; padding: 12px 18px; text-align: center; min-width: 100px; }
.iv-stat-num { font-size: 26px; font-weight: 700; color: #2271b1; line-height: 1; }
.iv-stat-num.green { color: #00a32a; }
.iv-stat-num.orange { color: #c77b00; }
.iv-stat-num.red { color: #c00; }
.iv-stat-label { font-size: 12px; color: #888; margin-top: 4px; }

/* Progress bar */
.iv-progress-bar { background: #e0e0e0; border-radius: 8px; height: 8px; margin: 16px 0; overflow: hidden; }
.iv-progress-fill { height: 100%; background: linear-gradient(90deg, #2271b1, #00a32a); border-radius: 8px; transition: width .4s ease; }

/* Filters */
.iv-filters { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.iv-filter-select { padding: 6px 12px; border: 1px solid #ccc; border-radius: 6px; font-size: 14px; background: #fff; }
.iv-mode-btn { padding: 6px 14px; border: 1px solid #ccc; border-radius: 16px; cursor: pointer; font-size: 13px; background: #fff; }
.iv-mode-btn.active { background: #2271b1; color: #fff; border-color: #2271b1; }

/* Flashcard */
.iv-session { }
.iv-session-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.iv-session-progress { font-size: 14px; color: #666; }
.iv-flashcard { perspective: 1000px; margin: 0 auto 20px; max-width: 600px; height: 320px; cursor: pointer; }
.iv-flashcard-inner { position: relative; width: 100%; height: 100%; transition: transform .5s; transform-style: preserve-3d; }
.iv-flashcard.flipped .iv-flashcard-inner { transform: rotateY(180deg); }
.iv-card-front, .iv-card-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 16px; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 24px; box-sizing: border-box; text-align: center; box-shadow: 0 4px 20px rgba(0,0,0,.1); }
.iv-card-front { background: linear-gradient(135deg, #2271b1 0%, #135e96 100%); color: #fff; }
.iv-card-back { background: #fff; border: 2px solid #e0e0e0; transform: rotateY(180deg); color: #1d2327; }
.iv-card-word { font-size: 36px; font-weight: 700; margin-bottom: 8px; }
.iv-card-pronunciation { font-size: 16px; opacity: .8; margin-bottom: 6px; }
.iv-card-pos { font-size: 13px; background: rgba(255,255,255,.2); padding: 3px 10px; border-radius: 10px; display: inline-block; }
.iv-card-definition { font-size: 16px; font-weight: 600; margin-bottom: 10px; line-height: 1.5; }
.iv-card-example { font-size: 14px; color: #666; font-style: italic; margin-bottom: 10px; line-height: 1.5; }
.iv-card-synonyms { font-size: 13px; color: #999; }
.iv-card-synonyms span { color: #2271b1; }
.iv-card-hint { font-size: 13px; opacity: .7; margin-top: 12px; }
.iv-card-bookmark { position: absolute; top: 14px; right: 14px; font-size: 22px; cursor: pointer; background: none; border: none; padding: 4px; line-height: 1; }

/* Quiz buttons */
.iv-quiz-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.iv-btn { padding: 12px 28px; border: none; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; transition: all .15s; min-width: 120px; }
.iv-btn:active { transform: scale(.97); }
.iv-btn-correct { background: #00a32a; color: #fff; }
.iv-btn-correct:hover { background: #007a1e; }
.iv-btn-wrong { background: #d63638; color: #fff; }
.iv-btn-wrong:hover { background: #b32d2e; }
.iv-btn-flip { background: #f0f6ff; color: #2271b1; border: 2px solid #c5d8f7; }
.iv-btn-flip:hover { background: #c5d8f7; }
.iv-btn-known { background: #fff; color: #888; border: 2px solid #e0e0e0; font-size: 13px; padding: 8px 16px; min-width: auto; }
.iv-btn-known:hover { border-color: #00a32a; color: #00a32a; }
.iv-btn-primary { background: #2271b1; color: #fff; }
.iv-btn-primary:hover { background: #135e96; }

/* Session end */
.iv-session-end { text-align: center; padding: 40px 20px; }
.iv-session-end h3 { font-size: 24px; margin-bottom: 8px; }
.iv-session-score { font-size: 48px; font-weight: 700; color: #2271b1; margin: 16px 0; }
.iv-session-score span { font-size: 20px; color: #888; }

/* Word list */
.iv-wordlist { }
.iv-word-item { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-bottom: 1px solid #f0f0f0; }
.iv-word-item:last-child { border-bottom: none; }
.iv-word-main { flex: 1; }
.iv-word-name { font-size: 18px; font-weight: 700; color: #1d2327; }
.iv-word-pron { font-size: 13px; color: #888; margin-left: 8px; }
.iv-word-pos-badge { display: inline-block; background: #e8f0fe; color: #2271b1; font-size: 11px; padding: 2px 8px; border-radius: 8px; margin-left: 6px; }
.iv-word-def { font-size: 14px; color: #444; margin-top: 4px; line-height: 1.5; }
.iv-word-ex { font-size: 13px; color: #777; font-style: italic; margin-top: 3px; }
.iv-word-status { font-size: 12px; padding: 3px 10px; border-radius: 10px; white-space: nowrap; font-weight: 600; }
.iv-word-status.new      { background: #f0f0f0; color: #666; }
.iv-word-status.learning { background: #fff3e0; color: #c77b00; }
.iv-word-status.known    { background: #e6f4ea; color: #00a32a; }
.iv-bm-btn { font-size: 20px; cursor: pointer; background: none; border: none; padding: 4px; line-height: 1; flex-shrink: 0; }

/* Tabs */
.iv-view { display: none; }
.iv-view.active { display: block; }

/* Loading */
.iv-loading { text-align: center; padding: 60px 20px; color: #888; font-size: 16px; }
.iv-spinner { display: inline-block; width: 32px; height: 32px; border: 3px solid #e0e0e0; border-top-color: #2271b1; border-radius: 50%; animation: iv-spin .7s linear infinite; margin-bottom: 12px; }
@keyframes iv-spin { to { transform: rotate(360deg); } }

/* Empty state */
.iv-empty { text-align: center; padding: 60px 20px; color: #888; }
.iv-empty-icon { font-size: 48px; margin-bottom: 12px; }
.iv-empty p { font-size: 15px; }

/* Week chart */
.iv-week-chart { display: flex; align-items: flex-end; gap: 6px; height: 80px; margin: 16px 0; }
.iv-week-bar { flex: 1; background: #e8f0fe; border-radius: 4px 4px 0 0; position: relative; min-height: 4px; transition: height .3s; }
.iv-week-bar-fill { background: #2271b1; border-radius: 4px 4px 0 0; width: 100%; position: absolute; bottom: 0; transition: height .3s; }
.iv-week-label { text-align: center; font-size: 11px; color: #999; margin-top: 4px; }
.iv-week-labels { display: flex; gap: 6px; }
.iv-week-labels span { flex: 1; text-align: center; font-size: 11px; color: #999; }

@media (max-width: 600px) {
    .iv-card-word { font-size: 28px; }
    .iv-flashcard { height: 280px; }
    .iv-stats { gap: 8px; }
    .iv-stat { min-width: 80px; padding: 10px 12px; }
    .iv-stat-num { font-size: 22px; }
    .iv-btn { padding: 10px 18px; font-size: 14px; }
}

/* ─── Login Box ──────────────────────────────────────────────────────────── */
.iv-login-box {
    max-width: 380px; margin: 40px auto; padding: 40px 32px;
    background: #fff; border: 1px solid #e0e0e0; border-radius: 16px;
    text-align: center; box-shadow: 0 4px 24px rgba(0,0,0,.08);
}
.iv-login-logo { font-size: 52px; margin-bottom: 12px; }
.iv-login-title { font-size: 22px; font-weight: 700; margin: 0 0 8px; color: #1d2327; }
.iv-login-subtitle { color: #888; font-size: 14px; margin-bottom: 28px; }
.iv-google-btn-wrap { display: flex; justify-content: center; margin-bottom: 16px; min-height: 44px; }
.iv-login-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: #ccc; font-size: 13px; }
.iv-login-divider::before, .iv-login-divider::after { content:''; flex:1; height:1px; background:#e0e0e0; }
.iv-login-guest { font-size: 13px; color: #888; }
.iv-login-guest a { color: #2271b1; text-decoration: none; }
.iv-login-guest a:hover { text-decoration: underline; }

/* ─── Login Prompt (inline in tabs) ─────────────────────────────────────── */
.iv-login-prompt {
    text-align: center; padding: 50px 20px;
    background: #f8f9ff; border: 1px dashed #c5d8f7;
    border-radius: 12px; margin-top: 16px;
}
