/* ===== СТРАНИЦА КОЛЛЕКЦИИ ===== */

/* Основной контейнер */
.list-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Шапка коллекции */
.list-header {
    position: relative;
    background: linear-gradient(135deg, var(--main-color) 0%, var(--accent) 100%);
    border-radius: 16px;
    margin-bottom: 40px;
    overflow: hidden;
    min-height: 300px;
    display: flex;
    align-items: center;
}

.list-header-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.list-header-content {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 30px;
    padding: 40px;
    width: 100%;
    align-items: flex-start;
    background: rgb(203 194 194 / 10%);
}

.list-poster {
    flex-shrink: 0;
}

.poster-image {
    width: 200px;
    height: 280px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.poster-placeholder {
    width: 200px;
    height: 280px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.list-info {
    flex: 1;
    color: white;
}

.list-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.list-type {
    display: flex;
    gap: 10px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    border: 1px solid transparent;
    backdrop-filter: blur(10px);
}

.tag-icon {
    font-size: 14px;
    line-height: 1;
}

.tag-text {
    white-space: nowrap;
}

/* Системная коллекция */
.system-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Публичные коллекции */
.public-tag {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.public-mod-tag {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
}

.public-open-tag {
    background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
    color: white;
}

/* Приватные коллекции */
.private-tag {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
}

.friends-tag {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
    color: white;
}

.selected-friends-tag {
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
    color: white;
}

.unknown-tag {
    background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%);
    color: white;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .tag {
        padding: 4px 8px;
        font-size: 10px;
        gap: 4px;
    }
    
    .tag-icon {
        font-size: 12px;
    }
    
    /* Скрываем текст на очень маленьких экранах, оставляем только иконку */
    @media (max-width: 480px) {
        .tag-text {
            display: none;
        }
        
        .tag {
            padding: 6px;
            border-radius: 50%;
            aspect-ratio: 1;
        }
    }
}

/* Анимация при наведении */
.tag {
    transition: all 0.3s ease;
    transform: translateY(0);
}

.tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.list-stats {
    display: flex;
    gap: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.list-title {
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 10px 0;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.list-author {
    font-size: 16px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.author-link {
    color: white;
    font-weight: 600;
    text-decoration: none;
}

.author-link:hover {
    text-decoration: underline;
}

.list-description {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.95);
    max-width: 600px;
}

.list-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-action:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.btn-action.active {
    background: rgba(255, 255, 255, 0.3);
}

.list-dates {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* Основное содержимое */
.list-main {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    padding: 30px;
}

/* Панель управления */
.list-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.view-controls {
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 4px;
}

.view-btn {
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #888;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.view-btn.active {
    color: white;
    background: var(--main-color);
}





/* Контейнер фильмов */
.movies-container {
    position: relative;
}

/* По умолчанию оба скрыты */
.movies-grid,
.movies-list {
    display: none;
}

/* Только активный блок показывается */
.movies-grid.active {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

.movies-list.active {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Остальные стили остаются без изменений */
.movie-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.movie-poster {
    display: block;
    position: relative;
    overflow: hidden;
}

.movie-poster img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.movie-card:hover .movie-poster img {
    transform: scale(1.05);
}

.poster-placeholder {
    width: 100%;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.movie-rating {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.rating-high {
    background: #4CAF50;
}

.rating-mid {
    background: #ff9800;
}

.rating-low {
    background: #f44336;
}

.movie-info {
    padding: 15px;
}

.movie-title {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.movie-title a {
    color: white;
    text-decoration: none;
}

.movie-title a:hover {
    color: var(--main-color);
}

.movie-year {
    color: #888;
    font-size: 12px;
    margin-bottom: 5px;
}

.movie-genres {
    color: #666;
    font-size: 11px;
}

.remove-from-list {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.movie-card:hover .remove-from-list {
    opacity: 1;
}

.remove-from-list:hover {
    background: rgba(244, 67, 54, 0.8);
}

/* Стили для списка */
.movie-list-item {
    display: flex;
    gap: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.movie-list-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(5px);
}

.list-poster {
    flex-shrink: 0;
    width: 80px;
    height: 120px;
}

.list-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.list-poster .poster-placeholder {
    width: 80px;
    height: 120px;
    border-radius: 8px;
}

.list-movie-info {
    flex: 1;
}

.list-movie-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.list-movie-title a {
    color: white;
    text-decoration: none;
}

.list-movie-title a:hover {
    color: var(--main-color);
}

.list-movie-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.meta-item {
    color: #888;
    font-size: 14px;
}

.list-movie-description {
    color: #ccc;
    font-size: 14px;
    line-height: 1.4;
    max-width: 600px;
}

.movie-list-item .remove-from-list {
    position: static;
    opacity: 1;
    align-self: flex-start;
}











/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #1a1a1a;
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}





.close {
    color: #888;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: white;
}

.modal-body {
    padding: 30px;
}

/* Формы */



.form-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--main-color);
    background: rgba(255, 255, 255, 0.08);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}


/* Кнопки */

.btn-primary {
    background: var(--main-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--accent);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Общий доступ */
.share-url {
    margin-bottom: 25px;
}

.url-container {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.url-container .form-input {
    flex: 1;
}

.btn-copy {
    background: var(--main-color);
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-copy:hover {
    background: var(--accent);
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-btn.vk {
    background: #4C75A3;
}

.share-btn.telegram {
    background: #0088cc;
}

.share-btn.twitter {
    background: #1DA1F2;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Уведомления */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.notification-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}










/* Адаптивность */
@media (max-width: 768px) {

    .list-container {
        padding: 0 15px;
    }
    
    .list-header-content {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
        gap: 20px;
    }
    
    .list-poster {
        align-self: center;
    }
    
    .poster-image,
    .poster-placeholder {
        width: 150px;
        height: 210px;
    }
    
    .list-title {
        font-size: 28px;
    }
    
    .list-meta {
        justify-content: center;
    }
    
    .list-stats {
        justify-content: center;
        width: 100%;
    }
    
    .list-actions {
        justify-content: center;
    }
    
    .list-controls {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }
    

    
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .movie-poster img {
        height: 225px;
    }
    
    .movie-list-item {
        flex-direction: column;
        gap: 15px;
    }
    
    .list-poster {
        align-self: flex-start;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    
    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .movies-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .list-actions {
        flex-direction: column;
    }
    
    .btn-action {
        justify-content: center;
    }
    
    .share-buttons {
        grid-template-columns: 1fr;
    }
}


/* Стили для модалки предложения фильмов */
.btn-suggest {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-suggest:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.search-container-block {
    position: relative;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-item.selected {
    background-color: #e3f2fd;
}

.search-result-item:last-child {
    border-bottom: none;
}

.movie-search-poster {
    width: 40px;
    height: 60px;
    margin-right: 12px;
    flex-shrink: 0;
}

.movie-search-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.poster-placeholder-small {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.movie-search-info {
    flex: 1;
    min-width: 0;
}

.movie-search-title {
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-search-meta {
    font-size: 12px;
    color: #6c757d;
}

.movie-search-meta span {
    margin-right: 8px;
}

.meta-rating {
    color: #ffc107;
    font-weight: 600;
}

.add-movie-btn {
    width: 32px;
    height: 32px;
    border: 2px solid #007bff;
    background: white;
    color: #007bff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    flex-shrink: 0;
    transition: all 0.2s;
}

.add-movie-btn:hover {
    background: #007bff;
    color: white;
}

.selected-movies {
    min-height: 100px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 12px;
}

.empty-state {
    text-align: center;
    color: #6c757d;
    padding: 20px;
}

.empty-state svg {
    margin-bottom: 8px;
}

.selected-movie-item {
    display: flex;
    align-items: center;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 8px;
}

.selected-movie-item:last-child {
    margin-bottom: 0;
}

.selected-movie-poster {
    width: 40px;
    height: 60px;
    margin-right: 12px;
    flex-shrink: 0;
}

.selected-movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.selected-movie-info {
    flex: 1;
}

.selected-movie-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.selected-movie-year {
    font-size: 12px;
    color: #6c757d;
}

.remove-selected-movie {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.remove-selected-movie:hover {
    background: #f8d7da;
}

.suggest-info {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-left: 4px solid var(--accent);
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.suggest-info::before {
    content: "💡";
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.suggest-info p {
    margin: 0 0 12px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #2d3748;
}

.suggest-info p:last-child {
    margin-bottom: 0;
}

.no-results {
    padding: 20px;
    text-align: center;
    color: #6c757d;
}







.friends-access-container {
  padding: 20px;
}

.access-section {
  margin-bottom: 25px;
}

.access-section h4 {
  margin-bottom: 15px;
  color: #333;
  font-size: 16px;
}

.friends-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px;
}

.friend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 8px;
  transition: background-color 0.2s;
}

.friend-item:last-child {
  margin-bottom: 0;
}

.friend-item.allowed {
  background-color: #f8fff8;
  border: 1px solid #e6f7e6;
}

.friend-item.available {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
}

.friend-item:hover {
  background-color: #f0f0f0;
}

.friend-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.friend-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.friend-details {
  display: flex;
  flex-direction: column;
}

.friend-name {
  font-weight: 500;
  color: #333;
}

.friend-login {
  color: #666;
  font-size: 12px;
}

.remove-access-btn, .add-access-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.remove-access-btn {
  color: #ff4444;
}

.remove-access-btn:hover {
  background-color: #ffe6e6;
}

.add-access-btn {
  color: #00c851;
}

.add-access-btn:hover {
  background-color: #e6f7e6;
}

.friends-search {
  position: relative;
  margin-bottom: 15px;
}

.friends-search input {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.available-friends {
  max-height: 250px;
  overflow-y: auto;
}

.empty-state {
  text-align: center;
  padding: 30px;
  color: #666;
}

.empty-state svg {
  margin-bottom: 10px;
  opacity: 0.5;
}