/* components.css - переиспользуемые компоненты */

/* Заголовки секций */
.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2c3e50;
    position: relative;
    padding-bottom: 10px;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #e94560, #3498db);
    border-radius: 2px;
}

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

.section-link {
    color: #e94560;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.section-link:hover {
    color: #3498db;
}

/* Карточки новостей */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.news-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e1e8ed;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.news-card:hover {
    transform: translateY(-3px);
    border-color: #e94560;
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.1);
}

.news-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid #e1e8ed;
}

.news-content {
    padding: 15px;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 8px;
    color: #2c3e50;
    line-height: 1.4;
}

.news-excerpt {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin: 0 0 12px;
    line-height: 1.5;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #95a5a6;
}

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

/* Сетка карточек */
.items-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 40px;
}

.item-card {
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e1e8ed;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.item-card:hover {
    transform: translateY(-3px);
    border-color: #e94560;
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.1);
}

.item-poster {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid #e1e8ed;
}

.item-info {
    padding: 10px;
}

.item-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 5px;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #95a5a6;
}

.item-rating {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    color: #f1c40f;
    font-weight: 600;
}

.item-badge {
    background: #3498db;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.65rem;
}

/* Список популярного */
.popular-list {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e1e8ed;
    overflow: hidden;
    margin-bottom: 40px;
}

.popular-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #e1e8ed;
    transition: background 0.2s;
}

.popular-item:last-child {
    border-bottom: none;
}

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

.popular-rank {
    width: 30px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #bdc3c7;
    margin-right: 15px;
}

.popular-info {
    flex: 1;
}

.popular-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 3px;
}

.popular-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: #95a5a6;
}

.popular-rating {
    color: #f1c40f;
    font-weight: 600;
}

.popular-votes {
    color: #e94560;
}

.popular-link {
    color: #3498db;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s;
}

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

/* Статистика */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    border: 1px solid #e1e8ed;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.stat-icon {
    font-size: 2rem;
    color: #e94560;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* Уведомления */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ffffff;
    border-left: 4px solid;
    border-radius: 4px;
    padding: 12px 16px;
    color: #2c3e50;
    z-index: 9999;
    animation: slideIn 0.2s ease;
    max-width: 300px;
    font-size: 0.9rem;
    border: 1px solid #e1e8ed;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Загрузка */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
}

.loading-spinner-large {
    width: 50px;
    height: 50px;
    border: 3px solid #ecf0f1;
    border-top-color: #e94560;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* components.css - переиспользуемые компоненты */

/* Заголовок страницы */
.main-title {
    margin-bottom: 25px;
}

.main-title h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: #e94560;
}

.main-title p {
    color: #7f8c8d;
    font-size: 0.95rem;
}

.pagination-info {
    margin-top: 10px;
    color: #3498db;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Фильтр жанров */
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #ffffff;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 10px;
    border: 1px solid #e1e8ed;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.filter-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #e94560;
}

.filter-toggle {
    background: #f8f9fa;
    border: none;
    color: #7f8c8d;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
}

.filter-content {
    transition: all 0.2s;
    margin-bottom: 15px;
}

.genre-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 5px 0;
}

.genre-btn {
    padding: 6px 12px;
    background: #ffffff;
    border: 1px solid #e1e8ed;
    border-radius: 4px;
    color: #7f8c8d;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.genre-btn:hover {
    border-color: #e94560;
    color: #e94560;
    background: #fff5f7;
}

.genre-btn.active {
    background: #e94560;
    border-color: #e94560;
    color: #ffffff;
    font-weight: 600;
}

/* Статистика */
.stats-section {
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e1e8ed;
    margin-bottom: 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
}

.stats-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #e94560;
}

.stats-toggle {
    background: #f8f9fa;
    border: none;
    color: #7f8c8d;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
}

.stats-content {
    max-height: 300px;
    overflow: hidden;
    transition: all 0.2s;
    padding: 15px;
    border-top: 1px solid #e1e8ed;
}

.stats-content.hidden {
    max-height: 0;
    padding: 0;
    border-top: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.stat-item {
    text-align: center;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #e94560;
    line-height: 1.2;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.7rem;
    text-transform: uppercase;
}