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

:root {
    /* New Color Palette */
    --bg-primary: #23262E;         /* Background */
    --bg-secondary: #2A2D35;      /* Secondary Background */
    --bg-tertiary: #3A3D45;       /* Tertiary Background */
    --accent-primary: #C74DED;     /* Purple */
    --accent-secondary: #00E8C6;  /* Cyan */
    --accent-tertiary: #EE5D43;    /* Red */
    --accent-pink: #FF00AA;        /* Pink */
    --accent-hot-pink: #F92672;    /* Hot Pink */
    --accent-purple: #C74DED;      /* Purple */
    --accent-red: #EE5D43;         /* Red */
    --accent-yellow: #FFE66D;      /* Yellow */
    --accent-blue: #7CB7FF;        /* Blue */
    --accent-green: #96E072;       /* Green */
    --accent-orange: #F39C12;      /* Orange */
    --accent-orange-dark: #E67E22; /* Dark Orange */
    --text-primary: #D5CED9;       /* Foreground (Text) */
    --text-secondary: #00E8C6;     /* Cyan */
    --text-muted: #A0A1A7CC;       /* Comment */
    --border-color: #3A3D45;       /* Border */
    --shadow: 0 8px 32px rgba(35, 38, 46, 0.4);
    --shadow-hover: 0 12px 40px rgba(35, 38, 46, 0.6);
    --gradient-primary: #C74DED;
    --gradient-secondary: #00E8C6;
    --gradient-bg: #23262E;
}

body {
    font-family: 'Ubuntu', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.container {
    max-width: 100%;
    margin: 0;
    padding: 12px;
}

/* Идеальная компактная верстка текста песни */
.text-content {
    background: rgba(42, 45, 53, 0.9);
    backdrop-filter: blur(20px);
    padding: 20px 32px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.song-lines {
    font-family: 'Cascadia Code', 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Source Code Pro', monospace;
    font-size: 0.85em;
    line-height: 1.3;
    display: block;
    column-count: 1;
    column-gap: 0.8em;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
}

.song-line {
    display: block;
    margin-bottom: 0.6em;
    position: relative;
    padding-left: 20px;
    break-inside: avoid;
}


.chords-line {
    font-size: 0.8em;
    color: var(--accent-yellow);
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
    white-space: pre-wrap;
    display: block;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

.lyrics-line {
    font-size: 0.9em;
    color: var(--accent-green);
    font-weight: 400;
    line-height: 1.2;
    margin: 0;
    white-space: pre-wrap;
    display: block;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

.notes-line {
    font-size: 0.75em;
    color: rgba(199, 77, 237, 0.7);
    font-style: italic;
    font-weight: 300;
    line-height: 1.2;
    margin: 0;
    white-space: pre-wrap;
    display: block;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

/* Удалено - стили для легенды больше не нужны */

/* Инструкции по выравниванию */
.alignment-help {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1em;
    margin: 1em 0;
}

.alignment-help h4 {
    color: var(--text-primary);
    margin-bottom: 0.5em;
    font-size: 0.9em;
    font-weight: 600;
}

.help-example {
    font-family: 'Cascadia Code', 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Source Code Pro', monospace;
    margin: 0.5em 0;
    line-height: 1.2;
}

.example-chords {
    color: var(--accent-secondary);
    font-weight: 600;
    font-size: 0.9em;
    white-space: pre;
}

.example-lyrics {
    color: var(--text-primary);
    font-size: 1em;
    white-space: pre;
}

.alignment-help p {
    color: var(--text-secondary);
    font-size: 0.8em;
    margin-top: 0.5em;
}

/* Стили для редактирования */
.lines-container {
    margin-top: 2em;
}

.line-editor {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5em;
    margin-bottom: 1em;
    display: flex;
    align-items: flex-start;
    gap: 1em;
}

.line-editor.compact {
    padding: 0.8em;
    margin-bottom: 0.5em;
    align-items: center;
}

.line-number {
    font-family: 'Cascadia Code', 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Source Code Pro', monospace;
    font-weight: bold;
    color: var(--accent-primary);
    font-size: 0.9em;
    min-width: 2em;
    text-align: center;
    background: var(--bg-tertiary);
    border-radius: 4px;
    padding: 0.3em 0.5em;
}

.line-fields {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.line-fields.compact {
    flex-direction: column;
    gap: 0.3em;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.field-group label {
    font-size: 0.9em;
    color: var(--text-primary);
    font-weight: 500;
}

.chords-input,
.lyrics-input,
.notes-input {
    font-family: 'Cascadia Code', 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Source Code Pro', monospace;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.75em;
    color: var(--text-primary);
    font-size: 0.95em;
    transition: all 0.3s ease;
}

.chords-input.compact,
.lyrics-input.compact,
.notes-input.compact {
    padding: 0.5em;
    font-size: 0.9em;
    width: 100%;
}

.chords-input {
    color: var(--accent-secondary);
    font-weight: 600;
}

.lyrics-input {
    color: var(--text-primary);
    font-weight: 400;
}

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

.chords-input:focus,
.lyrics-input:focus,
.notes-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.2);
}

/* Кнопки добавления */
.add-buttons {
    display: flex;
    gap: 1em;
    margin-top: 1em;
    justify-content: center;
}

/* Контейнер для кнопок вставки между строками */
.insert-line-container {
    display: flex;
    justify-content: center;
    margin: 0.5em 0;
    padding: 0.3em 0;
}

/* Кнопка вставки между строками */
.btn-insert {
    background: var(--accent-secondary);
    color: var(--bg-primary);
    border: 1px solid var(--accent-secondary);
    border-radius: 50%;
    height: 12px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 232, 198, 0.3);
    opacity: 0.7;
}

.btn-insert:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(199, 77, 237, 0.4);
    opacity: 1;
    transform: scale(1.1);
}

.btn-insert .material-icons {
    font-size: 18px;
    margin: 0;
}

/* Анимация появления кнопки вставки */
.insert-line-container {
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Точное выравнивание аккордов */
.chord-alignment {
    font-family: 'Cascadia Code', 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Source Code Pro', monospace;
    font-size: 0.9em;
    color: var(--accent-secondary);
    font-weight: 600;
    letter-spacing: 0.05em;
    white-space: pre;
    line-height: 1;
    margin-bottom: 0.1em;
    min-height: 1.2em;
}

.lyrics-alignment {
    font-family: 'Cascadia Code', 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Source Code Pro', monospace;
    font-size: 1.1em;
    color: var(--text-primary);
    font-weight: 400;
    letter-spacing: 0.02em;
    white-space: pre;
    line-height: 1;
    margin-bottom: 0.1em;
    min-height: 1.2em;
}

/* Специальные символы для выравнивания */
.chord-space {
    display: inline-block;
    width: 0.6em; /* Ширина одного символа в моноширинном шрифте */
    height: 1em;
}

.chord-text {
    display: inline-block;
    min-width: 0.6em;
    text-align: center;
}

/* Стили для суфлера */
.souffleur-content .song-lines {
    font-size: 1.5em;
    line-height: 1.4;
}

.souffleur-content .chords-line {
    font-size: 1.3em;
    margin-bottom: 0.2em;
}

.souffleur-content .lyrics-line {
    font-size: 1.5em;
    margin-bottom: 0.2em;
}

.souffleur-content .notes-line {
    font-size: 1.1em;
    margin-bottom: 0.3em;
}

/* Мобильная оптимизация для суфлера */
@media (max-width: 767px) {
    .souffleur-content {
        padding: 20px 5%;
        font-size: 1.8em; /* Уменьшаем базовый размер шрифта */
    }
    
    .souffleur-content .song-lines {
        font-size: 1.8em;
        line-height: 1.4;
    }
    
    .souffleur-content .chords-line {
        font-size: 1.5em;
        margin-bottom: 0.2em;
    }
    
    .souffleur-content .lyrics-line {
        font-size: 1.8em;
        margin-bottom: 0.2em;
    }
    
    .souffleur-content .notes-line {
        font-size: 1.3em;
        margin-bottom: 0.3em;
    }
    
    .souffleur-header {
        padding: 8px 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    .souffleur-header h1 {
        font-size: 1.2rem;
        text-align: center;
    }
    
    .souffleur-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .souffleur-controls .btn {
        padding: 6px 10px;
        font-size: 11px;
    }
}

/* Навигация - Andromeda Style */
.navbar {
    background: rgba(42, 45, 53, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.nav-brand {
    font-size: 1.75rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--accent-green);
    transition: all 0.3s ease;
    letter-spacing: -0.02em;
}

.nav-brand:hover {
    color: var(--accent-yellow);
}

.nav-brand .material-icons {
    font-size: 1.2em;
    vertical-align: middle;
    margin-right: 8px;
}

.nav-menu {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--accent-green);
    padding: 12px 20px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--accent-yellow);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.nav-link:hover {
    color: var(--bg-primary);
    background: var(--accent-yellow);
    border-color: var(--accent-yellow);
}

.nav-link:hover::before {
    opacity: 0;
}

.nav-link i,
.nav-link .material-icons {
    margin-right: 8px;
    font-size: 0.9em;
    vertical-align: middle;
}

.nav-link .material-icons {
    font-size: 1.1em;
}

/* Кнопки - Modern Darkula Pro Style */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border: none;
    border-radius: 16px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
    backdrop-filter: blur(10px);
    border: 1px solid transparent;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn:hover::before {
    transform: translateX(100%);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--bg-primary);
    box-shadow: 0 4px 20px rgba(199, 77, 237, 0.3);
}

.btn-primary:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(199, 77, 237, 0.3);
}

.btn-secondary {
    background: rgba(58, 61, 69, 0.8);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(199, 77, 237, 0.3);
}

.btn-edit {
    background: var(--gradient-secondary);
    color: var(--bg-primary);
    box-shadow: 0 4px 20px rgba(0, 232, 198, 0.3);
}

.btn-edit:hover {
    border-color: var(--accent-pink);
    box-shadow: 0 0 0 2px rgba(255, 0, 170, 0.3);
}

.btn-danger {
    background: var(--accent-red);
    color: var(--bg-primary);
    box-shadow: 0 4px 20px rgba(238, 93, 67, 0.3);
}

.btn-danger:hover {
    border-color: var(--accent-red);
    box-shadow: 0 0 0 2px rgba(238, 93, 67, 0.3);
}

.btn-sm {
    padding: 10px 16px;
    font-size: 13px;
    border-radius: 12px;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Стили для Material Icons в кнопках */
.btn .material-icons {
    font-size: 1.1em;
    vertical-align: middle;
    margin-right: 6px;
    display: inline-block;
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

.btn .material-icons:only-child {
    margin-right: 0;
}

/* Выравнивание кнопок по левому краю по умолчанию */
.btn {
    justify-content: flex-start;
    text-align: left;
}

/* Исключение для кнопок с классом btn-full */
.btn-full {
    justify-content: center;
    text-align: center;
}

/* Сетка текстов - Modern Cards */
.texts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 32px;
    justify-content: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.text-card {
    background: rgba(42, 45, 53, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.text-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.text-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(199, 77, 237, 0.3);
}

.text-card:hover::before {
    transform: scaleX(1);
}

.text-card-header {
    margin-bottom: 20px;
}

.text-card-header h3 {
    margin-bottom: 16px;
    color: var(--accent-green);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.text-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

/* Стили для кнопок в сетке карточек */
.text-actions .btn {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    padding: 12px 16px;
    font-size: 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.text-actions .btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-secondary);
    box-shadow: none;
}

.text-card-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    line-height: 1.4;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.meta-item .material-icons {
    font-size: 0.8em;
    color: var(--accent-secondary);
    opacity: 0.8;
}

/* Кнопки структуры песни */
.section-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    gap: 4px;
    margin: 8px 0;
    width: 80px;
}

.section-btn {
    padding: 4px 6px;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
}

.section-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent-color);
}

.section-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.section-btn.active:hover {
    background: #0056b3;
    border-color: #0056b3;
}

/* Выровненные индикаторы секций */
.section-indicator {
    position: absolute;
    left: -12px;
    top: 0.5em;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    font-weight: bold;
    color: white;
    z-index: 1;
}

.section-indicator.verse {
    background: #4CAF50;
}

.section-indicator.chorus {
    background: #2196F3;
}

.section-indicator.bridge {
    background: #FF9800;
}

.section-indicator.intro {
    background: #9C27B0;
}

.section-indicator.outro {
    background: #E91E63;
}

/* Едва заметная фоновая индикация секций */
.song-line.verse {
    background: linear-gradient(90deg, rgba(76, 175, 80, 0.08) 0%, transparent 100%);
    border-left: 4px solid rgba(76, 175, 80, 0.4);
    border-radius: 0 8px 8px 0;
    margin-left: -2px;
    padding-left: 8px;
}

.song-line.chorus {
    background: linear-gradient(90deg, rgba(33, 150, 243, 0.08) 0%, transparent 100%);
    border-left: 4px solid rgba(33, 150, 243, 0.4);
    border-radius: 0 8px 8px 0;
    margin-left: -2px;
    padding-left: 8px;
}

.song-line.bridge {
    background: linear-gradient(90deg, rgba(255, 152, 0, 0.08) 0%, transparent 100%);
    border-left: 4px solid rgba(255, 152, 0, 0.4);
    border-radius: 0 8px 8px 0;
    margin-left: -2px;
    padding-left: 8px;
}

.song-line.intro {
    background: linear-gradient(90deg, rgba(156, 39, 176, 0.08) 0%, transparent 100%);
    border-left: 4px solid rgba(156, 39, 176, 0.4);
    border-radius: 0 8px 8px 0;
    margin-left: -2px;
    padding-left: 8px;
}

.song-line.outro {
    background: linear-gradient(90deg, rgba(233, 30, 99, 0.12) 0%, transparent 100%);
    border-left: 4px solid rgba(233, 30, 99, 0.6);
    border-radius: 0 8px 8px 0;
    margin-left: -2px;
    padding-left: 8px;
}

/* Дополнительная индикация для суфлера */
.souffleur-content .song-line.verse {
    background: linear-gradient(90deg, rgba(76, 175, 80, 0.12) 0%, transparent 100%);
    border-left: 6px solid rgba(76, 175, 80, 0.5);
    border-radius: 0 12px 12px 0;
    margin-left: -3px;
    padding-left: 12px;
}

.souffleur-content .song-line.chorus {
    background: linear-gradient(90deg, rgba(33, 150, 243, 0.12) 0%, transparent 100%);
    border-left: 6px solid rgba(33, 150, 243, 0.5);
    border-radius: 0 12px 12px 0;
    margin-left: -3px;
    padding-left: 12px;
}

.souffleur-content .song-line.bridge {
    background: linear-gradient(90deg, rgba(255, 152, 0, 0.12) 0%, transparent 100%);
    border-left: 6px solid rgba(255, 152, 0, 0.5);
    border-radius: 0 12px 12px 0;
    margin-left: -3px;
    padding-left: 12px;
}

.souffleur-content .song-line.intro {
    background: linear-gradient(90deg, rgba(156, 39, 176, 0.12) 0%, transparent 100%);
    border-left: 6px solid rgba(156, 39, 176, 0.5);
    border-radius: 0 12px 12px 0;
    margin-left: -3px;
    padding-left: 12px;
}

.souffleur-content .song-line.outro {
    background: linear-gradient(90deg, rgba(233, 30, 99, 0.15) 0%, transparent 100%);
    border-left: 6px solid rgba(233, 30, 99, 0.7);
    border-radius: 0 12px 12px 0;
    margin-left: -3px;
    padding-left: 12px;
}

/* Пустое состояние - Modern */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
    background: rgba(42, 45, 53, 0.5);
    border-radius: 24px;
    border: 2px dashed var(--border-color);
    margin: 40px 0;
    backdrop-filter: blur(10px);
}


.empty-state h3 {
    margin-bottom: 16px;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.empty-state p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 32px;
    color: var(--text-secondary);
}

.empty-state .btn .material-icons {
    font-size: 1.2em;
    margin-right: 8px;
    display: inline-block;
    vertical-align: middle;
    color: var(--bg-primary);
    opacity: 1;
}

/* Просмотр текста - Modern Reader */
.text-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 20px;
    padding: 32px;
    background: rgba(42, 45, 53, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 0;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    width: 100%;
}

/* Скрытие навбара в окне просмотра текста */
body.view-text .navbar {
    display: none;
}

/* Компактный text-header для окна просмотра */
body.view-text .text-header {
    padding: 8px 16px;
    margin-bottom: 16px;
    border-radius: 8px;
    background: rgba(42, 45, 53, 0.6);
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 50px;
}

body.view-text .text-header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 16px;
    width: 100%;
}

body.view-text .text-header-main h1 {
    font-size: 1.2rem;
    margin: 0;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}


body.view-text .info-item {
    font-size: 0.85rem;
    gap: 6px;
}

body.view-text .text-header-main .text-actions {
    display: flex;
    flex-direction: row;
    gap: 4px;
    margin: 0;
    justify-content: flex-end;
    flex-wrap: nowrap;
    align-items: center;
    flex-shrink: 0;
    white-space: nowrap;
    margin-left: auto;
}

body.view-text .text-header-main .text-actions .btn {
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0 !important;
    border-radius: 4px;
    min-width: 32px;
    width: 32px;
    height: 32px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1;
    gap: 0 !important;
}

body.view-text .text-header-main .text-actions .btn .material-icons {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 16px !important;
    line-height: 1;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center;
    width: 100%;
    height: 100%;
}

/* Адаптация для средних экранов */
@media (max-width: 800px) and (min-width: 769px) {
    body.view-text .text-header-main h1 {
        font-size: 1.1rem;
    }
    
    body.view-text .text-header-main .text-actions .btn {
        min-width: 30px;
        width: 30px;
        height: 30px;
    }
    
    body.view-text .text-header-main .text-actions .btn .material-icons {
        font-size: 15px !important;
    }
}

/* Скрытие кнопок кроме "Назад" на узких экранах */
@media (max-width: 768px) {
    body.view-text .text-header-main {
        flex-wrap: nowrap;
    }
    
    body.view-text .text-header {
        min-height: 40px;
    }
    
    body.view-text .text-header-main h1 {
        font-size: 1rem;
        flex: 1;
        min-width: 0;
    }
    
    body.view-text .text-header-main .text-actions .btn:not(.btn-secondary) {
        display: none;
    }
    
    body.view-text .text-header-main .text-actions {
        justify-content: flex-end;
        flex-shrink: 0;
    }
    
    body.view-text .text-header-main .text-actions .btn-secondary {
        flex: none;
        min-width: 28px;
        width: 28px;
        height: 28px;
    }
    
    body.view-text .text-header-main .text-actions .btn .material-icons {
        font-size: 14px !important;
    }
    
}

.text-header h1 {
    color: var(--accent-primary);
    flex: 1;
    min-width: 200px;
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.song-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 16px 0;
    padding: 8px 32px;
    background: rgba(58, 61, 69, 0.4);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    width: 100%;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.info-item .material-icons {
    color: var(--accent-secondary);
    font-size: 1rem;
}

.info-item strong {
    color: var(--accent-primary);
    font-weight: 600;
}




/* Адаптивные колонки - последовательное заполнение */
@media (min-width: 768px) {
    .song-lines {
        column-count: 2;
        column-gap: 0.8em;
    }
}

@media (max-width: 767px) {
    .container {
        padding: 8px;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .song-info {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .song-lines {
        column-count: 1;
        font-size: clamp(0.7em, 2.5vw, 1.1em); /* Динамический размер шрифта */
        line-height: 1.4;
    }
    
    .chords-line {
        font-size: clamp(0.7em, 2.5vw, 1.1em); /* Динамический размер аккордов */
        margin-bottom: 0.2em;
    }
    
    .lyrics-line {
        font-size: clamp(0.7em, 2.5vw, 1.1em); /* Динамический размер текста */
        margin-bottom: 0.2em;
    }
    
    .notes-line {
        font-size: clamp(0.6em, 2vw, 0.9em); /* Динамический размер заметок */
        margin-bottom: 0.3em;
    }
    
    .text-content {
        padding: 12px 16px;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .song-line {
        padding-left: 12px;
        margin-bottom: 0.8em;
        max-width: 100%;
    }
    
    .section-indicator {
        left: -8px;
        top: 0.4em;
        width: 8px;
        height: 8px;
        font-size: 5px;
    }
}


.text-section {
    margin-bottom: 40px;
}

.section-title {
    color: var(--accent-secondary);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--accent-primary);
}

.text-paragraph {
    margin-bottom: 20px;
    line-height: 1.9;
    text-align: justify;
    color: var(--text-primary);
    font-size: 1.1rem;
    letter-spacing: 0.01em;
}

/* Мобильная навигация - Modern Floating */
.mobile-nav {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 50;
}

.nav-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: var(--bg-primary);
    border: none;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(199, 77, 237, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(199, 77, 237, 0.2);
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.nav-btn:hover {
    background: var(--accent-secondary);
    box-shadow: 0 0 0 2px rgba(0, 232, 198, 0.3);
}

.nav-btn:hover::before {
    transform: translateX(100%);
}

.nav-btn:active {
    transform: scale(1.05);
}

.nav-btn .material-icons {
    font-size: 1.2em;
    vertical-align: middle;
}

/* Суфлер - Andromeda Theme */
.souffleur-container {
    min-height: 100vh;
    background: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    position: relative;
}

.souffleur-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(199, 77, 237, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.souffleur-header {
    background: rgba(42, 45, 53, 0.9);
    backdrop-filter: blur(20px);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--border-color);
}

.souffleur-header h1 {
    color: var(--accent-primary);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.souffleur-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.souffleur-controls .btn {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 12px;
}

.souffleur-content {
    flex: 1;
    padding: 60px 5%;
    font-size: 28px;
    line-height: 1.8;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 2;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.souffleur-section {
    margin-bottom: 60px;
}

.souffleur-section-title {
    color: var(--accent-secondary);
    margin-bottom: 32px;
    font-size: 2.2em;
    text-align: center;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: 0 0 20px rgba(0, 232, 198, 0.3);
}

.souffleur-paragraph {
    margin-bottom: 32px;
    text-align: center;
    padding: 0 40px;
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(40, 42, 54, 0.5);
}

.souffleur-nav {
    position: fixed;
    bottom: 32px;
    right: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 50;
}

.souffleur-nav-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: var(--bg-primary);
    border: none;
    font-size: 22px;
    cursor: pointer;
    backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(199, 77, 237, 0.2);
    box-shadow: 0 8px 32px rgba(199, 77, 237, 0.4);
    position: relative;
    overflow: hidden;
}

.souffleur-nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.souffleur-nav-btn:hover {
    background: var(--accent-secondary);
    box-shadow: 0 0 0 2px rgba(0, 232, 198, 0.3);
}

.souffleur-nav-btn:hover::before {
    transform: translateX(100%);
}

.souffleur-nav-btn .material-icons {
    font-size: 1.2em;
    vertical-align: middle;
}

/* Форма входа - Modern Auth */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 120px);
    padding: 40px 20px;
}

.login-card {
    background: rgba(42, 45, 53, 0.9);
    backdrop-filter: blur(20px);
    padding: 48px;
    border-radius: 24px;
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 420px;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 24px 24px 0 0;
}

.login-card h2 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--accent-primary);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.login-form {
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--accent-secondary);
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    background: rgba(42, 45, 53, 0.8);
    color: var(--text-primary);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(199, 77, 237, 0.2);
    background: rgba(42, 45, 53, 1);
}

.login-info {
    background: rgba(199, 77, 237, 0.1);
    border: 1px solid rgba(199, 77, 237, 0.3);
    padding: 20px;
    border-radius: 12px;
    font-size: 14px;
    color: var(--text-secondary);
    backdrop-filter: blur(10px);
}

.login-info code {
    background: rgba(199, 77, 237, 0.2);
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'Cascadia Code', 'SF Mono', Monaco, 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-weight: 600;
    color: var(--accent-primary);
}

/* Редактор */
.edit-container {
    max-width: 1500px; /* Увеличиваем для новой схемы */
    margin: 0 auto;
}

/* Новая схема: пусто | edit-header | пусто (верхняя строка) */
/* chord-keyboard | edit-form | legend (нижняя строка) */
.edit-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Верхняя строка: пусто | edit-header | пусто */
.edit-header-row {
    display: grid;
    grid-template-columns: 1fr 1000px 1fr;
    gap: 2rem;
    align-items: center;
}

.empty-column {
    /* Пустые колонки для выравнивания - используются для центрирования заголовка */
    min-height: 1px;
}

.edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0 !important;
    box-sizing: border-box;
}

/* Только форма редактирования по центру */
.edit-content-row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.edit-form {
    width: 1000px; /* Фиксированная ширина формы */
    flex-shrink: 0;
}

/* Удалено - клавиатура аккордов и легенда больше не используются */

/* Удалено - стили для клавиатуры аккордов больше не нужны */

/* Удалено - дублирующиеся стили */

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .edit-container {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .edit-layout {
        gap: 1rem;
    }
    
    /* Мобильная версия: все в одну колонку */
    .edit-header-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .edit-content-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .edit-form {
        width: 100%;
    }
}

.edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
    padding: 24px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.edit-header h1 {
    flex: 1;
    text-align: center;
    margin: 0;
    color: var(--accent-green);
    font-size: 1.8rem;
    font-weight: 700;
}

.edit-form {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.edit-form .form-group {
    margin-bottom: 16px;
}

.edit-form .form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: var(--accent-green);
    font-size: 0.9rem;
    line-height: 1.2;
}

.edit-form .form-group input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

/* Горизонтальное расположение для обычных полей формы */
.edit-form .form-group.horizontal {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.edit-form .form-group.horizontal label {
    margin-bottom: 0;
    min-width: 100px;
    flex-shrink: 0;
    order: 1;
    text-align: right;
    padding-right: 12px;
}

.edit-form .form-group.horizontal input {
    width: 200px;
    flex-shrink: 0;
    order: 2;
}

.edit-form .form-group input:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 2px rgba(150, 224, 114, 0.2);
}

/* Компактный блок формы */
.form-header {
    background: rgba(58, 61, 69, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-header .form-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

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

.form-header .form-group label {
    font-size: 0.85rem;
    margin-bottom: 0;
    color: var(--accent-secondary);
    min-width: 100px;
    flex-shrink: 0;
    text-align: left;
    font-weight: 500;
}

.form-header .form-group input {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 4px;
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-header .form-group input:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 2px rgba(150, 224, 114, 0.2);
}

.form-header .form-group input:hover {
    border-color: var(--accent-secondary);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .form-header {
        padding: 12px;
        gap: 10px;
    }
    
    .form-header .form-group {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    
    .form-header .form-group label {
        min-width: auto;
        text-align: left;
        font-size: 0.8rem;
    }
    
    .form-header .form-group input {
        min-width: auto;
        max-width: none;
        width: 100%;
    }
}


/* Специальные стили для кнопок в окне редактирования */
.edit-header .btn-primary {
    background: var(--accent-green);
    color: var(--bg-primary);
    box-shadow: 0 4px 20px rgba(150, 224, 114, 0.3);
}

.edit-header .btn-primary:hover {
    background: var(--accent-green);
    border-color: var(--accent-green);
    box-shadow: 0 4px 20px rgba(150, 224, 114, 0.3);
}

.edit-header .btn-secondary {
    background: var(--accent-red);
    color: var(--bg-primary);
    box-shadow: 0 4px 20px rgba(238, 93, 67, 0.3);
}

.edit-header .btn-secondary:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
    box-shadow: 0 4px 20px rgba(238, 93, 67, 0.3);
}

/* Одинаковые размеры кнопок в заголовке */
.edit-header .btn {
    min-width: 140px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Выравнивание кнопок по размеру */
.edit-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.edit-actions .btn {
    width: 140px;
    height: 48px;
    justify-content: center;
    text-align: center;
    display: flex;
    align-items: center;
}

.sections-container {
    margin-bottom: 20px;
}

.section-editor {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    background: var(--bg-tertiary);
}

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

.section-title {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    margin-right: 10px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.paragraphs-container {
    margin-left: 20px;
}

.paragraph-editor {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: flex-start;
}

.paragraph-text {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    min-height: 80px;
    resize: vertical;
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Flash сообщения - Modern Notifications */
.flash-messages {
    margin: 24px 0;
    position: relative;
    z-index: 10;
}

.flash-message {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.9) 0%, rgba(25, 135, 84, 0.9) 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    border: 1px solid rgba(40, 167, 69, 0.3);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(40, 167, 69, 0.3);
    font-weight: 600;
    animation: slideInFromTop 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 12px;
}

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

/* Мобильная навигация - только иконки на узких экранах */
@media (max-width: 768px) {
    .nav-link {
        padding: 8px;
        min-width: 40px;
        justify-content: center;
        text-align: center;
        position: relative;
    }
    
    .nav-link span:not(.material-icons) {
        display: none;
    }
    
    .nav-link .material-icons {
        margin-right: 0;
        font-size: 1.2em;
    }
    
    .nav-brand {
        font-size: 1.2rem;
    }
    
    .nav-brand span:not(.material-icons) {
        display: none;
    }
    
    .nav-brand .material-icons {
        margin-right: 0;
        font-size: 1.4em;
    }
    
    .nav-menu {
        gap: 4px;
    }
    
    /* Улучшенные tooltip для мобильных устройств */
    .nav-link[title]:hover::after,
    .nav-brand[title]:hover::after {
        content: attr(title);
        position: absolute;
        bottom: -35px;
        left: 50%;
        transform: translateX(-50%);
        background: var(--bg-tertiary);
        color: var(--text-primary);
        padding: 6px 12px;
        border-radius: 6px;
        font-size: 0.8rem;
        white-space: nowrap;
        z-index: 1000;
        border: 1px solid var(--border-color);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        pointer-events: none;
    }
    
    .nav-link[title]:hover::before,
    .nav-brand[title]:hover::before {
        content: '';
        position: absolute;
        bottom: -8px;
        left: 50%;
        transform: translateX(-50%);
        border: 5px solid transparent;
        border-bottom-color: var(--bg-tertiary);
        z-index: 1000;
        pointer-events: none;
    }
}

/* Очень узкие экраны - еще более компактная навигация */
@media (max-width: 480px) {
    .nav-container {
        padding: 0 12px;
        height: 56px;
    }
    
    .nav-link {
        padding: 6px;
        min-width: 36px;
        border-radius: 8px;
    }
    
    .nav-link .material-icons {
        font-size: 1.1em;
    }
    
    .nav-brand {
        font-size: 1rem;
    }
    
    .nav-brand .material-icons {
        font-size: 1.3em;
    }
    
    .nav-menu {
        gap: 2px;
    }
}

/* Адаптивность */
@media (min-width: 1200px) {
    .texts-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1000px;
    }
}

@media (max-width: 1024px) {
    .text-card .text-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .texts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .text-card .text-actions {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .text-card .text-actions .btn {
        padding: 8px;
        font-size: 12px;
        justify-content: center;
        text-align: center;
    }
    
    .text-card .text-actions .btn .material-icons {
        margin-right: 0;
    }
    
    .text-card .text-actions .btn span:not(.material-icons) {
        display: none;
    }
    
    .text-card-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .meta-item {
        font-size: 0.8rem;
    }
    
    .text-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .text-header .text-actions {
        grid-template-columns: 1fr;
        justify-content: center;
    }
    
    .souffleur-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .souffleur-controls {
        justify-content: center;
    }
    
    .souffleur-content {
        padding: 20px;
        font-size: 20px;
    }
    
    .edit-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .section-title {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .paragraph-editor {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .nav-container {
        flex-direction: row;
        height: 64px;
        padding: 0 20px;
        justify-content: space-between;
    }
    
    .nav-menu {
        margin-top: 0;
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 4px;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .nav-brand {
        font-size: 1.4rem;
    }
    
    .texts-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .text-card .text-actions {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .text-card .text-actions .btn {
        padding: 6px;
        font-size: 10px;
    }
    
    .text-content {
        padding: 20px;
    }
    
    .souffleur-content {
        padding: 15px 5%;
        font-size: 1.6em; /* Уменьшаем для очень маленьких экранов */
    }
    
    .souffleur-content .song-lines {
        font-size: 1.6em;
    }
    
    .souffleur-content .chords-line {
        font-size: 1.3em;
    }
    
    .souffleur-content .lyrics-line {
        font-size: 1.6em;
    }
    
    .souffleur-content .notes-line {
        font-size: 1.2em;
    }
    
    .mobile-nav {
        bottom: 10px;
        right: 10px;
    }
    
    .nav-btn {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    /* Дополнительные стили для text-header на очень узких экранах */
    body.view-text .text-header {
        padding: 6px 12px;
        min-height: 36px;
    }
    
    body.view-text .text-header-main h1 {
        font-size: 0.9rem;
    }
    
    body.view-text .text-header-main .text-actions .btn-secondary {
        min-width: 24px;
        width: 24px;
        height: 24px;
    }
    
    body.view-text .text-header-main .text-actions .btn .material-icons {
        font-size: 12px !important;
    }
    
    /* Уменьшаем размер шрифта для обычного просмотра на очень маленьких экранах */
    .song-lines {
        font-size: clamp(0.6em, 2vw, 1.0em);
    }
    
    .chords-line {
        font-size: clamp(0.7em, 2.5vw, 1.1em);
    }
    
    .lyrics-line {
        font-size: clamp(0.6em, 2vw, 1.0em);
    }
    
    .notes-line {
        font-size: clamp(0.5em, 1.5vw, 0.8em);
    }
    
    .text-content {
        padding: 10px 12px;
    }
}

/* Полноэкранный режим */
@media (orientation: landscape) and (max-height: 500px) {
    .souffleur-header {
        padding: 10px 20px;
    }
    
    .souffleur-content {
        padding: 20px;
        font-size: 20px;
    }
}

/* Дополнительные современные эффекты */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Анимация появления карточек */
.text-card {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-card:nth-child(1) { animation-delay: 0.1s; }
.text-card:nth-child(2) { animation-delay: 0.2s; }
.text-card:nth-child(3) { animation-delay: 0.3s; }
.text-card:nth-child(4) { animation-delay: 0.4s; }
.text-card:nth-child(5) { animation-delay: 0.5s; }

/* Эффект загрузки для кнопок */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Улучшенная прокрутка */
html {
    scroll-behavior: smooth;
}

/* Скрытие скроллбара для webkit браузеров */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* Эффект печати для текста */
.typing-effect {
    overflow: hidden;
    border-right: 2px solid var(--accent-primary);
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--accent-primary); }
}

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

.modal-content {
    background: var(--bg-secondary);
    margin: 5% auto;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-tertiary);
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.2em;
    font-weight: 600;
}

.close {
    color: var(--text-muted);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

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

.modal-body {
    padding: 25px;
}

.modal-body p {
    margin-bottom: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.modal-body textarea {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Cascadia Code', 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 14px;
    line-height: 1.4;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal-body textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.2);
}

.paste-options {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.paste-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
}

.paste-options input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--bg-tertiary);
    border-radius: 0 0 12px 12px;
}

.modal-footer .btn {
    min-width: 120px;
}

/* Стили для админ-панели */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.admin-header h1 {
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 600;
}

.users-table {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    color: var(--text-primary);
}

.table tbody tr:hover {
    background: var(--bg-tertiary);
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-admin {
    background: var(--accent-red);
    color: white;
}

.badge-user {
    background: var(--accent-blue);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    margin-right: 8px;
}

.btn-warning {
    background: var(--accent-orange);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-warning:hover {
    background: var(--accent-orange-dark);
    transform: translateY(-1px);
}

.form-container {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 24px;
    margin-top: 24px;
}

.user-form {
    max-width: 500px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(199, 77, 237, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--text-primary);
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
}

.form-help {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* Адаптивность для админ-панели */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    .table th,
    .table td {
        padding: 12px 8px;
    }
    
    .form-actions {
        flex-direction: column;
    }
}
