/* Kids Engine - Современный дизайн */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: #f8f9fa;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Адаптивность для мобильных */
@media (max-width: 992px) {
    .main-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: static;
        margin-bottom: 20px;
    }
    
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-item {
        flex-shrink: 0;
    }
    
    .tab-item a {
        white-space: nowrap;
        padding: 12px 20px;
    }
}

/* Header */
header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 20px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 28px;
    font-weight: 700;
}

header h1 a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

header h1 a:hover {
    opacity: 0.9;
}

/* Основной layout с сайдбаром */
.main-layout {
    display: flex;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Сайдбар */
.sidebar {
    width: 300px;
    flex-shrink: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 0;
    height: fit-content;
    position: sticky;
    top: 20px;
    overflow: hidden;
}

.sidebar-content {
    padding: 20px;
}

/* Статистика матчей */
.matches-stats {
    padding: 0;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 14px;
}

.stat-label {
    color: #6c757d;
    font-weight: 500;
}

.stat-value {
    color: #2c3e50;
    font-weight: 700;
    font-size: 16px;
}

.sidebar-divider {
    height: 1px;
    background: #e9ecef;
    margin: 15px 0;
}

/* Группы видов спорта */
.sport-group {
    margin-bottom: 20px;
}

.sport-group:last-child {
    margin-bottom: 0;
}

.sport-title {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 12px 0;
    padding: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    margin-bottom: 4px;
}

.category-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    text-decoration: none;
    color: #2c3e50;
    border-radius: 6px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.category-link:hover {
    background: #f8f9fa;
    color: #3498db;
}

.category-item.active .category-link {
    background: #e8f4f8;
    color: #2c3e50;
    border-left-color: #3498db;
    font-weight: 600;
}

.category-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 4px;
    background: #f8f9fa;
    padding: 2px;
}

.category-icon-placeholder {
    width: 28px;
    height: 28px;
    background: #e9ecef;
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-icon-placeholder::before {
    content: '🏆';
    font-size: 14px;
}

.category-name {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-count {
    color: #6c757d;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
    min-width: 30px;
    text-align: right;
}

.category-item.active .category-count {
    color: #3498db;
}

.empty-categories {
    padding: 20px;
    text-align: center;
}

.empty-text {
    color: #999;
    font-size: 14px;
}

/* Основной контент */
.main-content {
    flex: 1;
    min-width: 0;
}

main {
    min-height: 60vh;
    padding-bottom: 40px;
}

footer {
    background: #2c3e50;
    color: white;
    padding: 30px 0;
    margin-top: 50px;
    text-align: center;
}

/* Промо-блоки архива */
.archive-promo-block {
    margin: 50px 0;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

.archive-promo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #dee2e6;
}

.archive-promo-header h2 {
    margin: 0;
    font-size: 24px;
    color: #2c3e50;
    border: none;
    padding: 0;
}

.archive-link {
    color: #3498db;
    font-weight: 600;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

.archive-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Архив - фильтры */
.archive-filters {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin: 30px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.archive-filters form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.filter-group select {
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    min-width: 200px;
    background: white;
}

.archive-filters button {
    padding: 10px 25px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.archive-filters button:hover {
    background: #2980b9;
}

.reset-filters {
    padding: 10px 20px;
    color: #6c757d;
    text-decoration: none;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    transition: all 0.3s;
}

.reset-filters:hover {
    background: #f8f9fa;
    color: #2c3e50;
}

/* Архив - SEO текст и статистика */
.archive-seo-text {
    background: #e8f4f8;
    padding: 25px;
    border-radius: 8px;
    margin: 30px 0;
    border-left: 4px solid #3498db;
}

.archive-seo-text p {
    margin: 0 0 15px 0;
    line-height: 1.8;
    color: #2c3e50;
}

.archive-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #b8d4e8;
}

.archive-stats strong {
    color: #2c3e50;
    font-size: 16px;
}

.archive-stats span {
    background: white;
    padding: 8px 15px;
    border-radius: 6px;
    font-weight: 600;
    color: #3498db;
    font-size: 14px;
}

/* Архив - навигация */
.archive-nav {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.archive-nav a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 15px;
    border: 1px solid #3498db;
    border-radius: 6px;
    transition: all 0.3s;
}

.archive-nav a:hover {
    background: #3498db;
    color: white;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 40px 0;
    padding: 20px;
}

.pagination a {
    padding: 10px 20px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.3s;
}

.pagination a:hover {
    background: #2980b9;
}

.pagination span {
    color: #6c757d;
    font-weight: 600;
}

/* Заголовки страниц */
h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #1a1a1a;
}

h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 40px 0 20px 0;
    color: #2c3e50;
    padding-bottom: 10px;
    border-bottom: 3px solid #3498db;
}

h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
}

/* Табы */
.tabs-container {
    margin: 30px 0;
    border-bottom: 2px solid #e9ecef;
}

.tabs {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0;
}

.tab-item {
    margin: 0;
}

.tab-item a {
    display: block;
    padding: 15px 25px;
    text-decoration: none;
    color: #6c757d;
    font-weight: 600;
    font-size: 15px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    position: relative;
    top: 2px;
}

.tab-item a:hover {
    color: #3498db;
    background: #f8f9fa;
}

.tab-item.active a {
    color: #3498db;
    border-bottom-color: #3498db;
    background: transparent;
}

/* Сетка прогнозов */
.predictions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.prediction-card {
    background: white;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e9ecef;
}

.prediction-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.prediction-card.completed {
    border-left: 4px solid #27ae60;
}

.prediction-card.completed::before {
    content: "Завершен";
    display: block;
    background: #27ae60;
    color: white;
    padding: 5px 15px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
}

.prediction-card h3 {
    padding: 20px 20px 10px 20px;
    margin: 0;
    font-size: 18px;
    line-height: 1.4;
}

.prediction-card h3 a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s;
}

.prediction-card h3 a:hover {
    color: #3498db;
}

.match-info {
    padding: 0 20px 15px 20px;
    color: #6c757d;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.match-result {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    font-size: 14px;
}

.match-result strong {
    color: #2c3e50;
}

/* Превью матча на странице прогноза */
.match-preview {
    background: white;
    border-radius: 16px;
    padding: 40px 30px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.match-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.match-tournament {
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.match-status-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

.match-status-badge.upcoming {
    background: #3498db;
    color: white;
}

.match-status-badge.completed {
    background: #27ae60;
    color: white;
}

.match-status-badge.cancelled {
    background: #e74c3c;
    color: white;
}

.match-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    align-items: center;
    margin-bottom: 25px;
}

.match-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.team-form {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.form-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #dee2e6;
}

.form-indicator.win {
    background: #27ae60;
}

.form-indicator.draw {
    background: #f39c12;
}

.form-indicator.loss {
    background: #e74c3c;
}

.team-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 10px;
    border: 2px solid #e9ecef;
}

.team-name {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
}

.team-country {
    font-size: 13px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.team-odds {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 15px;
    background: #e3f2fd;
    border-radius: 8px;
    border: 1px solid #90caf9;
}

.odds-label {
    font-size: 12px;
    font-weight: 600;
    color: #1976d2;
    text-transform: uppercase;
}

.odds-value {
    font-size: 18px;
    font-weight: 700;
    color: #1565c0;
}

.match-vs {
    font-size: 18px;
    font-weight: 600;
    color: #6c757d;
    padding: 0 20px;
}

.match-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    min-width: 200px;
}

.match-date-time {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    line-height: 1.4;
}

.match-date-time strong {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.match-stadium {
    font-size: 13px;
    color: #6c757d;
    text-align: center;
    font-style: italic;
}

/* Результат матча */
.match-result-box {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.match-result-box h2 {
    color: white;
    border-bottom: 2px solid rgba(255,255,255,0.3);
    margin-bottom: 20px;
    padding-bottom: 15px;
}

.match-score {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    margin: 20px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.match-score-full {
    font-size: 18px;
    text-align: center;
    opacity: 0.9;
    margin-bottom: 15px;
}

.match-winner {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid rgba(255,255,255,0.3);
}

.period-scores {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid rgba(255,255,255,0.3);
}

.period-scores strong {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    opacity: 0.9;
}

.period-scores ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.period-scores li {
    background: rgba(255,255,255,0.2);
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 600;
}

.match-result-box.cancelled {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

/* Контент прогноза */
.prediction-content {
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    line-height: 1.8;
    font-size: 16px;
}

.prediction-content h2 {
    font-size: 24px;
    margin: 30px 0 15px 0;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.prediction-content h3 {
    font-size: 20px;
    margin: 25px 0 12px 0;
    color: #34495e;
}

.prediction-content p {
    margin-bottom: 15px;
    color: #495057;
}

.prediction-content ul,
.prediction-content ol {
    margin: 15px 0 15px 30px;
    color: #495057;
}

.prediction-content li {
    margin-bottom: 8px;
}

.prediction-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.prediction-content table th {
    background: #3498db;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.prediction-content table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
}

.prediction-content table tr:hover {
    background: #f8f9fa;
}

/* Стили для описаний категорий (верхнее и нижнее) */
.category-description-top,
.category-description-bottom {
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    line-height: 1.8;
    font-size: 16px;
}

.category-description-top h2,
.category-description-bottom h2 {
    font-size: 24px;
    margin: 30px 0 15px 0;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.category-description-top h2:first-child,
.category-description-bottom h2:first-child {
    margin-top: 0;
}

.category-description-top h3,
.category-description-bottom h3 {
    font-size: 20px;
    margin: 25px 0 12px 0;
    color: #34495e;
}

.category-description-top p,
.category-description-bottom p {
    margin-bottom: 15px;
    color: #495057;
}

.category-description-top ul,
.category-description-top ol,
.category-description-bottom ul,
.category-description-bottom ol {
    margin: 15px 0 15px 30px;
    color: #495057;
}

.category-description-top li,
.category-description-bottom li {
    margin-bottom: 8px;
}

.category-description-top table,
.category-description-bottom table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.category-description-top table th,
.category-description-bottom table th {
    background: #3498db;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.category-description-top table td,
.category-description-bottom table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
}

.category-description-top table tr:hover,
.category-description-bottom table tr:hover {
    background: #f8f9fa;
}

/* Контент главной страницы (сверху и снизу) */
.home-content-top,
.home-content-bottom {
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    line-height: 1.8;
    font-size: 16px;
}

.home-content-top h2,
.home-content-bottom h2 {
    font-size: 24px;
    margin: 30px 0 15px 0;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.home-content-top h2:first-child,
.home-content-bottom h2:first-child {
    margin-top: 0;
}

.home-content-top h3,
.home-content-bottom h3 {
    font-size: 20px;
    margin: 25px 0 12px 0;
    color: #34495e;
}

.home-content-top p,
.home-content-bottom p {
    margin-bottom: 15px;
    color: #495057;
}

.home-content-top ul,
.home-content-top ol,
.home-content-bottom ul,
.home-content-bottom ol {
    margin: 15px 0 15px 30px;
    color: #495057;
}

.home-content-top li,
.home-content-bottom li {
    margin-bottom: 8px;
}

/* Системные страницы */
.custom-page-content {
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    line-height: 1.8;
    font-size: 16px;
}

.custom-page-content h2 {
    font-size: 24px;
    margin: 30px 0 15px 0;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.custom-page-content h2:first-child {
    margin-top: 0;
}

.custom-page-content h3 {
    font-size: 20px;
    margin: 25px 0 12px 0;
    color: #34495e;
}

.custom-page-content p {
    margin-bottom: 15px;
    color: #495057;
}

.custom-page-content ul,
.custom-page-content ol {
    margin: 15px 0 15px 30px;
    color: #495057;
}

.custom-page-content li {
    margin-bottom: 8px;
}

/* Контент страниц табов (сверху и снизу) */
.tab-content-top,
.tab-content-bottom {
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    line-height: 1.8;
    font-size: 16px;
}

.tab-content-top h2,
.tab-content-bottom h2 {
    font-size: 24px;
    margin: 30px 0 15px 0;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.tab-content-top h2:first-child,
.tab-content-bottom h2:first-child {
    margin-top: 0;
}

.tab-content-top h3,
.tab-content-bottom h3 {
    font-size: 20px;
    margin: 25px 0 12px 0;
    color: #34495e;
}

.tab-content-top p,
.tab-content-bottom p {
    margin-bottom: 15px;
    color: #495057;
}

.tab-content-top ul,
.tab-content-top ol,
.tab-content-bottom ul,
.tab-content-bottom ol {
    margin: 15px 0 15px 30px;
    color: #495057;
}

.tab-content-top li,
.tab-content-bottom li {
    margin-bottom: 8px;
}

/* Экспертная ставка */
.expert-bet {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.expert-bet h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 22px;
    border-bottom: 2px solid rgba(255,255,255,0.3);
    padding-bottom: 10px;
}

.expert-bet p {
    font-size: 18px;
    margin: 0;
}

.expert-bet strong {
    font-size: 20px;
    display: block;
    margin-bottom: 10px;
}

/* Кнопка ставок */
.bet-button {
    display: inline-block;
    background: #27ae60;
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 20px;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

.bet-button:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(39, 174, 96, 0.4);
}

/* Адаптивность */
@media (max-width: 768px) {
    .match-teams {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .match-vs {
        display: none;
    }
    
    .match-center {
        order: -1;
    }
    
    .team-logo {
        width: 80px;
        height: 80px;
    }
    
    .team-name {
        font-size: 18px;
    }
    
    .match-score {
        font-size: 36px;
    }
    
    .predictions-grid {
        grid-template-columns: 1fr;
    }
    
    .prediction-content {
        padding: 20px;
    }
}
