/* ===== ОСНОВНЫЕ СТИЛИ И СБРОС ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* ===== НАВИГАЦИЯ И ШАПКА ===== */
nav {
    background-color: #1a5276;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
    gap: 5px;
}

nav li {
    margin: 0;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 4px;
    transition: background-color 0.3s;
    font-weight: 500;
    display: block;
}

nav a:hover, nav a.active {
    background-color: #2874a6;
}

/* Стили для выпадающего меню */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
    padding-right: 25px;
}

.dropdown-toggle::after {
    content: '▾';
    font-size: 14px;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle::after {
    transform: translateY(-50%) rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 4px;
    z-index: 1000;
    list-style: none;
    margin: 0;
    padding: 8px 0;
    border: 1px solid #e1e5e9;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-link {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s;
    font-size: 14px;
    border-left: 3px solid transparent;
}

.dropdown-link:hover {
    background-color: #f8f9fa;
    color: #1a5276;
    border-left-color: #2874a6;
}

.dropdown-link.active {
    background-color: #e8f4fd;
    color: #1a5276;
    border-left-color: #2874a6;
    font-weight: 500;
}

/* ===== ОСНОВНОЙ КОНТЕЙНЕР И СТРАНИЦЫ ===== */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
}

.page {
    display: none;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.page.active {
    display: block;
}

/* ===== ТИПОГРАФИЯ ===== */
h1, h2, h3 {
    color: #1a5276;
    margin-bottom: 15px;
}

/* ===== ТАБЛИЦЫ ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 18px;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

th {
    background-color: #2874a6;
    color: white;
    font-weight: 500;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* Специфичные стили для разных таблиц */
.word-table, .sentence-table {
    width: 100%;
    margin-top: 20px;
}

.word-table th, .sentence-table th {
    background-color: #1a5276;
}

.case-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.case-table th, .case-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.case-table th {
    background-color: #2874a6;
    color: white;
    font-weight: 500;
}

.case-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.case-table tr:hover {
    background-color: #e8f4fd;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.preview-table th,
.preview-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.preview-table th {
    background-color: #e9ecef;
    font-weight: 600;
}

.preview-table tr:hover {
    background-color: #f1f3f5;
}

/* ===== ФОРМЫ И ИНПУТЫ ===== */
.word-form, .sentence-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 1200px;
    margin: 20px auto;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .half {
    flex: 1;
}

label {
    margin-bottom: 5px;
    font-weight: bold;
    color: #1a5276;
}

input, textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

/* Контейнер для перевода */
.translate-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.translate-container input {
    flex: 1;
}

/* ===== КНОПКИ ===== */
button {
    background-color: #2874a6;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #1a5276;
}

.primary-btn {
    background-color: #2874a6;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.primary-btn:hover {
    background-color: #1a5276;
}

.secondary-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
    text-decoration: none;
    display: inline-block;
}

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

.small-btn {
    padding: 4px 8px;
    font-size: 12px;
}

/* Специфичные кнопки */
.translate-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: background-color 0.3s;
}

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

.translate-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.translate-btn.loading {
    background-color: #ffc107;
    color: #000;
}

.delete-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    padding: 4px 8px;
    font-size: 12px;
    text-decoration: none;
    display: inline-block;
}

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

/* ===== КНОПКИ АУДИО ===== */
.play-btn {
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 12px;
    padding: 0;
}

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

.play-btn.playing {
    background-color: #dc3545;
}

.add-audio-btn {
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 12px;
    padding: 0;
}

/* ===== ЗАГРУЗКА ФАЙЛОВ ===== */
.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.file-input-wrapper input[type=file] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-button {
    display: inline-block;
    padding: 8px 12px;
    background-color: #6c757d;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 14px;
}

.file-input-button:hover {
    background-color: #5a6268;
}

.file-name {
    margin-left: 10px;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

/* ===== ВИРТУАЛЬНАЯ КЛАВИАТУРА СЕРБСКИХ СИМВОЛОВ ===== */
.serbian-keyboard {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.serbian-keyboard h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 14px;
}

.keyboard-row {
    display: flex;
    gap: 5px;
    margin-bottom: 5px;
    justify-content: center;
    flex-wrap: wrap;
}

.keyboard-key {
    padding: 8px 12px;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s;
    min-width: 50px;
}

.keyboard-key:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.keyboard-key:active {
    background: #dee2e6;
    transform: translateY(1px);
}

.keyboard-hint {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

/* ===== СЕТКИ И КАРТОЧКИ ===== */
.words-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.word-card {
    background: white;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s ease;
}

.word-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    border-color: #2874a6;
}

.word-latin {
    font-weight: bold;
    color: #1a5276;
    font-size: 16px;
    margin-bottom: 5px;
}

.word-cyrillic {
    color: #2874a6;
    font-size: 14px;
    margin-bottom: 5px;
}

.word-translation {
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.word-gender {
    font-size: 12px;
    color: #888;
    font-style: italic;
}

.alphabet-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.letter-card {
    background-color: #e8f4fd;
    padding: 15px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.cyrillic {
    font-size: 24px;
    font-weight: bold;
    color: #1a5276;
}

.latin {
    font-size: 18px;
    color: #2874a6;
}

.pronunciation {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* ===== СТРАНИЦА ПАДЕЖЕЙ ===== */
.case-form-container {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #2874a6;
}

.case-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.case-submit-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    width: 100%;
}

.case-submit-btn:hover:not(:disabled) {
    background-color: #218838;
}

.case-submit-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.word-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: white;
}

.case-info {
    margin-top: 40px;
    padding: 25px;
    background: #e8f4fd;
    border-radius: 8px;
}

.case-explanation {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.case-item {
    background: white;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.case-item h4 {
    color: #1a5276;
    margin-bottom: 15px;
    border-bottom: 2px solid #2874a6;
    padding-bottom: 8px;
}

/* ===== СООБЩЕНИЯ И УВЕДОМЛЕНИЯ ===== */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    margin: 10px 0;
}

.success-message {
    color: #155724;
    background-color: #d4edda;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
    border: 1px solid #c3e6cb;
}

.form-hint {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

.preview-hint {
    color: #6c757d;
    font-style: italic;
}

.no-audio {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* ===== ПРИМЕРЫ И ПРЕДЛОЖЕНИЯ ===== */
.examples {
    margin: 30px 0;
}

.example-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    border-left: 4px solid #2874a6;
}

.example-item .sentence {
    flex-grow: 1;
}

.example-item .sentence strong {
    color: #1a5276;
    display: block;
    margin-bottom: 5px;
}

.example-item .sentence em {
    color: #2874a6;
    display: block;
    margin-bottom: 5px;
}

.sentence-item {
    background-color: #f8f9fa;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    border-left: 4px solid #2874a6;
}

/* ===== ВНЕШНИЕ РЕСУРСЫ И ССЫЛКИ ===== */
.external-resources {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.resource-links {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.resource-links li {
    margin: 8px 0;
    padding-left: 20px;
    position: relative;
}

.resource-links li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #007bff;
}

.dynamic-link {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ccc;
}

#word-definify-link {
    background: #e3f2fd;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none !important;
    display: inline-block;
    font-weight: 500;
}

/* ===== АУДИОПЛЕЕР УРОКОВ ===== */
.audio-player-section.compact {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #2874a6;
}

.audio-controls-compact {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.audio-controls-compact .lesson-select {
    flex-grow: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.player-buttons {
    display: flex;
    gap: 5px;
}

.play-pause-lesson-btn, .stop-lesson-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
    min-width: 40px;
}

.play-pause-lesson-btn {
    background-color: #28a745;
    color: white;
}

.play-pause-lesson-btn.playing {
    background-color: #ffc107;
    color: black;
}

.play-pause-lesson-btn:hover:not(:disabled) {
    opacity: 0.9;
}

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

.stop-lesson-btn:hover:not(:disabled) {
    background-color: #c82333;
}

.play-pause-lesson-btn:disabled, 
.stop-lesson-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.audio-progress-compact {
    display: flex;
    align-items: center;
    gap: 10px;
}

.audio-progress-compact progress {
    flex-grow: 1;
    height: 16px;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
}

.time-display-compact {
    font-size: 12px;
    color: #666;
    min-width: 80px;
    text-align: center;
}

/* Стили для progress bar */
.audio-progress-compact progress::-webkit-progress-bar {
    background-color: #e9ecef;
    border-radius: 8px;
}

.audio-progress-compact progress::-webkit-progress-value {
    background-color: #2874a6;
    border-radius: 8px;
    transition: width 0.1s ease;
}

.audio-progress-compact progress::-moz-progress-bar {
    background-color: #2874a6;
    border-radius: 8px;
}

/* ===== PDF ПРОСМОТРЩИК ===== */
.pdf-viewer-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin: 25px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.pdf-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.pdf-btn {
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
    font-size: 14px;
}

.pdf-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.primary-btn.pdf-btn {
    background: #007bff;
    color: white;
}

.primary-btn.pdf-btn:hover {
    background: #0069d9;
}

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

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

.pdf-container {
    height: 100vh !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden;
}

.pdf-viewer {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pdf-fallback {
    padding: 40px 20px;
    text-align: center;
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.pdf-fallback a {
    color: #2874a6;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    margin-top: 15px;
}

.pdf-fallback a:hover {
    text-decoration: underline;
}

/* ===== АНИМАЦИИ ===== */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

.translate-btn.loading .loading-spinner {
    border: 2px solid #000000;
    border-top-color: transparent;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== ФУТЕР ===== */
footer {
    text-align: center;
    padding: 20px;
    background-color: #1a5276;
    color: white;
    margin-top: 30px;
}

/* ===== КОМПАКТНАЯ КЛАВИАТУРА С ВИДИМЫМИ БУКВАМИ ===== */
.form-with-keyboard {
    display: flex;
    gap: 25px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.serbian-keyboard-compact {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    min-width: auto;
    flex-shrink: 0;
    margin-left: 10px;
}

.serbian-keyboard-compact h4 {
    margin: 0 0 12px 0;
    color: #495057;
    font-size: 14px;
    text-align: center;
    font-weight: 600;
}

.keyboard-grid-compact {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.keyboard-key-tiny {
    width: 40px;
    height: 40px;
    background: #ffffff;
    border: 2px solid #2874a6;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #1a5276;
}

.keyboard-key-tiny:hover {
    background: #e8f4fd;
    border-color: #1a5276;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.keyboard-key-tiny:active {
    background: #d1e7f7;
    transform: translateY(0);
}

.form-fields-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-fields-stacked {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-fields-stacked .form-group {
    margin-bottom: 0;
}

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

.audio-upload-compact {
    display: flex;
    align-items: center;
    gap: 10px;
}

.translate-btn-compact {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

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

/* ===== СТИЛИ ИЗ ADMIN-WORDS.PHP ===== */
.admin-words-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-words-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #2874a6;
}

.admin-words-title {
    color: #1a5276;
    font-size: 28px;
    margin: 0;
}

.admin-words-actions {
    display: flex;
    gap: 15px;
}

.admin-words-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    border-left: 4px solid #2874a6;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #1a5276;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.words-management-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.section-title {
    color: #1a5276;
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.words-filter {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.filter-group label {
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.filter-actions {
    display: flex;
    gap: 10px;
}

.words-table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.admin-words-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-words-table th {
    background-color: #1a5276;
    color: white;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.admin-words-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.admin-words-table tr:hover {
    background-color: #f8f9fa;
}

.word-cell {
    font-weight: 600;
    color: #1a5276;
}

.cyrillic-cell {
    color: #2874a6;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.translation-cell {
    color: #495057;
}

.gender-cell {
    text-transform: uppercase;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    text-align: center;
    display: inline-block;
    min-width: 40px;
}

.gender-m { background-color: #e3f2fd; color: #1976d2; }
.gender-f { background-color: #fce4ec; color: #c2185b; }
.gender-n { background-color: #f3e5f5; color: #7b1fa2; }

.audio-cell {
    text-align: center;
}

.audio-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
}

.has-audio { background-color: #d4edda; color: #155724; }
.no-audio-indicator { background-color: #f8d7da; color: #721c24; }

.actions-cell {
    text-align: center;
    white-space: nowrap;
}

.action-buttons {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.btn-edit, .btn-delete, .btn-audio {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-edit {
    background-color: #ffc107;
    color: #212529;
}

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

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

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

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

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

.bulk-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.bulk-select-info {
    font-size: 14px;
    color: #495057;
    margin-right: auto;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 15px 0;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background-color: white;
    color: #495057;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.pagination-btn:hover:not(.disabled) {
    background-color: #2874a6;
    color: white;
    border-color: #2874a6;
}

.pagination-btn.disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-info {
    font-size: 14px;
    color: #495057;
    margin: 0 15px;
}

.import-export-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.import-box, .export-box {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.import-export-title {
    color: #1a5276;
    font-size: 18px;
    margin-bottom: 15px;
}

.import-form, .export-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.file-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 6px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #2874a6;
    background-color: #f8f9fa;
}

.file-upload-area.dragover {
    border-color: #28a745;
    background-color: #e8f5e8;
}

.upload-icon {
    font-size: 48px;
    color: #6c757d;
    margin-bottom: 10px;
}

.upload-text {
    color: #495057;
    margin-bottom: 10px;
}

.upload-hint {
    font-size: 12px;
    color: #6c757d;
}

.export-format-options {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.format-option {
    flex: 1;
}

.format-option input[type="radio"] {
    display: none;
}

.format-option label {
    display: block;
    padding: 15px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.format-option input[type="radio"]:checked + label {
    border-color: #2874a6;
    background-color: #e8f4fd;
    color: #1a5276;
}

.format-option label:hover {
    border-color: #2874a6;
}

.format-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.format-desc {
    font-size: 12px;
    color: #6c757d;
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    background-color: #1a5276;
    color: white;
    padding: 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 15px 25px;
    background-color: #f8f9fa;
    border-radius: 0 0 8px 8px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ===== СТИЛИ ДЛЯ ФОРМЫ ДОБАВЛЕНИЯ СЛОВ В АДМИНКЕ ===== */
.admin-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.admin-form .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.admin-form label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a5276;
    font-size: 14px;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    border-color: #2874a6;
    outline: none;
    box-shadow: 0 0 0 2px rgba(40, 116, 166, 0.1);
}

.preview-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid #2874a6;
}

.cases-preview {
    min-height: 100px;
    margin-top: 10px;
}

.admin-form .translate-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.admin-form .translate-container input {
    flex: 1;
}

.admin-form .translate-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: background-color 0.3s;
    min-width: 120px;
}

.admin-form .translate-btn:hover:not(:disabled) {
    background-color: #218838;
}

.admin-form .translate-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.admin-form .translate-btn.loading {
    background-color: #ffc107;
    color: #000;
}

/* ===== СТИЛИ ДЛЯ РЕДАКТИРУЕМОЙ ТАБЛИЦЫ ПАДЕЖЕЙ ===== */
.editable-cases-table {
    margin-top: 10px;
}

.editable-cases-table th {
    background-color: #2874a6 !important;
    color: white !important;
    font-weight: 600;
    padding: 12px 8px;
    text-align: center;
}

.editable-cases-table td {
    padding: 8px;
    vertical-align: middle;
}

.case-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.case-input:focus {
    border-color: #2874a6;
    outline: none;
    box-shadow: 0 0 0 2px rgba(40, 116, 166, 0.1);
}

.case-input:hover {
    border-color: #bbb;
}

/* ===== СТИЛИ ДЛЯ ПРОВЕРКИ DEFINIFY ===== */
.definify-check {
    margin-top: 10px;
}

.definify-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.definify-input {
    flex: 1;
    min-width: 200px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.definify-results {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.definify-results h4 {
    color: #1a5276;
    margin-bottom: 10px;
    font-size: 16px;
}

.definify-links {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.definify-loading {
    text-align: center;
}

.definify-loading p {
    margin-bottom: 10px;
    color: #666;
}

/* ===== СТИЛИ ДЛЯ СТРАНИЦЫ МЕСТОИМЕНИЙ ===== */
.pronouns-section {
    margin-bottom: 40px;
    padding: 25px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pronouns-section h3 {
    color: #1a5276;
    border-bottom: 2px solid #2874a6;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.pronouns-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.pronouns-table th {
    background-color: #2874a6;
    color: white;
    font-weight: 500;
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #1a5276;
}

.pronouns-table td {
    border: 1px solid #ddd;
    padding: 12px 8px;
    text-align: center;
    vertical-align: middle;
}

.pronouns-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.pronouns-table tr:hover {
    background-color: #e8f4fd;
}

.pronouns-table td strong {
    color: #1a5276;
    font-weight: 600;
}

.pronouns-explanation {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin: 20px 0;
    border-left: 4px solid #2874a6;
}

.pronouns-explanation h4 {
    color: #1a5276;
    margin-bottom: 15px;
    font-size: 18px;
}

.pronouns-explanation p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.pronouns-explanation ul,
.pronouns-explanation ol {
    margin: 15px 0;
    padding-left: 25px;
}

.pronouns-explanation li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.pronouns-explanation em {
    font-style: italic;
    color: #495057;
    background: #fff;
    padding: 2px 4px;
    border-radius: 3px;
}

.pronouns-examples {
    margin: 25px 0;
}

.pronouns-examples h4 {
    color: #1a5276;
    margin-bottom: 15px;
    font-size: 18px;
}

.example-item {
    background: #f8f9fa;
    padding: 15px;
    margin-bottom: 12px;
    border-radius: 6px;
    border-left: 4px solid #28a745;
}

.example-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.serbian-latin {
    font-weight: 600;
    color: #1a5276;
}

.serbian-cyrillic {
    color: #2874a6;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.russian {
    color: #495057;
    font-style: italic;
}

/* ===== СТИЛИ ДЛЯ СТРАНИЦЫ ЧИСЕЛ ===== */
.numbers-intro {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #2874a6;
}

.numbers-section {
    margin-bottom: 40px;
    padding: 25px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.numbers-section h3 {
    color: #1a5276;
    border-bottom: 2px solid #2874a6;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.numbers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.number-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.number-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: #2874a6;
}

.number {
    font-size: 24px;
    font-weight: bold;
    color: #1a5276;
    margin-bottom: 8px;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid #28a745;
}

.feature-item h4 {
    color: #1a5276;
    margin-bottom: 15px;
    font-size: 18px;
}

.feature-item ul {
    margin: 15px 0;
    padding-left: 20px;
}

.feature-item li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Стили для таблиц с числами */
.numbers-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.numbers-table th {
    background-color: #2874a6;
    color: white;
    font-weight: 500;
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #1a5276;
}

.numbers-table td {
    border: 1px solid #ddd;
    padding: 12px 8px;
    text-align: center;
    vertical-align: middle;
}

.numbers-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.numbers-table tr:hover {
    background-color: #e8f4fd;
}

.numbers-table td strong {
    color: #1a5276;
    font-weight: 600;
}

/* Стили для таблицы с примерами */
.examples-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.examples-table th {
    background-color: #28a745;
    color: white;
    font-weight: 500;
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #218838;
}

.examples-table td {
    border: 1px solid #ddd;
    padding: 12px 8px;
    text-align: left;
    vertical-align: top;
}

.examples-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.examples-table tr:hover {
    background-color: #e8f5e8;
}

.examples-table td strong {
    color: #1a5276;
    font-weight: 600;
}

/* Стили для таблицы с особенностями */
.features-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.features-table th {
    background-color: #6f42c1;
    color: white;
    font-weight: 500;
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #5a359a;
}

.features-table td {
    border: 1px solid #ddd;
    padding: 12px 8px;
    text-align: left;
    vertical-align: top;
}

.features-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.features-table tr:hover {
    background-color: #f3f0ff;
}

.features-table td strong {
    color: #6f42c1;
    font-weight: 600;
}

/* ===== СТИЛИ ДЛЯ СТРАНИЦЫ СУЩЕСТВИТЕЛЬНЫЕ ===== */
.nouns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.nouns-grid div {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

.nouns-grid h4 {
    margin-top: 0;
    color: #2c3e50;
}

/* ===== СТИЛИ ДЛЯ СТРАНИЦЫ ВРЕМЯ ===== */
.time-expressions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.time-expressions div {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

.time-expressions h4 {
    margin-top: 0;
    color: #2c3e50;
}


.particles-intro {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #2874a6;
}

.particles-section {
    margin-bottom: 40px;
    padding: 25px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.particles-section h3 {
    color: #1a5276;
    border-bottom: 2px solid #2874a6;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.particles-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.particles-table th {
    background-color: #6f42c1;
    color: white;
    font-weight: 500;
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #5a359a;
}

.particles-table td {
    border: 1px solid #ddd;
    padding: 10px 8px;
    text-align: left;
    vertical-align: top;
}

.particles-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.particles-table tr:hover {
    background-color: #f3f0ff;
}

.particles-table td strong {
    color: #6f42c1;
    font-weight: 600;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    /* Навигация */
    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }
    
    nav li {
        width: 100%;
        text-align: center;
    }
    
    nav a {
        padding: 12px 15px;
        margin: 1px 0;
    }
    
    .dropdown {
        width: 100%;
    }
    
    .dropdown-toggle {
        justify-content: center;
        padding-right: 15px;
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        background-color: #f8f9fa;
        border-radius: 0;
        margin-top: 5px;
    }
    
    .dropdown-link {
        padding: 12px 20px;
        border-left: none;
        border-bottom: 1px solid #e1e5e9;
    }
    
    .dropdown-link:hover,
    .dropdown-link.active {
        border-left: none;
        border-bottom: 2px solid #2874a6;
    }

    /* Общие стили */
    .alphabet-container {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .words-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .word-card {
        padding: 10px;
    }
    
    .case-actions {
        flex-direction: column;
    }
    
    .secondary-btn {
        margin-right: 0;
        margin-bottom: 10px;
        text-align: center;
    }

    .case-table {
        font-size: 14px;
        display: block;
        overflow-x: auto;
    }
    
    .case-table th, .case-table td {
        padding: 8px 6px;
    }
    
    .case-explanation {
        grid-template-columns: 1fr;
    }
    
    .case-form-container {
        padding: 15px;
    }
    
    .word-table, .sentence-table {
        font-size: 14px;
    }
    
    .word-table th, .word-table td,
    .sentence-table th, .sentence-table td {
        padding: 6px 3px;
    }
    
    .play-btn {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
    
    .delete-btn {
        padding: 3px 6px;
        font-size: 11px;
    }
    
    .audio-controls-compact {
        flex-direction: column;
        align-items: stretch;
    }
    
    .audio-controls-compact .lesson-select {
        margin-bottom: 8px;
    }
    
    .player-buttons {
        justify-content: center;
    }
    
    .audio-progress-compact {
        flex-direction: column;
        gap: 5px;
    }
    
    .pdf-container {
        height: calc(100vh - 200px);
    }

    /* Таблицы для мобильных */
    #pronouns table {
        font-size: 12px;
    }
    
    #pronouns th, #pronouns td {
        padding: 6px 3px;
    }
    
    #pronouns table {
        display: block;
        overflow-x: auto;
    }
    
    .example-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .example-item .play-btn {
        margin-top: 10px;
        align-self: flex-end;
    }

    #verb-biti table {
        font-size: 14px;
    }
    
    #verb-biti th, #verb-biti td {
        padding: 8px 5px;
    }

    /* Компактная клавиатура */
    .form-with-keyboard {
        flex-direction: column;
        gap: 20px;
    }
    
    .serbian-keyboard-compact {
        width: 100%;
        order: 2;
        margin-left: 0;
    }
    
    .keyboard-grid-compact {
        grid-template-columns: repeat(8, 1fr);
        gap: 5px;
    }
    
    .keyboard-key-tiny {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }
    
    .form-buttons-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .audio-upload-compact {
        justify-content: center;
    }
    
    .translate-btn-compact {
        width: 100%;
        justify-content: center;
    }

    /* Админка */
    .admin-words-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .admin-words-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .words-filter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .import-export-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .admin-words-table {
        font-size: 12px;
    }
    
    .admin-words-table th,
    .admin-words-table td {
        padding: 8px 4px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 3px;
    }
    
    .btn-edit, .btn-delete, .btn-audio {
        padding: 4px 6px;
        font-size: 11px;
    }
    
    .bulk-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .bulk-select-info {
        text-align: center;
        margin-right: 0;
    }
    
    .pagination {
        flex-wrap: wrap;
    }

    /* Админ-форма */
    .admin-container {
        padding: 15px;
        margin: 10px;
    }
    
    .admin-form .translate-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .admin-form .translate-btn {
        width: 100%;
        margin-top: 5px;
    }
    
    .preview-section {
        padding: 15px;
    }

    /* Таблицы */
    .editable-cases-table {
        font-size: 14px;
    }
    
    .editable-cases-table th,
    .editable-cases-table td {
        padding: 6px 4px;
    }
    
    .case-input {
        padding: 6px;
        font-size: 13px;
    }
    
    .definify-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .definify-input {
        min-width: auto;
    }
    
    .definify-links {
        flex-direction: column;
    }

    /* Местоимения и числа */
    .pronouns-section {
        padding: 15px;
        margin-bottom: 30px;
    }
    
    .pronouns-table {
        font-size: 14px;
        display: block;
        overflow-x: auto;
    }
    
    .pronouns-table th,
    .pronouns-table td {
        padding: 8px 6px;
    }
    
    .example-text {
        font-size: 14px;
    }
    
    .pronouns-explanation {
        padding: 15px;
    }

    .numbers-section {
        padding: 15px;
        margin-bottom: 30px;
    }
    
    .numbers-table,
    .examples-table,
    .features-table {
        font-size: 14px;
        display: block;
        overflow-x: auto;
    }
    
    .numbers-table th,
    .numbers-table td,
    .examples-table th,
    .examples-table td,
    .features-table th,
    .features-table td {
        padding: 8px 6px;
    }
    
    .numbers-intro {
        padding: 15px;
    }

    .numbers-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .number-card {
        padding: 12px;
    }
    
    .number {
        font-size: 20px;
    }
    
    .features {
        grid-template-columns: 1fr;
    }

    .particles-section {
        padding: 15px;
        margin-bottom: 30px;
    }
    
    .numbers-table,
    .examples-table {
        font-size: 12px;
        display: block;
        overflow-x: auto;
    }
    
    .numbers-table th,
    .numbers-table td,
    .examples-table th,
    .examples-table td {
        padding: 8px 6px;
    }
    
    .particles-intro {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .audio-player-section.compact {
        padding: 10px;
    }
    
    .pdf-container {
        height: calc(100vh - 180px);
        min-height: 300px;
    }
    
    .keyboard-row {
        justify-content: flex-start;
    }
    
    .keyboard-key {
        min-width: 45px;
        padding: 6px 8px;
        font-size: 12px;
    }

    .keyboard-grid-compact {
        grid-template-columns: repeat(8, 1fr);
        gap: 4px;
    }
    
    .keyboard-key-tiny {
        width: 32px;
        height: 32px;
        font-size: 11px;
        border-width: 1px;
    }

    /* Админка */
    .admin-words-container {
        padding: 10px;
    }
    
    .admin-words-stats {
        grid-template-columns: 1fr;
    }
    
    .words-management-section {
        padding: 15px;
    }
    
    .export-format-options {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    /* Таблицы */
    .pronouns-table {
        font-size: 12px;
    }
    
    .pronouns-table th,
    .pronouns-table td {
        padding: 6px 4px;
    }
    
    .example-item {
        padding: 12px;
    }
    
    .example-text {
        font-size: 13px;
    }

    .numbers-table,
    .examples-table,
    .features-table {
        font-size: 12px;
    }
    
    .numbers-table th,
    .numbers-table td,
    .examples-table th,
    .examples-table td,
    .features-table th,
    .features-table td {
        padding: 6px 4px;
    }
    
    .numbers-section {
        padding: 12px;
    }

    .numbers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .number-card {
        padding: 10px;
    }
    
    .serbian-latin,
    .serbian-cyrillic {
        font-size: 14px;
    }

    .numbers-table,
    .examples-table {
        font-size: 11px;
    }
    
    .numbers-table th,
    .numbers-table td,
    .examples-table th,
    .examples-table td {
        padding: 6px 4px;
    }
    
    .particles-section {
        padding: 12px;
    }
}

/* ===== УВЕДОМЛЕНИЕ ДЛЯ iOS ДЛЯ ВСЕХ PDF СТРАНИЦ ===== */
.ios-pdf-notice {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border: 2px solid #2196f3;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

.ios-pdf-notice .notice-content h4 {
    color: #1976d2;
    margin-bottom: 10px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ios-pdf-notice .notice-content p {
    color: #424242;
    margin-bottom: 15px;
    line-height: 1.5;
}

.ios-pdf-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.ios-pdf-actions .pdf-btn {
    flex: 1;
    min-width: 200px;
    text-align: center;
    justify-content: center;
    font-weight: 600;
}

/* Адаптивность для уведомления */
@media (max-width: 768px) {
    .ios-pdf-notice {
        padding: 15px;
        margin: 15px 0;
    }
    
    .ios-pdf-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .ios-pdf-actions .pdf-btn {
        min-width: auto;
        width: 100%;
    }
    
    .ios-pdf-notice .notice-content h4 {
        font-size: 16px;
    }
}

#play-verb-audio {
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#play-verb-audio:hover:not(:disabled) {
    background-color: #8e44ad !important;
    transform: translateY(-1px);
}

#play-verb-audio:active:not(:disabled) {
    transform: translateY(0);
}

#play-verb-audio:disabled {
    opacity: 0.7;
    cursor: wait;
}

// Добавим немного CSS для стилизации результатов поиска

.search-result-item:hover {
    background-color: #f8f9fa !important;
}

#search-results {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1000;
}

#search-clear:hover {
    color: #e74c3c;
}

/* Стили для скроллбара */
#search-results::-webkit-scrollbar {
    width: 8px;
}

#search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#search-results::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

#search-results::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}