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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* Шапка */
.header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.admin-header {
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    margin: 0;
    color: #2c3e50;
}

.admin-nav {
    display: flex;
    gap: 10px;
}

.nav-btn {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s;
}

.nav-btn:hover {
    background: #5a6fd8;
}

.nav-btn.logout {
    background: #e74c3c;
}

.nav-btn.logout:hover {
    background: #c0392b;
}

.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    font-weight: bold;
}

.header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.header p {
    color: #7f8c8d;
    font-size: 1.2em;
    margin-bottom: 10px;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.contact-item {
    background: rgba(103, 126, 234, 0.1);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
}

.admin-panel {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.admin-btn, .login-btn, .logout-btn {
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s;
}

.admin-btn {
    background: #27ae60;
    color: white;
}

.admin-btn:hover {
    background: #219a52;
}

.login-btn {
    background: #3498db;
    color: white;
}

.login-btn:hover {
    background: #2980b9;
}

.logout-btn {
    background: #e74c3c;
    color: white;
}

.logout-btn:hover {
    background: #c0392b;
}

/* Репертуар */
.repertoire-section, .admin-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.section-title {
    color: #2c3e50;
    font-size: 2em;
    margin-bottom: 30px;
    text-align: center;
}

/* Поиск и фильтры */
.controls {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.search-container {
    flex: 1;
    min-width: 300px;
}

.search-input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: #667eea;
}

.filter-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-label {
    font-weight: bold;
    color: #2c3e50;
    margin-right: 10px;
}

.category-filter {
    padding: 8px 16px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    user-select: none;
}

.category-filter:hover {
    background: rgba(103, 126, 234, 0.1);
}

.category-filter.active {
    background: #667eea;
    color: white;
}

.clear-filters {
    padding: 8px 16px;
    border: 2px solid #e74c3c;
    background: white;
    color: #e74c3c;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    user-select: none;
}

.clear-filters:hover {
    background: #e74c3c;
    color: white;
}

.selected-filters {
    margin-top: 10px;
    font-size: 14px;
    color: #7f8c8d;
}

.selected-filters strong {
    color: #2c3e50;
}

/* Таблицы */
.repertoire-table, .admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.repertoire-table th, .admin-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: bold;
}

.repertoire-table td, .admin-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.repertoire-table tr:hover, .admin-table tr:hover {
    background: rgba(103, 126, 234, 0.05);
}

.song-title {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.1em;
}

.song-author {
    color: #7f8c8d;
    font-style: italic;
}

.categories {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.category-tag {
    background: rgba(103, 126, 234, 0.1);
    color: #667eea;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.links-cell {
    min-width: 200px;
}

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

.link-btn {
    padding: 8px 12px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s;
    border: 1px solid;
    text-align: center;
    display: inline-block;
}

.link-minus {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.link-minus:hover {
    background: white;
    color: #e74c3c;
}

.link-video {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.link-video:hover {
    background: white;
    color: #3498db;
}

.link-notes {
    background: #27ae60;
    color: white;
    border-color: #27ae60;
}

.link-notes:hover {
    background: white;
    color: #27ae60;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    font-style: italic;
}

/* Авторизация */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-form h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #2c3e50;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: #667eea;
}

.login-submit {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.login-submit:hover {
    background: #5a6fd8;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Администраторская панель */
.song-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

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

.categories-checkboxes {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

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

.checkbox-label input {
    margin: 0;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s;
}

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

.btn-primary:hover {
    background: #5a6fd8;
}

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

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

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
}

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

.btn-edit:hover {
    background: #e67e22;
}

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

.btn-delete:hover {
    background: #c0392b;
}

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

.delete-form {
    display: inline;
}

.links-preview {
    font-size: 18px;
}

.songs-table-container {
    overflow-x: auto;
}

/* Сообщения */
.message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: bold;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header {
        padding: 20px;
    }

    .header h1 {
        font-size: 2em;
    }

    .contact-info {
        flex-direction: column;
        gap: 10px;
    }

    .controls {
        flex-direction: column;
    }

    .repertoire-table, .admin-table {
        font-size: 14px;
    }

    .repertoire-table th, .repertoire-table td,
    .admin-table th, .admin-table td {
        padding: 8px;
    }

    .links {
        flex-direction: row;
        gap: 5px;
    }

    .form-row {
        flex-direction: column;
    }

    .categories-checkboxes {
        flex-direction: column;
    }

    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .actions {
        flex-direction: column;
    }
}

/* Добавить к существующим стилям */

/* Категории с тегами */
.categories-input-container {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background: white;
    min-height: 50px;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.category-tag-input {
    display: inline-flex;
    align-items: center;
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 14px;
    gap: 5px;
}

.remove-tag {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.remove-tag:hover {
    background: rgba(255, 255, 255, 0.2);
}

.category-input-wrapper {
    position: relative;
}

.category-input-wrapper input {
    border: none;
    outline: none;
    padding: 5px;
    font-size: 14px;
    width: 200px;
    background: transparent;
}

.category-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.suggestion-item:hover {
    background: #f8f9fa;
}

.suggestion-item.new-category {
    color: #667eea;
    font-style: italic;
}

/* Ссылки */
.links-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.link-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.link-type-select {
    min-width: 120px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.link-url-input {
    flex: 2;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.link-title-input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.remove-link-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.remove-link-btn:hover {
    background: #c0392b;
}

.link-preview-item {
    display: inline-block;
    margin-right: 5px;
    font-size: 16px;
    cursor: help;
}

/* Адаптивность для новых элементов */
@media (max-width: 768px) {
    .link-input-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .link-type-select {
        min-width: auto;
    }
    
    .category-input-wrapper input {
        width: 100%;
    }
    
    .category-tags {
        margin-bottom: 10px;
    }
}