* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

.header-actions {
    margin-top: 20px;
}

.header-actions .btn {
    margin-right: 10px;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

h2 {
    color: #667eea;
    margin-bottom: 20px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #667eea;
    color: white;
}

.btn-primary:hover {
    background-color: #5568d3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-edit {
    background-color: #28a745;
    color: white;
}

.btn-edit:hover {
    background-color: #218838;
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.85rem;
    margin: 0 5px;
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 5px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.95rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 0.85rem;
}

/* Input with button layout */
.input-with-button {
    display: flex;
    gap: 10px;
    align-items: center;
}

.input-with-button input {
    flex: 1;
}

.input-with-button button {
    flex-shrink: 0;
}

.schema-hint {
    margin-top: 10px;
    padding: 12px;
    background: #f7f7fb;
    border: 1px solid #e1e4f2;
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.85rem;
    color: #444;
    white-space: pre-wrap;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

/* Lesson List */
.lesson-list {
    max-height: 600px;
    overflow-y: auto;
}

.lesson-item {
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.lesson-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.lesson-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.lesson-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.lesson-id {
    font-size: 0.85rem;
    color: #666;
    font-family: monospace;
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 3px;
}

.lesson-description {
    margin: 10px 0;
    color: #666;
}

.lesson-meta {
    display: flex;
    gap: 15px;
    margin: 10px 0;
    font-size: 0.9rem;
    color: #888;
}

.lesson-actions {
    margin-top: 10px;
    display: flex;
    gap: 5px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.error {
    color: #dc3545;
    padding: 20px;
    text-align: center;
    background-color: #f8d7da;
    border-radius: 5px;
    margin: 20px 0;
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 15px 25px;
    border-radius: 5px;
    color: white;
    font-weight: 500;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background-color: #28a745;
}

.toast.error {
    background-color: #dc3545;
}

.toast.info {
    background-color: #17a2b8;
}

/* Scrollbar styling */
.lesson-list::-webkit-scrollbar {
    width: 8px;
}

.lesson-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.lesson-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.lesson-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* New UI elements for dedicated editing pages */
.nav-buttons {
    margin-bottom: 20px;
}

.card {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.vocabulary-item,
.phase-item,
.media-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.vocabulary-item h3,
.phase-item h3,
.media-item h3 {
    margin-bottom: 15px;
    color: #667eea;
    font-size: 1.1rem;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.95rem;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.meta-info {
    padding: 8px 12px;
    background: #f0f0f0;
    border-radius: 5px;
    font-size: 0.9rem;
    color: #666;
    margin-top: 8px;
}

.vocabulary-list,
.phases-list,
.media-list {
    margin-bottom: 20px;
}

/* Full width sections for edit pages */
.lesson-form-section {
    grid-column: 1 / -1;
}

/* Exercise list styles */
.exercises-list {
    margin: 15px 0;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 15px;
    background: #fafafa;
}

.no-exercises {
    text-align: center;
    color: #999;
    padding: 20px;
    font-style: italic;
}

.exercise-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 12px;
    margin-bottom: 10px;
}

.exercise-item:last-child {
    margin-bottom: 0;
}

.exercise-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.exercise-number {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: bold;
}

.exercise-id {
    font-family: monospace;
    font-size: 0.85rem;
    color: #666;
    flex: 1;
}

.exercise-actions {
    display: flex;
    gap: 5px;
}

.exercise-preview {
    padding: 8px;
    background: #f9f9f9;
    border-left: 3px solid #667eea;
    font-size: 0.9rem;
    color: #555;
}

.btn-tiny {
    padding: 3px 8px;
    font-size: 0.8rem;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-large {
    max-width: 800px !important;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #667eea;
}

/* Option and Line items in exercise editors */
.option-item,
.line-item {
    background: #f8f9fa;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #dee2e6;
    position: relative;
}

.option-item .form-group,
.line-item .form-group {
    margin-bottom: 10px;
}

.options-list,
.lines-list {
    margin-bottom: 15px;
}

.no-options,
.no-lines {
    text-align: center;
    color: #999;
    padding: 20px;
    font-style: italic;
}

/* Media Browser Styles */
.media-browser-content {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #667eea;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

/* Tab Content */
.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.upload-area.drag-over {
    border-color: #667eea;
    background-color: #f0f2ff;
}

.upload-prompt p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 15px;
}

/* Media Gallery */
.media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    min-height: 200px;
}

.media-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.media-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Media Preview */
.media-preview {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    overflow: hidden;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.audio-preview {
    flex-direction: column;
    padding: 20px;
    gap: 15px;
}

.audio-icon {
    font-size: 3rem;
}

.audio-preview audio {
    width: 100%;
}

/* Media Info */
.media-info {
    padding: 12px;
}

.media-filename {
    font-weight: 500;
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-size {
    font-size: 0.85rem;
    color: #888;
}

/* Media Actions */
.media-actions {
    padding: 0 12px 12px;
    display: flex;
    gap: 8px;
}

/* No Media Message */
.no-media {
    grid-column: 1 / -1;
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-style: italic;
    font-size: 1.1rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-content h3 {
    margin-bottom: 15px;
    color: #333;
}

.modal-content p {
    margin-bottom: 20px;
    color: #666;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Responsive adjustments for media gallery */
@media (max-width: 768px) {
    .media-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .media-preview {
        height: 120px;
    }
}

/* Media Selector Dialog Styles */
.media-selector-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.media-selector-content {
    background: white;
    border-radius: 10px;
    max-width: 900px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.media-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.media-selector-header h3 {
    margin: 0;
    color: #333;
}

.media-selector-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.media-selector-close:hover {
    color: #333;
}

.media-selector-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.media-selector-search {
    margin-bottom: 20px;
}

.media-selector-search input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.media-selector-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    min-height: 200px;
}

.media-selector-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.media-selector-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.media-selector-preview {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    overflow: hidden;
}

.media-selector-preview.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-selector-preview.audio-preview {
    flex-direction: column;
    padding: 15px;
    gap: 10px;
}

.media-selector-preview.audio-preview .audio-icon {
    font-size: 2.5rem;
}

.media-selector-preview.audio-preview audio {
    width: 100%;
}

.media-selector-info {
    padding: 10px;
}

.media-selector-filename {
    font-weight: 500;
    font-size: 0.85rem;
    color: #333;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-selector-size {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 5px;
}

.media-selector-card .btn {
    width: calc(100% - 20px);
    margin: 0 10px 10px;
}

.media-selector-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
}

.media-selector-empty p {
    color: #999;
    font-style: italic;
    margin-bottom: 20px;
}

.media-selector-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Responsive adjustments for media selector */
@media (max-width: 768px) {
    .media-selector-content {
        width: 95%;
        max-height: 90vh;
    }

    .media-selector-gallery {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .media-selector-preview {
        height: 100px;
    }
}

/* Media Picker Styles */
.media-picker {
    margin: 10px 0;
}

.media-picker-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.media-preview {
    background-color: #f5f5f5;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
}

.media-preview audio,
.media-preview img {
    display: block;
    margin: 0 auto 10px;
}

.media-filename {
    text-align: center;
    font-size: 0.9em;
    color: #666;
    margin: 5px 0 0 0;
    word-break: break-word;
}

/* Vocabulary Manager Styles */
.vocab-manager-content {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.vocab-tab-header,
.labels-tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-area {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 250px;
}

.search-area .form-control {
    flex: 1;
}

.vocab-list,
.labels-list {
    display: grid;
    gap: 15px;
}

.vocab-card,
.label-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.vocab-card:hover,
.label-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.vocab-header,
.label-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.vocab-main {
    flex: 1;
}

.vocab-main h4 {
    color: #667eea;
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.translation {
    color: #666;
    font-size: 1rem;
    margin-bottom: 10px;
}

.context,
.time-context {
    color: #555;
    font-size: 0.9rem;
    margin-top: 10px;
    line-height: 1.5;
}

.time-context {
    color: #888;
    font-style: italic;
}

.vocab-actions,
.label-actions {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

/* Label Dropdown Styles */
.label-dropdown-container {
    position: relative;
}

.label-dropdown-btn {
    white-space: nowrap;
}

.label-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    max-width: 300px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
}

.label-dropdown.show {
    display: block;
}

.label-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 15px;
    border: none;
    background-color: var(--label-color, #667eea);
    color: white;
    text-align: left;
    cursor: pointer;
    transition: opacity 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.label-dropdown-item:last-child {
    border-bottom: none;
}

.label-dropdown-item:hover {
    opacity: 0.9;
}

.label-dropdown-item .label-name {
    flex: 1;
    font-weight: 500;
}

.label-dropdown-item .label-check {
    margin-left: 8px;
    font-weight: bold;
    font-size: 1.1rem;
}

.vocab-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.label-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
    white-space: nowrap;
}

.label-info {
    flex: 1;
}

.label-desc {
    color: #666;
    font-size: 0.9rem;
    margin-top: 8px;
}

/* Modal Enhancements for Vocabulary Manager */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    margin: 0;
    color: #667eea;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.labels-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
}

.label-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.label-checkbox input[type="checkbox"] {
    cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .vocab-header,
    .label-header {
        flex-direction: column;
    }

    .vocab-actions,
    .label-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .search-area {
        flex-direction: column;
        width: 100%;
    }

    .vocab-tab-header,
    .labels-tab-header {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Vocabulary Selector Dialog Styles */
.vocab-selector-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.vocab-selector-content {
    background: white;
    border-radius: 10px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.vocab-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.vocab-selector-header h3 {
    margin: 0;
    color: #667eea;
}

.vocab-selector-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.vocab-selector-close:hover {
    color: #333;
}

.vocab-selector-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.vocab-selector-search {
    margin-bottom: 20px;
}

.vocab-selector-search input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.search-hint {
    margin-top: 8px;
    color: #888;
    font-size: 0.9rem;
    font-style: italic;
}

.vocab-selector-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
}

.vocab-selector-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.vocab-selector-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background: #f8f9fa;
}

.vocab-selector-main {
    flex: 1;
}

.vocab-selector-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.vocab-selector-text strong {
    color: #667eea;
    font-size: 1.1rem;
}

.vocab-selector-translation {
    color: #666;
    font-size: 0.95rem;
}

.vocab-selector-context {
    color: #555;
    font-size: 0.85rem;
    margin: 8px 0;
    line-height: 1.4;
}

.vocab-selector-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.label-badge-small {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
}

.no-results,
.error {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-style: italic;
}

.error {
    color: #dc3545;
}

.vocab-selector-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Responsive adjustments for vocabulary selector */
@media (max-width: 768px) {
    .vocab-selector-content {
        width: 95%;
        max-height: 90vh;
    }

    .vocab-selector-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .vocab-selector-item .btn {
        width: 100%;
    }
}

/* Vocabulary Picker Styles (for exercises) */
.vocab-picker {
    margin: 10px 0;
}

.vocab-picker-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.selected-vocab-display {
    margin-bottom: 10px;
}

.selected-vocab-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: #f0f2ff;
    border-radius: 8px;
    border: 1px solid #667eea;
}

.selected-vocab-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.selected-vocab-info strong {
    color: #667eea;
    font-size: 1.05rem;
}

.selected-vocab-info span {
    color: #666;
    font-size: 0.9rem;
}

/* ── Danger Zone ──────────────────────────────────────────────────────────── */
.danger-zone {
    margin-top: 30px;
    padding: 25px 30px;
    background: #fff5f5;
    border: 2px solid #dc3545;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.1);
}

.danger-zone h2 {
    color: #dc3545;
    margin-bottom: 10px;
}

.danger-zone-desc {
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* ── Sample Data Progress Overlay ─────────────────────────────────────────── */
.sample-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
}

.sample-overlay-box {
    background: #fff;
    border-radius: 12px;
    padding: 40px 50px;
    max-width: 520px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.sample-overlay-box h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 25px;
}

.sample-progress-bar-track {
    width: 100%;
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 18px;
}

.sample-progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.sample-progress-text {
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.sample-progress-detail {
    font-size: 0.9rem;
    color: #666;
    min-height: 1.4em;
}
