:root {
    --primary: #f8b5d1;
    --primary-light: #fce4ec;
    --secondary: #a5d6ff;
    --accent: #ffcc80;
    --text: #333;
    --text-light: #666;
    --bg: #fff;
    --bg-light: #f9f9f9;
    --border: #e0e0e0;
    --shadow: rgba(0, 0, 0, 0.1);
    --danger: #ff6b6b;
    --success: #4caf50;
    --warning: #ff9800;
    --info: #2196f3;
    --plyr-color-main: #f8b5d1;
    --secondary-light: #d1e8ff;
    --secondary-dark: #1976d2;
    --success-light: #c8e6c9;
    --success-dark: #2e7d32;
    --warning-light: #ffecb3;
    --warning-dark: #f57c00;
}

/* Тёмная тема */
body.dark-theme {
    --text: #e0e0e0;
    --text-light: #b0b0b0;
    --bg: #1a1a2e;
    --bg-light: #16213e;
    --border: #2d2d44;
    --shadow: rgba(0, 0, 0, 0.3);
    --primary-light: #2d2d44;
    --secondary-light: #1a3a5c;
    --success-light: #1a3a2a;
    --warning-light: #3a2a1a;
}

body.dark-theme header {
    background: linear-gradient(135deg, #2d2d44 0%, #1a3a5c 100%);
}

body.dark-theme .control-panel,
body.dark-theme .form-card,
body.dark-theme .entry-card,
body.dark-theme .album-card,
body.dark-theme .media-card {
    background: #16213e;
    border-color: #2d2d44;
}

body.dark-theme .btn {
    background: #2d2d44;
    color: #e0e0e0;
}

body.dark-theme input,
body.dark-theme textarea,
body.dark-theme select {
    background: #1a1a2e;
    border-color: #2d2d44;
    color: #e0e0e0;
}

body.dark-theme .modal-content {
    background: #16213e;
}

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

body {
    font-family: 'Nunito', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg-light);
}

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

/* Шапка */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 4px 12px var(--shadow);
}

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

.logo h1 {
    font-family: 'Pacifico', cursive;
    font-size: 1.8rem;
    margin: 0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Креативный бейдж возраста */
.age-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
    background-size: 200% auto;
    animation: shine 3s ease-in-out infinite;
    color: #d63384;
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 25px;
    box-shadow: 
        0 2px 8px rgba(255, 215, 0, 0.4),
        0 0 0 3px rgba(255, 255, 255, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.5);
    text-shadow: none;
    position: relative;
    animation: 
        shine 3s ease-in-out infinite,
        bounce 2s ease-in-out infinite;
}

.age-badge::before {
    content: '✨';
    font-size: 0.8rem;
    animation: sparkle 1.5s ease-in-out infinite;
}

.age-badge::after {
    content: '✨';
    font-size: 0.8rem;
    animation: sparkle 1.5s ease-in-out infinite 0.75s;
}

@keyframes shine {
    0%, 100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-3px) scale(1.02);
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2) rotate(180deg);
    }
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Переключатель темы */
.btn-theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.btn-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.btn-theme-toggle:active {
    transform: scale(0.95);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 50px;
}

.user-avatar {
    font-size: 2rem;
    color: white;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.username {
    font-weight: 600;
    color: white;
}

.user-role {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

.user-role.admin {
    color: #ffcc80;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.3);
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

/* Кнопки */
.btn {
    display: inline-block;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    box-shadow: 0 4px 10px var(--shadow);
    text-decoration: none;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
}

.btn:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--shadow);
}

.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-login, .btn-register {
    padding: 8px 20px;
    font-size: 0.9rem;
}

.btn-login {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-register {
    background: #ffcc80;
    color: #333;
}

.btn-register:hover {
    background: #ffd699;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    margin-top: 10px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
}

.btn-upload {
    background: linear-gradient(to right, var(--success), #45a049);
    color: white;
}

.btn-cancel {
    background: linear-gradient(to right, var(--danger), #ff5252);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-primary {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
}

.btn-secondary {
    background: white;
    color: var(--text);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary-light);
}

.btn-admin {
    background: linear-gradient(to right, #9c27b0, #673ab7);
    color: white;
}

.btn-upload-main {
    background: linear-gradient(to right, var(--success), #45a049);
    color: white;
}

.btn-album {
    background: linear-gradient(to right, #ff9800, #ff5722);
    color: white;
}

/* Модальные окна аутентификации */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 95vh;
    overflow: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-auth {
    max-width: 500px;
    padding: 0;
}

.auth-form {
    padding: 30px;
}

.auth-form h2 {
    margin-bottom: 25px;
    text-align: center;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

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

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

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

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Уведомления */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

/* Панель администратора */
.admin-panel {
    background: #f5f5f5;
    border-bottom: 2px solid var(--border);
    padding: 20px 0;
    margin-bottom: 30px;
}

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

.admin-header h3 {
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-close-admin {
    background: var(--danger);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
    flex-wrap: wrap;
}

.admin-tabs button {
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 6px;
    transition: all 0.3s;
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
}

.admin-tabs button.active {
    background: var(--primary-light);
    color: var(--text);
}

.badge {
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 5px;
}

.tab-content {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.empty-list {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

.empty-list i {
    font-size: 3rem;
    color: var(--success);
    margin-bottom: 15px;
}

/* Карточки пользователей */
.users-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.user-card {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid var(--secondary);
}

.user-card.pending {
    border-left-color: var(--warning);
}

.user-card.admin {
    border-left-color: var(--primary);
}

.user-card-header {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 15px;
}

.user-card-header i {
    font-size: 2rem;
    color: var(--secondary);
    margin-top: 5px;
}

.user-card.pending .user-card-header i {
    color: var(--warning);
}

.user-card.admin .user-card-header i {
    color: var(--primary);
}

.user-info h4 {
    margin: 0 0 5px 0;
    color: var(--text);
}

.user-info p {
    margin: 0 0 5px 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.user-info small {
    color: var(--text-light);
    font-size: 0.8rem;
}

.user-meta {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.role-badge, .status-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.role-badge.user {
    background: var(--secondary);
    color: white;
}

.role-badge.admin {
    background: var(--primary);
    color: white;
}

.status-badge.approved {
    background: var(--success);
    color: white;
}

.status-badge.pending {
    background: var(--warning);
    color: white;
}

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

/* Статистика */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid var(--border);
}

.stat-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.stat-card h4 {
    margin: 0 0 10px 0;
    color: var(--text);
    font-size: 1rem;
}

.stat-card p {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
}

/* Основное содержание */
main {
    padding: 30px 0;
}

/* Панель управления */
.control-panel {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.user-welcome h2 {
    color: var(--text);
    margin-bottom: 5px;
}

.user-welcome p {
    color: var(--text-light);
}

.control-buttons {
    display: flex;
    gap: 15px;
}

/* Секция загрузки */
.upload-section {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px var(--shadow);
    border: 2px dashed var(--primary-light);
}

.upload-section h2 {
    color: var(--text);
    margin-bottom: 20px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-area {
    border: 3px dashed var(--secondary);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background-color: var(--bg-light);
    margin-bottom: 20px;
    position: relative;
}

.upload-area:hover, .upload-area.dragover {
    background-color: var(--primary-light);
    border-color: var(--primary);
}

.upload-area i {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 15px;
}

.upload-area p {
    margin-bottom: 20px;
    color: var(--text-light);
}

#fileInput {
    display: none;
}

.selected-file {
    margin-top: 25px;
    text-align: left;
}

.file-preview {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    margin-bottom: 15px;
    border-left: 4px solid var(--secondary);
}

.file-preview i {
    font-size: 2.5rem;
    color: var(--secondary);
}

.file-details {
    flex: 1;
}

.file-details h4 {
    margin-bottom: 5px;
    color: var(--text);
    word-break: break-all;
}

.file-details p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.btn-remove {
    background: var(--danger);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-remove:hover {
    background: #ff5252;
}

.caption-input {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.caption-input label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.caption-input textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.3s;
}

.caption-input textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.caption-counter {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 5px;
}

.privacy-option {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.privacy-option input[type="checkbox"] {
    width: auto;
}

.privacy-option label {
    cursor: pointer;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.hint {
    font-size: 0.9rem;
    margin-top: 15px;
    color: var(--text-light);
}

.uploading {
    padding: 20px;
}

.upload-progress {
    max-width: 500px;
    margin: 0 auto;
}

.progress-bar {
    height: 10px;
    background: var(--border);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    transition: width 0.3s ease;
    border-radius: 5px;
}

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

.stat {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-light);
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 3px 8px var(--shadow);
    min-width: 140px;
    justify-content: center;
}

.stat i {
    font-size: 1.5rem;
    color: var(--primary);
}

/* Секция галереи */
.gallery-section {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 5px 15px var(--shadow);
}

.section-header {
    margin-bottom: 25px;
}

.section-header h2 {
    color: var(--text);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.counter {
    background: var(--primary);
    color: white;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-left: 10px;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.search-controls {
    flex: 1;
    min-width: 250px;
}

.search-box {
    position: relative;
    max-width: 400px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-controls, .view-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-controls button, .view-controls button {
    background: var(--bg-light);
    border: 2px solid var(--border);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    font-size: 0.9rem;
    white-space: nowrap;
    font-family: 'Nunito', sans-serif;
}

.filter-controls button.active, .view-controls button.active {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--text);
}

/* Состояния загрузки и пустой галереи */
.loading, .empty-gallery {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.loading .spinner, .empty-gallery i {
    font-size: 4rem;
    color: var(--secondary);
    margin-bottom: 20px;
}

.empty-gallery i {
    font-size: 4rem;
}

.loading .spinner {
    width: 60px;
    height: 60px;
    border: 5px solid var(--primary-light);
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading h3, .empty-gallery h3 {
    margin-bottom: 10px;
    color: var(--text);
}

/* Контейнер медиа */
.media-container {
    transition: all 0.3s;
}

.media-container.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.media-container.list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.media-container.list .media-item {
    display: flex;
    flex-direction: row;
}

.media-container.list .media-preview {
    width: 200px;
    height: 150px;
    flex-shrink: 0;
}

.media-container.list .media-info {
    flex-grow: 1;
}

/* Карточки медиа */
.media-item {
    background: var(--bg-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border);
}

.media-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow);
}

.media-preview {
    position: relative;
    height: 200px;
    cursor: pointer;
    overflow: hidden;
}

.media-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.media-preview:hover .media-thumbnail {
    transform: scale(1.05);
}

.image-overlay, .video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.media-preview:hover .image-overlay,
.media-preview:hover .video-overlay {
    opacity: 1;
}

.image-overlay i {
    color: white;
    font-size: 2.5rem;
    background: rgba(0, 0, 0, 0.5);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.play-button {
    width: 70px;
    height: 70px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 2rem;
    transition: transform 0.3s;
}

.media-preview:hover .play-button {
    transform: scale(1.1);
}

.media-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    font-size: 0.9rem;
}

.media-info {
    padding: 15px;
}

.media-caption h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text);
    line-height: 1.4;
}

.media-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.media-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.uploader {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--primary);
}

.media-actions {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 8px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    min-width: 40px;
    justify-content: center;
    font-family: 'Nunito', sans-serif;
}

.btn-view {
    background: var(--secondary);
    color: white;
    flex: 2;
}

.btn-download {
    background: var(--success);
    color: white;
}

.btn-delete {
    background: var(--danger);
    color: white;
}

.load-more {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--border);
}

/* Модальное окно просмотра медиа */
.modal-media {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    max-height: 60vh;
    background: #000;
    position: relative;
}

.modal-media-img {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
}

.image-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    background: rgba(0, 0, 0, 0.8);
}

.video-player-container {
    width: 100%;
    height: 100%;
}

.video-player-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.plyr {
    height: 100%;
    border-radius: 8px 8px 0 0;
}

.modal-info {
    padding: 25px;
    background: white;
}

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

.modal-header h3 {
    font-size: 1.5rem;
    color: var(--text);
    flex: 1;
    margin-right: 15px;
}

.modal-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.detail-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.detail-item i {
    font-size: 1.2rem;
    color: var(--primary);
    margin-top: 3px;
}

.detail-item strong {
    display: block;
    color: var(--text);
    margin-bottom: 5px;
}

.detail-item p {
    color: var(--text-light);
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 2px solid var(--border);
}

.btn-prev, .btn-next {
    background: var(--primary-light);
    color: var(--text);
}

.btn-prev:hover, .btn-next:hover {
    background: var(--primary);
    color: white;
}

/* Сообщение о ожидании подтверждения */
.waiting-approval {
    text-align: center;
    padding: 60px 0;
}

.approval-message {
    max-width: 600px;
    margin: 0 auto;
}

.approval-message i {
    font-size: 4rem;
    color: var(--warning);
    margin-bottom: 20px;
}

.approval-message h2 {
    margin-bottom: 15px;
    color: var(--text);
}

.approval-message p {
    margin-bottom: 10px;
    color: var(--text-light);
}

/* Приветствие для гостей */
.guest-welcome {
    text-align: center;
    padding: 60px 0;
}

.welcome-message i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.welcome-message h2 {
    margin-bottom: 20px;
    color: var(--text);
}

.welcome-message p {
    max-width: 600px;
    margin: 0 auto 40px;
    color: var(--text-light);
    font-size: 1.1rem;
}

.welcome-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.feature {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px var(--shadow);
}

.feature i {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 15px;
}

.feature h3 {
    margin-bottom: 10px;
    color: var(--text);
}

.feature p {
    margin: 0;
    color: var(--text-light);
    font-size: 1rem;
}

.welcome-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Управление медиа в панели администратора */
.media-management {
    padding: 20px;
}

.management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

.management-header h4 {
    margin: 0;
    color: var(--text);
}

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

/* Управление альбомами */
.albums-management {
    padding: 20px;
}

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

/* Стили для кнопок с разными правами */
.media-actions .btn-delete {
    display: inline-flex;
}

.media-actions .btn-delete[disabled],
.media-actions .btn-delete:not(.admin) {
    display: none;
}

/* Стили для отображения прав доступа */
.permission-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 10px;
}

.permission-badge.view-only {
    background: var(--secondary);
    color: white;
}

.permission-badge.full-access {
    background: var(--primary);
    color: white;
}

/* Стили для сообщений о правах */
.permission-message {
    background: var(--primary-light);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary);
}

.permission-message i {
    color: var(--primary);
    margin-right: 10px;
}

.permission-message p {
    margin: 5px 0;
    color: var(--text);
}

/* Стили для недоступных функций */
.disabled-feature {
    opacity: 0.6;
    cursor: not-allowed;
    position: relative;
}

.disabled-feature::after {
    content: "Доступно только администраторам";
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.disabled-feature:hover::after {
    opacity: 1;
}

.file-preview-with-image {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.preview-image-container {
    width: 100%;
    max-height: 300px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--border);
    background: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
}

.preview-image {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

.preview-video-icon {
    font-size: 4rem;
    color: var(--secondary);
    opacity: 0.7;
}

.preview-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    background: var(--bg-light);
    border-radius: 8px;
}

.preview-info h4 {
    margin: 0;
    color: var(--text);
    word-break: break-all;
}

.preview-info p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.preview-dimensions {
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.preview-dimensions i {
    color: var(--primary);
}

/* Футер */
footer {
    background: var(--text);
    color: white;
    text-align: center;
    padding: 25px 0;
    margin-top: 40px;
}

footer p {
    margin-bottom: 10px;
}

.footer-note {
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-stats {
    opacity: 0.6;
    font-size: 0.85rem;
}

/* Адаптивность */
@media (max-width: 992px) {
    .media-container.grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .modal-content {
        max-width: 90%;
    }

    .admin-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .logo h1 {
        flex-direction: column;
        gap: 10px;
    }

    .age-badge {
        font-size: 0.8rem;
        padding: 5px 12px;
        animation: none;
    }

    .age-badge::before,
    .age-badge::after {
        display: none;
    }

    .media-container.grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .controls {
        flex-direction: column;
        gap: 15px;
    }

    .search-controls {
        min-width: 100%;
    }

    .search-box {
        max-width: 100%;
    }

    .filter-controls, .view-controls {
        width: 100%;
        justify-content: center;
    }

    .stats {
        gap: 15px;
    }

    .stat {
        min-width: 120px;
        padding: 10px 15px;
    }

    .media-container.list .media-item {
        flex-direction: column;
    }

    .media-container.list .media-preview {
        width: 100%;
        height: 200px;
    }

    .modal-content {
        max-height: 90vh;
        max-width: 95%;
    }

    .modal-details {
        grid-template-columns: 1fr;
    }

    .modal-footer {
        flex-direction: column;
        gap: 10px;
    }

    .modal-footer button {
        width: 100%;
    }

    .control-panel {
        flex-direction: column;
        text-align: center;
    }

    .welcome-features {
        grid-template-columns: 1fr;
    }

    .welcome-actions {
        flex-direction: column;
    }

    .user-card-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .auth-buttons {
        flex-direction: column;
        width: 100%;
    }

    .auth-buttons button {
        width: 100%;
    }

    .control-buttons {
        flex-direction: column;
        width: 100%;
    }

    .control-buttons button {
        width: 100%;
    }

    .upload-section, .gallery-section {
        padding: 20px;
    }

    .media-container.grid {
        grid-template-columns: 1fr;
    }

    .media-actions {
        flex-wrap: wrap;
    }

    .btn-small {
        flex: 1;
        min-width: calc(33.333% - 6px);
    }

    .upload-actions {
        flex-direction: column;
    }

    .modal-header {
        flex-direction: column;
        gap: 15px;
    }

    .modal-header .modal-actions {
        align-self: flex-end;
    }

    .admin-tabs {
        flex-direction: column;
    }

    .admin-tabs button {
        width: 100%;
        justify-content: center;
    }
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Кастомные скроллбары */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 4px;
}

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

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

/* Специальные эффекты для детской тематики */
.media-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s;
}

.media-item:hover::before {
    opacity: 1;
}

.feature {
    position: relative;
    overflow: hidden;
}

.feature::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s;
}

.feature:hover::after {
    opacity: 0.3;
}

/* Стили для альбомов */
.album-manager {
    padding: 20px;
}

.manager-header {
    margin-bottom: 25px;
}

.manager-header h2 {
    color: var(--text);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.manager-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
    flex-wrap: wrap;
}

.manager-tabs button {
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 6px;
    transition: all 0.3s;
    font-family: 'Nunito', sans-serif;
}

.manager-tabs button.active {
    background: var(--primary-light);
    color: var(--text);
}

.albums-grid {
    min-height: 400px;
}

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

.album-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px var(--shadow);
    transition: transform 0.3s;
    border: 1px solid var(--border);
}

.album-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow);
}

.album-cover {
    position: relative;
    height: 180px;
    cursor: pointer;
    overflow: hidden;
}

.album-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.album-card:hover .album-thumbnail {
    transform: scale(1.05);
}

.album-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    font-size: 0.9rem;
}

.album-info {
    padding: 15px;
}

.album-info h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text);
    line-height: 1.4;
}

.album-info p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 10px;
    min-height: 40px;
}

.album-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.album-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.album-actions {
    display: flex;
    gap: 8px;
}

.create-album {
    max-width: 600px;
    margin: 0 auto;
}

.album-form {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 12px;
    margin-top: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.checkbox-label input[type="checkbox"] {
    width: auto;
}

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

.album-view {
    min-height: 500px;
}

.album-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

.album-header-info h3 {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 10px;
}

.album-header-info p {
    color: var(--text-light);
    margin-bottom: 10px;
}

.album-header-meta {
    display: flex;
    gap: 15px;
    color: var(--text-light);
    font-size: 0.9rem;
}

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

.album-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.album-media-item {
    background: var(--bg-light);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 8px var(--shadow);
    border: 1px solid var(--border);
}

.album-media-preview {
    position: relative;
    height: 150px;
    cursor: pointer;
    overflow: hidden;
}

.album-media-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.album-media-preview:hover img {
    transform: scale(1.05);
}

.album-media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    color: white;
    padding: 8px 10px;
    font-size: 0.8rem;
    display: flex;
    justify-content: flex-end;
}

.album-media-info {
    padding: 12px;
}

.album-media-info h4 {
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.album-media-actions {
    display: flex;
    gap: 5px;
    justify-content: flex-end;
}

.empty-album {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-album i {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 15px;
}

.albums-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.album-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.album-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Цвета альбомов */
.album-card.photos {
    border-top: 4px solid var(--secondary);
}

.album-card.videos {
    border-top: 4px solid #80cbc4;
}

.album-card.mixed {
    border-top: 4px solid var(--primary);
}

.album-card.empty {
    border-top: 4px solid #e0e0e0;
}

.album-cover {
    position: relative;
    height: 200px;
    cursor: pointer;
    overflow: hidden;
}

.album-cover-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.album-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.album-card:hover .album-thumbnail {
    transform: scale(1.1);
}

.album-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.album-card:hover .album-gradient {
    opacity: 1;
}

.album-icon {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.album-card.photos .album-icon {
    color: var(--secondary);
}

.album-card.videos .album-icon {
    color: #80cbc4;
}

.album-card.mixed .album-icon {
    color: var(--primary);
}

.album-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    font-size: 0.85rem;
}

.album-overlay span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.album-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.album-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text);
    line-height: 1.3;
    font-weight: 600;
}

.album-description {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.5;
    flex-grow: 1;
}

.album-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.album-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.tag {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tag-photo {
    background: var(--secondary-light);
    color: var(--secondary-dark);
}

.tag-video {
    background: #e0f2f1;
    color: #00695c;
}

.tag-private {
    background: #fce4ec;
    color: #ad1457;
}

.album-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

/* Стили для кнопки фильтра "Без альбома" */
.filter-controls button.active[title="Показать только медиа без альбомов"] {
    background: linear-gradient(to right, #ff9800, #ff5722);
    color: white;
    border-color: #ff9800;
}

/* Статистика альбомов */
.album-stats {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    padding: 10px;
    background: var(--bg-light);
    border-radius: 8px;
    font-size: 0.9rem;
}

.album-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.album-stats .stat-label {
    color: var(--text-light);
}

.album-stats .stat-value {
    font-weight: 600;
    color: var(--text);
}

/* Анимация для пульсации нового альбома */
@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(248, 181, 209, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(248, 181, 209, 0); }
    100% { box-shadow: 0 0 0 0 rgba(248, 181, 209, 0); }
}

.album-card.new {
    animation: pulse-glow 2s infinite;
}

/* Стили для пустых альбомов */
.empty-album-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.empty-album-state i {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-album-state h4 {
    margin-bottom: 10px;
    color: var(--text);
}

.empty-album-state p {
    margin-bottom: 20px;
}



/* Мобильная адаптация для альбомов */
@media (max-width: 768px) {
    .albums-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }

    .album-cover {
        height: 180px;
    }

    .album-info {
        padding: 15px;
    }

    .album-info h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .albums-container {
        grid-template-columns: 1fr;
    }

    .album-card {
        max-width: 100%;
    }
}

/* Добавление медиа в альбом */
.add-to-album {
    padding: 20px;
}

.media-selection {
    margin-top: 20px;
}

.media-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin: 15px 0;
}

.selection-media-item {
    position: relative;
    height: 120px;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.selection-media-item:hover {
    border-color: var(--primary);
}

.selection-media-item.selected {
    border-color: var(--success);
    box-shadow: 0 0 0 2px var(--success);
}

.selection-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.selection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    opacity: 0;
    transition: opacity 0.2s;
}

.selection-media-item:hover .selection-overlay {
    opacity: 1;
}

.selection-media-item.selected .selection-overlay {
    opacity: 1;
    background: rgba(76, 175, 80, 0.7);
}

.selected-icon {
    font-size: 2rem;
    margin-bottom: 5px;
}

.selection-caption {
    font-size: 0.8rem;
    text-align: center;
    padding: 0 5px;
}

.empty-selection {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

.empty-selection i {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 15px;
}

.selection-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 2px solid var(--border);
}

/* Утилитарные классы */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.hidden { display: none; }
.visible { display: block; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

.grid { display: grid; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

.rounded { border-radius: 8px; }
.rounded-lg { border-radius: 16px; }
.rounded-full { border-radius: 9999px; }

.shadow { box-shadow: 0 4px 10px var(--shadow); }
.shadow-lg { box-shadow: 0 8px 20px var(--shadow); }

.bg-white { background: white; }
.bg-light { background: var(--bg-light); }
.bg-primary { background: var(--primary); }
.bg-secondary { background: var(--secondary); }

.text-white { color: white; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-light { color: var(--text-light); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }

.border { border: 1px solid var(--border); }
.border-primary { border-color: var(--primary); }
.border-secondary { border-color: var(--secondary); }

.w-full { width: 100%; }
.h-full { height: 100%; }

.quick-stats {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.quick-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.quick-stats i {
    color: var(--primary);
}

/* Информация о фильтрах */
.filter-info {
    background: var(--primary-light);
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid var(--primary);
}

.filter-info i {
    color: var(--primary);
    margin-right: 10px;
}

.filter-info span {
    flex: 1;
    color: var(--text);
    font-weight: 500;
}

/* Информация об альбоме в галерее */
.media-album-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 8px 0;
    padding: 6px 10px;
    background: var(--primary-light);
    border-radius: 6px;
    border-left: 3px solid var(--primary);
}

.media-album-info i {
    color: var(--primary);
}

.album-link {
    color: var(--secondary-dark);
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.album-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Обзор альбомов */
.albums-overview {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 3px 10px var(--shadow);
}

.overview-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* Улучшенные карточки альбомов */
.albums-container.enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.album-card.enhanced {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid var(--border);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.album-card.enhanced:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

/* Бейджи статуса альбома */
.album-status {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-badge.private {
    background: rgba(248, 181, 209, 0.2);
    color: #ad1457;
    border: 1px solid var(--primary);
}

.status-badge.public {
    background: rgba(165, 214, 255, 0.2);
    color: var(--secondary-dark);
    border: 1px solid var(--secondary);
}

.status-badge.empty {
    background: rgba(224, 224, 224, 0.2);
    color: var(--text-light);
    border: 1px solid var(--border);
}

/* Улучшенная обложка альбома */
.album-cover.enhanced {
    position: relative;
    height: 200px;
    cursor: pointer;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
}

.album-cover.enhanced .album-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.album-cover.enhanced .placeholder-thumbnail {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-light);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.album-cover.enhanced .placeholder-thumbnail i {
    font-size: 3.5rem;
    margin-bottom: 15px;
    opacity: 0.3;
}

.album-cover.enhanced .placeholder-thumbnail span {
    font-size: 0.9rem;
    text-align: center;
    max-width: 80%;
}

/* Индикатор содержимого альбома */
.album-content-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.content-types {
    display: flex;
    gap: 8px;
    align-items: center;
}

.content-type {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 8px;
    border-radius: 12px;
}

/* Улучшенная информация альбома */
.album-info.enhanced {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.album-info.enhanced h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text);
    line-height: 1.3;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.album-info.enhanced .album-title {
    flex: 1;
}

.album-has-cover {
    color: var(--success);
    font-size: 0.9rem;
}

.album-description.enhanced {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 15px;
    line-height: 1.5;
    flex-grow: 1;
    padding: 10px;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 3px solid var(--secondary);
}

/* Детали альбома */
.album-details {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.detail-row:last-child {
    margin-bottom: 0;
}

.detail-label {
    color: var(--text-light);
    font-weight: 500;
}

.detail-value {
    color: var(--text);
    font-weight: 600;
}

/* Быстрый просмотр содержимого альбома */
.album-preview {
    margin: 15px 0;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.album-preview h4 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.preview-item {
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.preview-item:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

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

.tile-type {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 0.6rem;
    text-align: center;
    padding: 2px;
}

.preview-placeholder {
    aspect-ratio: 1;
    background: var(--bg-light);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-light);
    font-size: 0.8rem;
    border: 1px dashed var(--border);
}

.preview-placeholder i {
    font-size: 1.5rem;
    margin-bottom: 5px;
    opacity: 0.5;
}

/* Статистика альбома в карточке */
.album-stats-compact {
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 10px 0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-item i {
    font-size: 1.2rem;
    color: var(--primary);
}

.stat-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
}

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

/* Пустой альбом с подсказкой */
.empty-album-message {
    text-align: center;
    padding: 30px 20px;
    background: var(--bg-light);
    border-radius: 10px;
    border: 2px dashed var(--border);
    margin: 15px 0;
}

.empty-album-message i {
    font-size: 2.5rem;
    color: var(--text-light);
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-album-message h4 {
    color: var(--text);
    margin-bottom: 10px;
}

.empty-album-message p {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

/* Индикатор в галерее, что медиа в альбоме */
.gallery-item-album-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 204, 128, 0.9);
    color: #333;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 10;
    cursor: pointer;
    transition: all 0.2s;
}

.gallery-item-album-badge:hover {
    background: #ffcc80;
    transform: scale(1.05);
}

/* Информация об альбоме при наведении */
.media-album-info-modal {
    background: var(--primary-light);
    padding: 8px 12px;
    border-radius: 8px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

/* Заголовок альбома */
.album-title-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.album-title-section h3 {
    flex: 1;
    margin: 0;
}

/* Контейнер описания альбома */
.album-description-container {
    background: var(--bg-light);
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    border-left: 4px solid var(--secondary);
}

/* Мета-информация в заголовке альбома */
.album-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

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

.meta-item.private {
    color: #ad1457;
    font-weight: 600;
}

/* Пустой альбом */
.empty-album-content {
    text-align: center;
    padding: 40px 20px;
}

.empty-album-content i {
    font-size: 4rem;
    color: var(--text-light);
    opacity: 0.3;
    margin-bottom: 20px;
}

.empty-album-content h4 {
    color: var(--text);
    margin-bottom: 10px;
}

.empty-album-content p {
    color: var(--text-light);
    margin-bottom: 20px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.empty-album-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Контент альбома */
.album-content {
    margin-top: 25px;
}

.album-media-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

.album-media-header h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.album-content-summary {
    display: flex;
    gap: 15px;
    margin-left: 15px;
}

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

/* Улучшенная сетка медиа в альбоме */
.album-media-grid.enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.album-media-item.enhanced {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

.album-media-item.enhanced:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow);
}

.album-media-preview {
    position: relative;
    height: 180px;
    cursor: pointer;
    overflow: hidden;
}

.album-media-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.album-media-item.enhanced:hover .album-media-preview img {
    transform: scale(1.05);
}

.album-media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px;
}

.media-type-badge {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cover-badge {
    background: rgba(76, 175, 80, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.album-media-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.album-media-info h4 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--text);
    line-height: 1.3;
}

.album-media-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 0.8rem;
    color: var(--text-light);
}

.album-media-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.album-media-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

/* Добавление медиа в альбом */
.add-album-info {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.album-preview-card {
    display: flex;
    gap: 20px;
    align-items: center;
}

.preview-cover {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.preview-info {
    flex: 1;
}

.preview-info h4 {
    margin-bottom: 8px;
    color: var(--text);
}

.preview-info p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.preview-stats {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Фильтры выбора */
.selection-filters {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.selection-filters button {
    background: var(--bg-light);
    border: 2px solid var(--border);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-family: 'Nunito', sans-serif;
}

.selection-filters button.active {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--text);
}

/* Улучшенная сетка выбора медиа */
.media-selection-grid.enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin: 15px 0;
    background: var(--bg-light);
}

.selection-media-item.enhanced {
    position: relative;
    height: 150px;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: all 0.2s;
}

.selection-media-item.enhanced:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.selection-media-item.enhanced.selected {
    border-color: var(--success);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.selection-media-item.enhanced.in-album {
    border-color: var(--warning);
    opacity: 0.8;
}

.selection-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.selection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    opacity: 0;
    transition: opacity 0.2s;
    padding: 10px;
}

.selection-media-item.enhanced:hover .selection-overlay,
.selection-media-item.enhanced.selected .selection-overlay {
    opacity: 1;
}

.selection-media-item.enhanced.selected .selection-overlay {
    background: rgba(76, 175, 80, 0.7);
}

.selection-media-item.enhanced.in-album .selection-overlay {
    background: rgba(255, 152, 0, 0.7);
}

.selection-status {
    font-size: 2rem;
    margin-bottom: 10px;
}

.selected-icon {
    color: white;
}

.in-album-icon {
    color: #ffcc80;
}

.add-icon {
    color: white;
}

.selection-info {
    text-align: center;
}

.selection-caption {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 5px;
    font-weight: 500;
}

.selection-type {
    display: block;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 5px;
}

.selection-album-info {
    display: block;
    font-size: 0.7rem;
    background: rgba(255, 204, 128, 0.3);
    padding: 2px 6px;
    border-radius: 8px;
}

/* Сводка выбора */
.selection-summary {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid var(--border);
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.summary-stats .stat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-light);
    border-radius: 8px;
}

.summary-stats .stat i {
    font-size: 1.2rem;
    color: var(--primary);
}

.summary-stats .stat span {
    font-weight: 600;
    color: var(--text);
}

/* Выбор обложки */
.select-cover {
    padding: 20px;
}

.cover-hint {
    color: var(--text-light);
    margin-bottom: 25px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.cover-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin: 20px 0;
    background: var(--bg-light);
}

.cover-option {
    position: relative;
    height: 150px;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: all 0.2s;
}

.cover-option:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.cover-option.selected {
    border-color: var(--success);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.cover-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    opacity: 0;
    transition: opacity 0.2s;
    padding: 10px;
}

.cover-option:hover .cover-overlay,
.cover-option.selected .cover-overlay {
    opacity: 1;
}

.cover-option.selected .cover-overlay {
    background: rgba(76, 175, 80, 0.7);
}

.cover-caption {
    font-size: 0.85rem;
    text-align: center;
    margin-top: 10px;
}

.no-images-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.no-images-message i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.3;
}

.cover-selection-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Форма создания альбома */
.checkbox-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-info i {
    font-size: 1.2rem;
    color: var(--primary);
}

.checkbox-info div {
    flex: 1;
}

.checkbox-info strong {
    display: block;
    color: var(--text);
    margin-bottom: 2px;
}

.checkbox-info small {
    display: block;
    color: var(--text-light);
    font-size: 0.85rem;
}

.form-hint {
    display: block;
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 5px;
}

/* Анимация новой обложки */
@keyframes pulse-cover {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

.new-cover {
    animation: pulse-cover 2s;
}

/* Статистика в футере */
.footer-stats {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.footer-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
}

/* Адаптивность для улучшенных стилей */
@media (max-width: 992px) {
    .albums-container.enhanced {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .album-media-grid.enhanced {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .albums-container.enhanced {
        grid-template-columns: 1fr;
    }

    .album-title-section {
        flex-direction: column;
        align-items: stretch;
    }

    .album-header-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .album-header-actions button {
        width: 100%;
    }

    .media-selection-grid.enhanced {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .cover-selection-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .overview-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .album-content-summary {
        flex-direction: column;
        gap: 5px;
        margin-left: 0;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .overview-stats {
        grid-template-columns: 1fr;
    }

    .media-selection-grid.enhanced {
        grid-template-columns: repeat(2, 1fr);
    }

    .cover-selection-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .preview-items {
        grid-template-columns: repeat(2, 1fr);
    }

    .summary-stats {
        grid-template-columns: 1fr;
    }

    .selection-actions {
        flex-direction: column;
        gap: 10px;
    }

    .selection-actions button {
        width: 100%;
    }

    .quick-stats {
        flex-direction: column;
        gap: 8px;
    }

    .footer-stats {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }
}

.main-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
}

.main-tabs button {
    background: none;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    transition: all 0.3s;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
}

.main-tabs button:hover {
    background: var(--primary-light);
    color: var(--text);
}

.main-tabs button.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(248, 181, 209, 0.3);
}

/* ========== АЛЬБОМЫ В ОСНОВНОМ КОНТЕНТЕ ========== */
.albums-main-section {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 5px 15px var(--shadow);
    margin-top: 20px;
}

.albums-controls {
    margin: 20px 0;
    display: flex;
    gap: 15px;
}

.empty-albums {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-albums i {
    font-size: 4rem;
    color: var(--secondary);
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-albums h3 {
    margin-bottom: 15px;
    color: var(--text);
}

.empty-albums p {
    max-width: 500px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

/* Карточки альбомов в основном контенте */
.albums-container-main {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.album-card-main {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid var(--border);
    position: relative;
    display: flex;
    flex-direction: column;
}

.album-card-main:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

/* Обложка альбома в основном контенте */
.album-cover-main {
    position: relative;
    height: 200px;
    cursor: pointer;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
}

.album-cover-main .album-thumbnail-main {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.album-card-main:hover .album-thumbnail-main {
    transform: scale(1.05);
}

.placeholder-cover-main {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-light);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.placeholder-cover-main i {
    font-size: 3.5rem;
    margin-bottom: 15px;
    opacity: 0.3;
}

.placeholder-cover-main span {
    font-size: 0.9rem;
    text-align: center;
    max-width: 80%;
}

/* Индикатор содержимого в основном контенте */
.album-content-indicator-main {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.content-types-main {
    display: flex;
    gap: 8px;
    align-items: center;
}

.content-type-main {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 8px;
    border-radius: 12px;
}

.album-count-main {
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Бейдж приватности */
.album-private-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(248, 181, 209, 0.9);
    color: #ad1457;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 10;
}

/* Информация об альбоме в основном контенте */
.album-info-main {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.album-title-main {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text);
    line-height: 1.3;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: color 0.2s;
}

.album-title-main:hover {
    color: var(--primary);
}

.album-description-main {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 15px;
    line-height: 1.5;
    flex-grow: 1;
}

/* Быстрый просмотр в основном контенте */
.album-quick-view {
    margin: 15px 0;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 10px;
}

.quick-view-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.quick-view-item {
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.quick-view-item:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.quick-view-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quick-view-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 0.6rem;
    text-align: center;
    padding: 2px;
}

.quick-view-overlay.image {
    background: rgba(165, 214, 255, 0.7);
}

.quick-view-overlay.video {
    background: rgba(128, 203, 196, 0.7);
}

.quick-view-more {
    aspect-ratio: 1;
    background: var(--primary-light);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--primary);
    font-size: 0.8rem;
    border: 1px dashed var(--primary);
}

.album-empty-message {
    text-align: center;
    padding: 20px;
    color: var(--text-light);
    background: var(--bg-light);
    border-radius: 10px;
    margin: 15px 0;
}

.album-empty-message i {
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* Мета-информация в основном контенте */
.album-meta-main {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 15px 0;
    font-size: 0.85rem;
    color: var(--text-light);
}

.meta-item-main {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Действия в основном контенте */
.album-actions-main {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

/* Адаптивность */
@media (max-width: 992px) {
    .albums-container-main {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .main-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .main-tabs button {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .albums-container-main {
        grid-template-columns: 1fr;
    }

    .album-card-main {
        max-width: 100%;
    }

    .main-tabs {
        flex-direction: column;
    }

    .main-tabs button {
        width: 100%;
        justify-content: center;
    }

    .quick-view-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 480px) {
    .quick-view-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .album-meta-main {
        flex-direction: column;
        gap: 8px;
    }

    .album-actions-main {
        flex-direction: column;
    }

    .album-actions-main button {
        width: 100%;
    }
}

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

.thumbnails-stats .stat-card .warning {
    color: #e74c3c;
    font-weight: bold;
}

.ffmpeg-warning {
    background: #ff6b6b;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ffmpeg-success {
    background: #4CAF50;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.warning-badge {
    background: #ff6b6b;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    margin-left: 5px;
}

.thumbnails-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

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

.video-card {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.video-preview {
    width: 100%;
    height: 150px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    color: white;
    position: relative;
    overflow: hidden;
}

.video-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0,0,0,0.1), rgba(255,255,255,0.1));
}

.no-thumbnail-placeholder {
    text-align: center;
    z-index: 1;
}

.no-thumbnail-placeholder i {
    font-size: 48px;
    margin-bottom: 10px;
    display: block;
    opacity: 0.8;
}

.video-info h6 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 12px;
    color: #666;
}

.video-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
}

.video-actions {
    display: flex;
    gap: 8px;
}

.batch-progress {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}

.batch-progress .progress-bar {
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.batch-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    transition: width 0.3s ease;
}

.thumbnails-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid #3498db;
}

.thumbnails-info h5 {
    margin-top: 0;
    color: #2c3e50;
}

.thumbnails-info ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.thumbnails-info li {
    margin-bottom: 5px;
    color: #555;
    line-height: 1.5;
}

.thumbnails-info code {
    background: #e9ecef;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 12px;
}

.thumbnails-info a {
    color: #3498db;
    text-decoration: none;
}

.thumbnails-info a:hover {
    text-decoration: underline;
}

/* Таблица логов */
.thumbnail-logs {
    margin-top: 20px;
}

.logs-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-top: 10px;
}

.log-header {
    display: grid;
    grid-template-columns: 150px 100px 100px 1fr;
    background: #3498db;
    color: white;
    font-weight: bold;
    padding: 10px 15px;
}

.log-cell {
    padding: 8px 5px;
}

.log-row {
    display: grid;
    grid-template-columns: 150px 100px 100px 1fr;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

.log-row:nth-child(even) {
    background: #f9f9f9;
}

.log-row:hover {
    background: #f0f7ff;
}

.log-row.success {
    border-left: 4px solid #4CAF50;
}

.log-row.error {
    border-left: 4px solid #e74c3c;
}

.log-row.warning {
    border-left: 4px solid #f39c12;
}

.log-row.info {
    border-left: 4px solid #3498db;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-badge.success {
    background: #d4edda;
    color: #155724;
}

.status-badge.error {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.warning {
    background: #fff3cd;
    color: #856404;
}

.status-badge.info {
    background: #d1ecf1;
    color: #0c5460;
}

/* ========== РЕАКЦИИ И КОММЕНТАРИИ ========== */

/* Секция реакций */
.reactions-section {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.reactions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.reaction-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.reaction-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    color: #495057;
}

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

.reaction-btn.active {
    background: linear-gradient(135deg, #ffe5e5 0%, #ffd6d6 100%);
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.reaction-btn i {
    font-size: 18px;
}

.reaction-count {
    font-size: 14px;
    font-weight: 600;
    min-width: 20px;
}

.reactions-total {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

/* Секция комментариев */
.comments-section {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.comments-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f8f9fa;
}

.comments-header h4 {
    color: #495057;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comments-header i {
    color: var(--primary);
}

/* Форма комментария */
.comment-form {
    margin-bottom: 20px;
}

.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.2s;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.comment-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.comment-counter {
    font-size: 12px;
    color: #6c757d;
}

/* Список комментариев */
.comments-list {
    max-height: 400px;
    overflow-y: auto;
}

.no-comments {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.no-comments i {
    font-size: 48px;
    margin-bottom: 10px;
    display: block;
}

.comments-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background 0.2s;
}

.comment-item:hover {
    background: #e9ecef;
}

.comment-item.own-comment {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-left: 3px solid var(--success);
}

.comment-item.admin-comment {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 3px solid var(--info);
}

.comment-avatar {
    flex-shrink: 0;
    font-size: 32px;
    color: #adb5bd;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 8px;
}

.comment-author {
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 6px;
}

.comment-author.admin {
    color: var(--info);
}

.comment-author i {
    font-size: 14px;
}

.comment-date {
    font-size: 12px;
    color: #6c757d;
}

.comment-text {
    color: #212529;
    line-height: 1.5;
    word-wrap: break-word;
    margin-bottom: 8px;
}

.comment-actions {
    display: flex;
    gap: 8px;
}

.btn-delete-comment {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
    font-size: 14px;
}

.btn-delete-comment:hover {
    background: rgba(220, 53, 69, 0.1);
}

/* Адаптивность для комментариев */
@media (max-width: 768px) {
    .reactions-section,
    .comments-section {
        padding: 15px;
    }

    .reaction-btn {
        padding: 6px 10px;
        font-size: 14px;
    }

    .comment-item {
        flex-direction: column;
        gap: 8px;
    }

    .comment-avatar {
        font-size: 24px;
    }
}

/* ========== НОВОСТИ НА СТРАНИЦЕ АВТОРИЗАЦИИ ========== */

.news-section-auth {
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
    max-height: 400px;
    overflow-y: auto;
}

.news-section-auth h3 {
    color: #495057;
    font-size: 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-section-auth h3 i {
    color: var(--primary);
}

.news-loading {
    text-align: center;
    padding: 30px 20px;
    color: #6c757d;
}

.news-loading i {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
    color: var(--primary);
}

.news-list-auth {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-item-auth {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.news-item-auth:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.news-item-auth.pinned {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
    border-left-color: #ffc107;
}

.news-icon {
    flex-shrink: 0;
    font-size: 32px;
    line-height: 1;
}

.news-content {
    flex: 1;
    min-width: 0;
}

.news-content h4 {
    color: #212529;
    font-size: 14px;
    margin-bottom: 6px;
    font-weight: 600;
}

.news-text {
    color: #495057;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 8px;
    white-space: pre-line;
}

.news-text strong {
    color: #212529;
    font-weight: 600;
}

.news-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: #6c757d;
    flex-wrap: wrap;
}

.news-author {
    display: flex;
    align-items: center;
    gap: 4px;
}

.news-author i {
    font-size: 10px;
}

.news-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Адаптивность для новостей */
@media (max-width: 768px) {
    .news-section-auth {
        max-height: 300px;
        padding: 12px;
    }

    .news-item-auth {
        flex-direction: column;
        gap: 8px;
    }

    .news-icon {
        font-size: 24px;
    }

    .news-content h4 {
        font-size: 13px;
    }

    .news-text {
        font-size: 12px;
    }
}

/* ========== КАРТА ВОСПОМИНАНИЙ ========== */

.memories-map-wrapper {
    padding: 30px 0;
    min-height: 80vh;
}

.memories-map-section .section-header {
    text-align: center;
    margin-bottom: 30px;
}

.map-controls {
    text-align: center;
    margin-bottom: 20px;
}

.btn-add-location {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(248, 181, 209, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-add-location:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(248, 181, 209, 0.5);
}

.memories-map {
    width: 100%;
    height: 500px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow);
    margin-bottom: 40px;
    z-index: 1;
}

.locations-list h3 {
    color: var(--text);
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.locations-list h3 i {
    color: var(--primary);
}

.no-locations {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    color: var(--text-light);
}

.no-locations i {
    font-size: 64px;
    color: var(--primary-light);
    margin-bottom: 15px;
    display: block;
}

.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.location-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.location-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow);
}

.location-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--primary);
}

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

.location-info {
    padding: 20px;
}

.location-info h4 {
    color: var(--text);
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.location-date {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.location-description {
    color: var(--text);
    line-height: 1.6;
    font-size: 0.95rem;
}

.btn-delete-location {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 107, 107, 0.9);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
    opacity: 0;
}

.location-card:hover .btn-delete-location {
    opacity: 1;
}

.btn-delete-location:hover {
    background: #ff6b6b;
    transform: scale(1.1);
}

/* Модальное окно добавления места */
.modal-location {
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
}

.modal-location .modal-title {
    font-size: 1.8rem;
    color: var(--text);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-location .modal-title i {
    color: var(--primary);
}

/* Мини-карта для выбора места */
.location-map-picker {
    margin: 20px 0;
    border: 2px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.map-picker-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.map-picker-header i {
    font-size: 18px;
}

.location-picker-map {
    width: 100%;
    height: 300px;
}

.map-picker-help {
    background: var(--bg-light);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-light);
    border-top: 1px solid var(--border);
}

.map-picker-help i {
    color: var(--primary);
}

/* Поля с иконками в модалке */
.modal-location .input-with-icon .input-field {
    padding: 12px 15px 12px 42px;
    border-radius: 10px;
    font-size: 14px;
}

.modal-location .input-with-icon .input-icon {
    left: 14px;
    font-size: 16px;
    color: var(--primary);
}

.modal-location .textarea-wrapper .input-icon {
    top: 16px;
}

/* Действия формы */
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.btn-location {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(248, 181, 209, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-location:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(248, 181, 209, 0.5);
}

.btn-location:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-cancel {
    background: #e0e0e0;
    color: var(--text);
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-cancel:hover {
    background: #d0d0d0;
    transform: translateY(-2px);
}

/* Выбор фотографии */
.photo-preview-box {
    margin-top: 10px;
    border: 2px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-light);
}

.preview-image-container {
    width: 100%;
    height: 200px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.preview-info {
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--success-light, #d4edda);
    border-top: 1px solid var(--border);
}

.preview-info span {
    color: var(--success-dark, #155724);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-remove-photo {
    background: var(--danger);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-remove-photo:hover {
    background: #ff5252;
    transform: scale(1.1);
}

.photo-select-box {
    margin-top: 10px;
    text-align: center;
    padding: 30px 20px;
    border: 2px dashed var(--border);
    border-radius: 12px;
    background: var(--bg-light);
}

.btn-select-photo {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(248, 181, 209, 0.4);
}

.btn-select-photo:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(248, 181, 209, 0.5);
}

.photo-select-hint {
    margin-top: 12px;
    color: var(--text-light);
    font-size: 13px;
}

/* Модальное окно выбора фото */
.modal-photo-selector {
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-photo-selector h3 {
    font-size: 1.6rem;
    color: var(--text);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-photo-selector h3 i {
    color: var(--primary);
}

.photo-selector-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-filter {
    background: var(--bg-light);
    border: 2px solid var(--border);
    color: var(--text);
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-filter:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

.btn-filter.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-color: var(--primary);
}

.photo-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.photo-selector-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    background: var(--bg);
}

.photo-selector-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--shadow);
}

.photo-selector-item.selected {
    border-color: var(--success);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.photo-selector-thumbnail {
    width: 100%;
    height: 150px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.photo-selector-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
    visibility: visible !important;
    opacity: 1 !important;
}

.photo-selector-item:hover .photo-selector-thumbnail img {
    transform: scale(1.1);
}

.video-thumbnail {
    font-size: 48px;
    color: var(--text-light);
}

.photo-selector-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(76, 175, 80, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-selector-item.selected .photo-selector-overlay {
    opacity: 1;
}

.photo-selector-overlay i {
    font-size: 48px;
}

.photo-selector-overlay span {
    font-weight: 600;
    font-size: 14px;
}

.no-photos {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.no-photos i {
    font-size: 64px;
    margin-bottom: 15px;
    color: var(--primary-light);
}

.photo-selector-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Адаптивность для выбора фото */
@media (max-width: 768px) {
    .photo-selector-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .photo-selector-thumbnail {
        height: 100px;
    }

    .modal-photo-selector {
        max-width: 100%;
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .photo-selector-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .preview-image-container {
        height: 150px;
    }
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Адаптивность для карты */
@media (max-width: 768px) {
    .memories-map {
        height: 400px;
    }

    .locations-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .memories-map {
        height: 300px;
    }

    .location-image {
        height: 150px;
    }
}

/* ========== ГОСТЕВАЯ КНИГА ========== */

.guestbook-wrapper {
    padding: 30px 0;
    min-height: 60vh;
}

.guestbook-section {
    padding: 30px 0;
}

.guestbook-section .section-header {
    text-align: center;
    margin-bottom: 30px;
}

.guestbook-section .section-header h2 {
    color: var(--text);
    font-size: 2rem;
    margin-bottom: 10px;
}

.guestbook-section .section-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Форма гостевой книги */
.guestbook-form {
    margin-bottom: 40px;
}

.form-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px var(--shadow);
    border: 2px solid var(--primary-light);
}

.form-card h3 {
    color: var(--text);
    font-size: 1.4rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-card h3 i {
    color: var(--primary);
}

.message-counter {
    text-align: right;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 5px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
}

/* Поля ввода с иконками */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon .input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 18px;
    z-index: 2;
    transition: color 0.3s ease;
}

.textarea-wrapper .input-icon {
    top: 18px;
}

.input-with-icon .input-field {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.input-with-icon .input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(248, 181, 209, 0.2);
}

.input-with-icon .input-field:focus + .input-icon,
.input-with-icon:focus-within .input-icon {
    color: var(--primary-dark, #d63384);
}

.textarea-wrapper .input-field.textarea-field {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

/* Кнопка отправки */
.btn-guestbook {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    padding: 14px 35px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(248, 181, 209, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.btn-guestbook:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(248, 181, 209, 0.5);
}

.btn-guestbook:active:not(:disabled) {
    transform: translateY(0);
}

.btn-guestbook:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Список записей */
.guestbook-entries h3 {
    color: var(--text);
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.guestbook-entries h3 i {
    color: var(--primary);
}

.no-entries {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    color: var(--text-light);
}

.no-entries i {
    font-size: 64px;
    color: var(--primary-light);
    margin-bottom: 15px;
    display: block;
}

.entries-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.entry-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px var(--shadow);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary);
}

.entry-card:hover {
    box-shadow: 0 4px 20px var(--shadow);
    transform: translateY(-2px);
}

.entry-card.admin-note {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left-color: var(--info);
}

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

.entry-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    font-size: 40px;
    color: var(--primary);
}

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

.author-name {
    font-weight: 700;
    color: var(--text);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.author-name.admin {
    color: var(--info);
}

.author-name i {
    font-size: 14px;
}

.entry-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

.btn-delete-entry {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.btn-delete-entry:hover {
    background: linear-gradient(135deg, #ee5a5a 0%, #dd4a4a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.btn-delete-entry:active {
    transform: translateY(0);
}

.entry-message {
    color: var(--text);
    line-height: 1.7;
    font-size: 1rem;
    white-space: pre-line;
}

.entry-message strong {
    color: var(--text);
    font-weight: 600;
}

/* Адаптивность для гостевой книги */
@media (max-width: 768px) {
    .guestbook-section {
        padding: 20px 0;
    }

    .guestbook-section .section-header h2 {
        font-size: 1.5rem;
    }

    .form-card {
        padding: 20px;
    }

    .entry-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .entry-card.admin-note {
        background: white;
        border-left-color: var(--info);
    }
}

@media (max-width: 480px) {
    .author-avatar {
        font-size: 32px;
    }

    .author-name {
        font-size: 1rem;
    }

    .entry-message {
        font-size: 0.95rem;
    }
}