/* ========================================
   Content Creator - Page Styles
   ======================================== */

.creator-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: calc(80px + 2rem) 1rem 3rem;
}

.creator-header {
    text-align: center;
    margin-bottom: 3rem;
}

.creator-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.creator-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ========================================
   Form Sections
   ======================================== */

.form-section {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section h2 .step-badge {
    background: var(--gradient-hero);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

input[type="text"],
textarea,
select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

textarea {
    min-height: 150px;
    resize: vertical;
    line-height: 1.8;
}

#chinese-input {
    font-size: 1.5rem;
    min-height: 200px;
}

.form-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* ========================================
   Splitting Options
   ======================================== */

.splitting-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(168, 85, 247, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(168, 85, 247, 0.1);
}

.splitting-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.splitting-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-purple);
    cursor: pointer;
}

.splitting-option label {
    margin: 0;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.splitting-option .option-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0.25rem;
}

/* ========================================
   Preview
   ======================================== */

.preview-container {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.preview-title {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tone-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    line-height: 2.5;
}

.tone-char {
    font-size: 1.75rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background 0.2s ease;
    position: relative;
}

.tone-char:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tone-char .pinyin-popup {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tone-char:hover .pinyin-popup {
    opacity: 1;
}

/* Tone Colors */
.tone-1 { color: var(--tone-1); }
.tone-2 { color: var(--tone-2); }
.tone-3 { color: var(--tone-3); }
.tone-4 { color: var(--tone-4); }
.tone-5 { color: var(--tone-5); }
.tone-0 { color: var(--text-muted); }

/* ========================================
   Action Bar & Buttons
   ======================================== */

.action-bar {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn-large {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-accent {
    background: linear-gradient(135deg, #a5b4fc 0%, #f9a8d4 100%);
    color: #fff;
    font-weight: 600;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(249, 168, 212, 0.4);
}

.btn-badge {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ========================================
   Output & Stats
   ======================================== */

.output-section {
    margin-top: 2rem;
}

.json-output {
    background: #1e1e1e;
    border-radius: 12px;
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    overflow-x: auto;
    white-space: pre-wrap;
    color: #9cdcfe;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 400px;
    overflow-y: auto;
}

.copy-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.output-wrapper {
    position: relative;
}

.stats-bar {
    display: flex;
    gap: 2rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-top: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--accent-purple);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ========================================
   Status & Info Boxes
   ======================================== */

.warning-box {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    color: var(--accent-yellow);
    font-size: 0.875rem;
}

.success-box {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    color: var(--accent-green);
    font-size: 0.875rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--text-primary);
}

.instructions {
    background: rgba(168, 85, 247, 0.1);
    border-left: 3px solid var(--accent-purple);
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 0 8px 8px 0;
}

.instructions h3 {
    margin-bottom: 0.5rem;
    color: var(--accent-purple);
}

.instructions p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ========================================
   Download Options
   ======================================== */

.download-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.download-card {
    background: var(--bg-secondary);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.download-card:hover {
    border-color: var(--accent-purple);
    background: rgba(168, 85, 247, 0.05);
    transform: translateY(-2px);
}

.download-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.download-info {
    flex: 1;
}

.download-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.download-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

.download-filename {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-purple);
    background: rgba(168, 85, 247, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

.starred-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #fbbf24;
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   Pinyin Modal
   ======================================== */

.pinyin-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.pinyin-modal.active {
    display: flex;
}

.pinyin-modal-content {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    max-height: 80vh;
    overflow-y: auto;
}

.pinyin-modal-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.pinyin-modal-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.pinyin-input-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.pinyin-char {
    font-size: 2rem;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
    color: var(--accent-purple);
}

.pinyin-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: border-color 0.2s ease;
    color: var(--text-primary);
}

.pinyin-input:focus {
    outline: none;
    border-color: var(--accent-purple);
}

.tone-select {
    width: 80px;
    padding: 0.75rem 0.5rem;
    background: var(--bg-secondary);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-primary);
}

.tone-select:focus {
    outline: none;
    border-color: var(--accent-purple);
}

.pinyin-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.pinyin-modal-actions .btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-primary);
    font-weight: 600;
    border: none;
}

.pinyin-modal-actions .btn-primary {
    background: var(--gradient-hero);
    color: white;
}

.pinyin-modal-actions .btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* ========================================
   Word Review Section
   ======================================== */

.word-review-section {
    margin-top: 1.5rem;
}

.word-review-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.word-review-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sentence-review {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sentence-header {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(59, 130, 246, 0.1) 100%);
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sentence-header-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.sentence-number {
    background: var(--gradient-hero);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
}

.sentence-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.sentence-text {
    font-size: 1.5rem;
    line-height: 1.8;
    letter-spacing: 0.02em;
}

.sentence-body {
    padding: 1.5rem;
}

/* ========================================
   Word Cards
   ======================================== */

.words-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.word-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.word-card:hover {
    border-color: rgba(168, 85, 247, 0.3);
    transform: translateY(-2px);
}

.word-card.unknown {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
}

.word-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.word-star-btn {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: none;
    border: none;
    font-size: 1rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    opacity: 0.5;
    transition: all 0.2s ease;
}

.word-star-btn:hover {
    opacity: 1;
    transform: scale(1.2);
}

.word-star-btn.active {
    color: #fbbf24;
    opacity: 1;
}

.word-card.starred {
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.3);
}

.word-card-chinese {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.word-card-pinyin {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.word-card-meaning {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.word-card-unknown-badge {
    font-size: 0.65rem;
    background: rgba(251, 191, 36, 0.2);
    color: var(--accent-yellow);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-top: 0.25rem;
}

/* ========================================
   Translation & Notes
   ======================================== */

.translation-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1rem;
}

.translation-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.translation-label::before {
    content: '\1F310';
}

.translation-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
}

.translation-input:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

.translation-input::placeholder {
    color: var(--text-muted);
}

.notes-section {
    margin-top: 0.5rem;
    background: linear-gradient(135deg, rgba(255, 228, 165, 0.08), rgba(212, 165, 232, 0.08));
}

.notes-label::before {
    content: '\1F4DD' !important;
}

.notes-input::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

.vocab-item-notes {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.25rem;
}

.vocab-item-notes::before {
    content: '\1F4DD ';
}

/* ========================================
   Words Table
   ======================================== */

.words-table {
    margin-top: 1rem;
}

.words-header {
    display: grid;
    grid-template-columns: 2fr 2fr 3fr 100px;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.word-row {
    display: grid;
    grid-template-columns: 2fr 2fr 3fr 100px;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 8px;
    align-items: center;
    transition: background 0.2s ease;
}

.word-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.word-row.unknown {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.col-word {
    font-size: 1.25rem;
    font-weight: 500;
}

.col-pinyin {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.col-meaning {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.col-meaning input {
    width: 100%;
    padding: 0.5rem;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.col-meaning input:focus {
    outline: none;
    border-color: var(--accent-purple);
}

.col-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.btn-edit-word {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-edit-word:hover {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    color: white;
}

.status-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.status-badge.known {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-green);
}

.status-badge.unknown {
    background: rgba(251, 191, 36, 0.2);
    color: var(--accent-yellow);
}

/* ========================================
   Word Editor Modal
   ======================================== */

.word-editor-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: flex-start;
    justify-content: center;
    backdrop-filter: blur(8px);
    overflow-y: auto;
    padding: 2rem 1rem;
}

.word-editor-modal.active {
    display: flex;
}

.word-editor-content {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 0;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    margin: auto;
    max-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
}

.word-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.word-editor-header h3 {
    font-size: 1.1rem;
    margin: 0;
}

.word-editor-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.word-editor-close:hover {
    color: var(--text-primary);
}

.word-editor-display {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(59, 130, 246, 0.1) 100%);
    padding: 2rem;
    text-align: center;
    flex-shrink: 0;
}

.word-editor-chinese {
    font-size: 3.5rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.word-editor-scrollable {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.word-editor-fields {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.word-editor-field label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.word-editor-field input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-family: var(--font-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.word-editor-field input:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.15);
}

.word-editor-field input::placeholder {
    color: var(--text-muted);
}

.pinyin-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    padding: 0.375rem 0.5rem;
    background: rgba(168, 85, 247, 0.08);
    border-radius: 6px;
}

.resegment-details {
    margin: 0 1.5rem 1rem;
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
}

.resegment-details summary {
    padding: 0.875rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: background 0.2s ease;
}

.resegment-details summary:hover {
    background: rgba(255, 255, 255, 0.03);
}

.resegment-details[open] summary {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.resegment-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0.75rem 1rem 0;
    margin: 0;
}

.resegment-details .char-selector {
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    max-height: 200px;
    overflow-y: auto;
}

.word-editor-actions {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem 1.5rem;
    flex-shrink: 0;
    background: var(--bg-card);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.word-editor-actions .btn {
    flex: 1;
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-primary);
    font-weight: 600;
    border: none;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.word-editor-actions .btn:active {
    transform: scale(0.98);
}

.word-editor-actions .btn-primary {
    background: var(--gradient-hero);
    color: white;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

.word-editor-actions .btn-primary:hover {
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4);
}

.word-editor-actions .btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* ========================================
   Character Selector & Segmentation
   ======================================== */

.char-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.char-select {
    font-size: 2rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 3px solid transparent;
    background: var(--bg-secondary);
}

.char-select:hover {
    background: rgba(255, 255, 255, 0.1);
}

.char-select.word-end {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.2);
}

.editor-context {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.current-segmentation {
    margin-bottom: 1.5rem;
}

.current-segmentation label {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.5rem;
}

.word-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.word-chip {
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    font-size: 1.25rem;
    border: 2px solid transparent;
}

.word-chip.selected {
    border-color: var(--accent-purple);
    background: rgba(168, 85, 247, 0.1);
}

.word-chip.unknown {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
}

.resegment-section {
    margin-bottom: 1rem;
}

.resegment-section label {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.75rem;
}

.resegment-section .hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* ========================================
   Word Boundary Selector
   ======================================== */

.word-boundary-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.125rem;
    padding: 0.5rem;
    background: var(--bg-primary);
    border-radius: 8px;
}

.word-group {
    display: inline-flex;
    border-radius: 8px;
    overflow: hidden;
    margin: 0.125rem;
}

/* Alternating word colors */
.word-group.color-0 { background: rgba(168, 85, 247, 0.25); }
.word-group.color-1 { background: rgba(59, 130, 246, 0.25); }
.word-group.color-2 { background: rgba(16, 185, 129, 0.25); }
.word-group.color-3 { background: rgba(251, 146, 60, 0.25); }
.word-group.color-4 { background: rgba(236, 72, 153, 0.25); }

.boundary-char {
    font-size: 1.75rem;
    padding: 0.5rem 0.25rem;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    user-select: none;
}

.boundary-char:first-child {
    padding-left: 0.5rem;
}

.boundary-char:last-child {
    padding-right: 0.5rem;
}

.boundary-char::after {
    content: '';
    position: absolute;
    right: -3px;
    top: 10%;
    bottom: 10%;
    width: 6px;
    cursor: pointer;
    z-index: 10;
    border-radius: 2px;
    transition: background 0.15s ease;
}

.boundary-char:not(:last-child):hover::after {
    background: rgba(255, 255, 255, 0.3);
}

.boundary-char:last-child::after {
    display: none;
}

.boundary-char.has-boundary::after {
    background: var(--accent-yellow);
    width: 3px;
    right: -1.5px;
}

.boundary-legend {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.boundary-legend-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.boundary-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.boundary-legend-divider {
    width: 3px;
    height: 16px;
    background: var(--accent-yellow);
    border-radius: 2px;
}

.sentence-translation {
    margin-top: 1rem;
}

.sentence-translation label {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.5rem;
}

.unknown-word {
    text-decoration: underline;
    text-decoration-style: wavy;
    text-decoration-color: var(--accent-yellow);
}

.word-start::before {
    content: '';
    display: inline-block;
    width: 2px;
    height: 1.5em;
    background: rgba(168, 85, 247, 0.3);
    margin-right: 2px;
    vertical-align: middle;
}

/* ========================================
   Mode Selection
   ======================================== */

.mode-selection {
    margin-top: 1.5rem;
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mode-selection.active {
    opacity: 1;
    pointer-events: auto;
}

.mode-title {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mode-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.mode-card {
    background: var(--bg-secondary);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.mode-card:hover {
    border-color: var(--accent-purple);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.15);
}

.mode-card.selected {
    border-color: var(--accent-purple);
    background: rgba(168, 85, 247, 0.08);
}

.mode-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.mode-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mode-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.mode-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 700;
}

.mode-badge.manual {
    background: rgba(147, 197, 253, 0.2);
    color: #93c5fd;
}

.mode-badge.ai {
    background: rgba(168, 85, 247, 0.2);
    color: var(--accent-purple);
}

/* ========================================
   AI Prompt Modal
   ======================================== */

.ai-prompt-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: flex-start;
    justify-content: center;
    backdrop-filter: blur(8px);
    overflow-y: auto;
    padding: 2rem 1rem;
}

.ai-prompt-modal.active {
    display: flex;
}

.ai-prompt-content {
    background: var(--bg-card);
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    margin: auto;
    max-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
}

.ai-prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(59, 130, 246, 0.1) 100%);
}

.ai-prompt-header h3 {
    font-size: 1.25rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-prompt-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.ai-prompt-close:hover {
    color: var(--text-primary);
}

.ai-prompt-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.output-format-selection {
    margin-bottom: 1.5rem;
}

.output-format-selection label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.format-options {
    display: flex;
    gap: 1rem;
}

.format-option {
    flex: 1;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.format-option:hover {
    border-color: var(--accent-purple);
}

.format-option.selected {
    border-color: var(--accent-purple);
    background: rgba(168, 85, 247, 0.1);
}

.format-option .format-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.format-option .format-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.format-option .format-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.prompt-preview {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    color: var(--text-secondary);
    border: 2px solid rgba(255, 255, 255, 0.1);
    line-height: 1.5;
}

.prompt-preview .prompt-section {
    margin-bottom: 1rem;
}

.prompt-preview .prompt-heading {
    color: var(--accent-purple);
    font-weight: 600;
}

.ai-prompt-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    flex-shrink: 0;
}

.ai-prompt-footer .btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-primary);
    font-weight: 600;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.ai-prompt-footer .btn-copy {
    background: var(--gradient-hero);
    color: white;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

.ai-prompt-footer .btn-copy:hover {
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4);
    transform: translateY(-1px);
}

.ai-prompt-footer .btn-copy.copied {
    background: var(--accent-green);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.ai-prompt-footer .btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* ========================================
   AI Instructions & Workflow
   ======================================== */

.ai-instructions {
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid var(--accent-blue);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1rem;
}

.ai-instructions h4 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--accent-blue);
}

.ai-instructions p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.ai-instructions ol {
    margin: 0.5rem 0 0 1.25rem;
    padding: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.ai-instructions li {
    margin-bottom: 0.25rem;
}

.ai-workflow-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.ai-workflow-tab {
    flex: 1;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    color: var(--text-muted);
}

.ai-workflow-tab:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02);
}

.ai-workflow-tab.active {
    color: var(--accent-purple);
    border-bottom-color: var(--accent-purple);
}

.ai-workflow-tab .tab-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    font-weight: 700;
    margin-right: 0.5rem;
}

.ai-workflow-tab.active .tab-number {
    background: var(--accent-purple);
    color: white;
}

.ai-workflow-tab.completed .tab-number {
    background: var(--accent-green);
    color: white;
}

.ai-step-content {
    display: none;
}

.ai-step-content.active {
    display: block;
}

.ai-response-area {
    width: 100%;
    height: 300px;
    padding: 1rem;
    background: #1a1a2e;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #f9a8d4;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    resize: none;
    line-height: 1.5;
}

.ai-response-area:focus {
    outline: none;
    border-color: var(--accent-purple);
}

.ai-response-area::placeholder {
    color: var(--text-muted);
}

/* ========================================
   Validation & Feedback
   ======================================== */

.paste-feedback {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--accent-purple);
    display: none;
}

.paste-feedback.visible {
    display: block;
}

.paste-feedback .paste-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.paste-feedback .paste-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.paste-feedback .paste-stat strong {
    color: var(--text-primary);
}

.validation-result {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
}

.validation-result.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--accent-green);
}

.validation-result.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.validation-result h4 {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.validation-result p {
    margin: 0;
    font-size: 0.85rem;
}

/* ========================================
   Learning Priority
   ======================================== */

.priority-ranking {
    max-height: 400px;
    overflow-y: auto;
}

.priority-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.priority-rank {
    font-weight: 700;
    color: var(--accent-purple);
    min-width: 35px;
}

.priority-word {
    font-size: 1.25rem;
    font-weight: 600;
    min-width: 60px;
}

.priority-bar-container {
    flex: 1;
    height: 8px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 4px;
    overflow: hidden;
}

.priority-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.priority-stats {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    min-width: 90px;
    justify-content: flex-end;
}

.priority-score {
    font-family: var(--font-mono);
}

.priority-empty {
    color: var(--text-muted);
    text-align: center;
    padding: 1rem;
    font-size: 0.875rem;
}

/* ========================================
   Fix Typo Button
   ======================================== */

.btn-fix-typo {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
}

.btn-fix-typo:hover {
    background: rgba(168, 85, 247, 0.15);
    border-color: var(--accent-purple);
    color: var(--text-primary);
}

.fix-typo-icon {
    font-size: 0.875rem;
}

/* ========================================
   Sentence Editor Modal
   ======================================== */

.sentence-editor-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.sentence-editor-modal.active {
    opacity: 1;
    visibility: visible;
}

.sentence-editor-content {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 0;
    width: 95%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sentence-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sentence-editor-header h3 {
    margin: 0;
    font-size: 1.125rem;
}

.sentence-editor-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.sentence-editor-close:hover {
    color: var(--text-primary);
}

.sentence-editor-info {
    padding: 1rem 1.5rem;
    background: rgba(168, 85, 247, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sentence-editor-info p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.sentence-editor-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.sentence-editor-field {
    margin-bottom: 1.25rem;
}

.sentence-editor-field:last-child {
    margin-bottom: 0;
}

.sentence-editor-field label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sentence-editor-preview {
    font-size: 1.5rem;
    line-height: 1.6;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    color: var(--text-secondary);
}

.sentence-editor-textarea {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    font-size: 1.5rem;
    line-height: 1.6;
    background: var(--bg-primary);
    border: 2px solid rgba(168, 85, 247, 0.3);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    resize: vertical;
}

.sentence-editor-textarea:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

.sentence-editor-diff {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    min-height: 40px;
}

.diff-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.diff-info {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
}

.diff-content {
    font-size: 1.25rem;
    line-height: 1.6;
}

.diff-same {
    color: var(--text-secondary);
}

.diff-removed {
    background: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    text-decoration: line-through;
    padding: 0 0.125rem;
    border-radius: 2px;
}

.diff-added {
    background: rgba(34, 197, 94, 0.3);
    color: #86efac;
    padding: 0 0.125rem;
    border-radius: 2px;
}

.sentence-editor-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--bg-secondary);
    border-radius: 0 0 16px 16px;
}

.sentence-editor-actions .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
}

/* ========================================
   Content Type Toggle
   ======================================== */

.content-type-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.content-type-btn {
    background: var(--bg-secondary);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    color: var(--text-secondary);
}

.content-type-btn:hover {
    border-color: var(--accent-purple);
    transform: translateY(-1px);
}

.content-type-btn.active {
    border-color: var(--accent-purple);
    background: rgba(168, 85, 247, 0.1);
    color: var(--text-primary);
}

.content-type-btn h4 {
    font-size: 1rem;
    margin: 0 0 0.25rem 0;
}

.content-type-btn p {
    font-size: 0.8rem;
    margin: 0;
    opacity: 0.8;
}

/* ========================================
   Vocabulary Entry (vocab-only mode)
   ======================================== */

.vocab-entry-section {
    display: none;
}

.vocab-entry-section.visible {
    display: block;
}

.add-item-form {
    border: 2px dashed rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
}

.add-item-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr auto;
    gap: 0.75rem;
    align-items: end;
}

.add-sentence-row {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr auto;
    gap: 0.75rem;
    align-items: end;
}

.add-item-form label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.add-item-form input,
.add-item-form textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--bg-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.btn-add {
    padding: 0.5rem 1rem;
    background: var(--accent-purple);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s;
}

.btn-add:hover {
    background: var(--accent-purple-hover, #9333ea);
}

.vocab-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vocab-item-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.vocab-item-chinese {
    font-size: 1.2rem;
    font-weight: 600;
    min-width: 4rem;
}

.vocab-item-pinyin {
    font-size: 0.9rem;
    color: var(--text-secondary);
    min-width: 5rem;
}

.vocab-item-translation {
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex: 1;
}

.vocab-item-actions {
    display: flex;
    gap: 0.35rem;
}

.vocab-item-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
    transition: all 0.15s;
}

.vocab-item-btn:hover {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
}

.vocab-item-btn.delete:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.vocab-empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 1.5rem;
    font-size: 0.9rem;
}

.sentence-notes-row {
    margin-top: 0.5rem;
}

.sentence-notes-row input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--bg-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
}

/* ========================================
   Upload Existing Lesson
   ======================================== */

.upload-section {
    background: var(--bg-card);
    border: 2px dashed rgba(0, 0, 0, 0.15);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.upload-section:hover {
    border-color: var(--accent-purple);
    background: linear-gradient(135deg, rgba(212, 165, 232, 0.05), rgba(165, 200, 247, 0.05));
}

.upload-section.drag-over {
    border-color: var(--accent-purple);
    background: linear-gradient(135deg, rgba(212, 165, 232, 0.1), rgba(165, 200, 247, 0.1));
    transform: scale(1.01);
}

.upload-section .upload-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.upload-section h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.upload-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.upload-section input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-loaded-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(125, 216, 163, 0.15);
    border-radius: 8px;
    color: var(--tone-2);
    font-weight: 500;
    font-size: 0.9rem;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
    .words-header {
        display: none;
    }

    .word-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .word-row > div {
        display: flex;
        gap: 0.5rem;
        align-items: center;
    }

    .word-row > div::before {
        content: attr(data-label);
        font-size: 0.7rem;
        text-transform: uppercase;
        color: var(--text-muted);
        min-width: 60px;
    }

    .col-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .add-item-row {
        grid-template-columns: 1fr;
    }
    .add-sentence-row {
        grid-template-columns: 1fr;
    }
    .content-type-toggle {
        grid-template-columns: 1fr;
    }
}
