/* ===== СТРАНИЦА ПОЛЬЗОВАТЕЛЯ ===== */

/* Основной контейнер профиля */
.profile-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-top: 30px;
}

/* Боковая панель профиля */
.profile-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.profile-main {
    flex: 1;
    width: 100%;
}

/* Аватар пользователя */
.profile-avatar {
    display: flex;
    text-align: center;
    margin-bottom: 30px;
    flex-direction: column;
    align-items: stretch;
}

.avatar-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--main-color);
    margin: 0 auto 15px;
}

.profile-username {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
}

.profile-status {
    color: #888;
    font-size: 14px;
}

/* Статистика профиля */
.profile-stats {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    color: #ccc;
    font-size: 14px;
}

.stat-value {
    color: white;
    font-weight: 600;
}

/* Информация о пользователе */
.profile-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
}

.info-item {
    margin-bottom: 15px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-label {
    color: #ccc;
    font-size: 12px;
    margin-bottom: 5px;
}

.info-value {
    color: white;
    font-size: 14px;
}

/* Заголовки секций профиля */
.profile-section {
    margin-bottom: 40px;
}

.section-header-profile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--main-color);
}

.section-title-profile h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: white;
}

/* Сетка активности */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.activity-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    transition: var(--transition);
}

.activity-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.activity-header {
    display: flex;
    justify-content: between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.activity-movie {
    flex: 1;
}

.activity-movie-title {
    font-weight: 600;
    color: white;
    margin-bottom: 5px;
}

.activity-movie-year {
    color: #888;
    font-size: 12px;
}

.activity-rating {
    background: var(--main-color);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
}

.activity-content {
    color: #ccc;
    font-size: 14px;
    line-height: 1.4;
}

.activity-date {
    color: #666;
    font-size: 12px;
    margin-top: 10px;
}

/* Списки пользователя */
.lists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.list-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.list-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.list-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--main-color);
}

.list-title {
    font-weight: 600;
    color: white;
    margin-bottom: 10px;
    font-size: 16px;
}

.list-stats {
    display: flex;
    gap: 15px;
    color: #888;
    font-size: 12px;
}

.list-movies-count::before {
    content: '🎬';
    margin-right: 5px;
}

.list-likes-count::before {
    content: '❤️';
    margin-right: 5px;
}

/* Настройки профиля */
.settings-form {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    color: white;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--main-color);
    background: rgba(255, 255, 255, 0.15);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Кнопки профиля */
.profile-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-primary {
    background: var(--main-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.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: var(--transition);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Бейдж достижений */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 15px;
}

.achievement-item {
    text-align: center;
}

.achievement-icon {
    width: 60px;
    height: 60px;
    background: var(--main-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 20px;
}

.achievement-name {
    font-size: 11px;
    color: #ccc;
    line-height: 1.2;
}

/* Адаптивность */
@media (max-width: 768px) {
    .profile-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .profile-sidebar {
        width: 100%;
    }
    
    .activity-grid {
        grid-template-columns: 1fr;
    }
    
    .lists-grid {
        grid-template-columns: 1fr;
    }
}

/* Индикатор онлайн-статуса */
.online-status {
    position: relative;
    display: inline-block;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #15d415;
    position: absolute;
bottom: 15px;
    left: 60px;
    border: 2px solid white;
}

.status-dot.offline {
    background: #888;
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: #1a1a1a;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    margin: 0;
    color: white;
    font-size: 18px;
}

.close {
    color: #aaa;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: white;
}

.modal-body {
    padding: 20px;
}

.upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 20px;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--main-color);
    background: rgba(255, 255, 255, 0.05);
}

.upload-area p {
    margin: 0;
    color: #ccc;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Стили для вкладок */
.profile-tabs {
    display: flex;
    border-bottom: 2px solid var(--main-color);
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 5px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    color: #ccc;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: white;
    border-bottom-color: var(--main-color);
    background: rgba(255, 255, 255, 0.1);
}

.tab-content {
    position: relative;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Стили для сетки фильмов */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.movie-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.movie-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

.movie-poster {
    display: block;
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.movie-card:hover .movie-poster img {
    transform: scale(1.05);
}

.poster-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.user-rating {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
}

.rating-high { background: #4CAF50 !important; }
.rating-mid { background: #FF9800 !important; }
.rating-low { background: #F44336 !important; }

.movie-info {
    padding: 12px;
}

.movie-title {
    margin: 0 0 5px 0;
    font-size: 14px;
    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;
}

.rating-date {
    color: #666;
    font-size: 11px;
}

.movie-comment {
    margin-top: 8px;
    font-size: 12px;
    color: #ccc;
    line-height: 1.3;
}

/* Стили для сетки коллекций */
.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.collection-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    transition: var(--transition);
    border-left: 4px solid var(--main-color);
}

.collection-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.collection-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.collection-title {
    margin: 0;
    font-size: 18px;
}

.collection-title a {
    color: white;
    text-decoration: none;
}

.collection-title a:hover {
    color: var(--main-color);
}

.collection-stats {
    color: #888;
    font-size: 14px;
}

.collection-description {
    color: #ccc;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 15px;
}

.collection-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #666;
}

.collection-status {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.collection-status.public {
    background: #4CAF50;
    color: white;
}

.collection-status.private {
    background: #F44336;
    color: white;
}

/* Стили для сетки друзей */
.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.friend-card {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    transition: var(--transition);
    position: relative;
}

.friend-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.friend-avatar {
    position: relative;
    margin-right: 15px;
}

.friend-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.friend-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #1a1a1a;
}

.friend-status.online {
    background: #15d415;
}

.friend-status.offline {
    background: #888;
}

.friend-info {
    flex: 1;
}

.friend-name {
    margin: 0 0 5px 0;
    font-size: 16px;
}

.friend-name a {
    color: white;
    text-decoration: none;
}

.friend-name a:hover {
    color: var(--main-color);
}

.friend-stats {
    color: #888;
    font-size: 12px;
}

.friend-action-btn {
    background: none;
    border: none;
    color: #F44336;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: var(--transition);
}

.friend-action-btn:hover {
    background: rgba(244, 67, 54, 0.1);
}

/* Стили для кнопки друзей */
.friend-action {
    margin-top: 15px;
}

.btn-friend {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-add-friend {
    background: var(--main-color);
    color: white;
}

.btn-add-friend:hover {
    background: var(--accent);
}

.btn-remove-friend {
    background: rgba(244, 67, 54, 0.2);
    color: #F44336;
    border: 1px solid #F44336;
}

.btn-remove-friend:hover {
    background: rgba(244, 67, 54, 0.3);
}

/* Стили для заголовков секций */
.view-all-link {
    color: var(--main-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.view-all-link:hover {
    text-decoration: underline;
}

.friends-count {
    color: #888;
    font-size: 14px;
}

/* Стили для пустых состояний */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.empty-state svg {
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state p {
    margin: 0 0 20px 0;
    font-size: 16px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .profile-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        text-align: left;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        border-left: 3px solid transparent;
        margin-bottom: 0;
    }
    
    .tab-btn.active {
        border-left-color: var(--main-color);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
    }
    
    .collections-grid {
        grid-template-columns: 1fr;
    }
    
    .friends-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header-profile {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}