/* style.css — полностью самостоятельный файл стилей для HLTV-подобного сайта */

/* ===== Сброс и база ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0b0e11;
    color: #e8e8e8;
    line-height: 1.6;
}

a {
    color: #f0a500;
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: #ffbe2e;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Шапка ===== */
header {
    background: #1a1e24;
    padding: 15px 0;
    border-bottom: 2px solid #2a2f36;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 26px;
    font-weight: 700;
    color: #f0a500;
    letter-spacing: -0.5px;
}
.logo span {
    color: #e8e8e8;
}

nav a {
    color: #a0a5ab;
    margin-left: 22px;
    font-size: 15px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    position: relative;
}
nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #f0a500;
    transition: width 0.25s;
}
nav a:hover::after,
nav a.active::after {
    width: 100%;
}
nav a.active {
    color: #f0a500;
}

/* ===== Основная сетка ===== */
.main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

/* ===== Левая колонка — новости ===== */
.news-section h2 {
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #a0a5ab;
    border-bottom: 1px solid #2a2f36;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.news-item {
    background: #1a1e24;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 16px;
    border-left: 4px solid #f0a500;
    transition: background 0.2s, transform 0.1s;
}
.news-item:hover {
    background: #22282f;
    transform: translateX(2px);
}

.news-item .date {
    font-size: 12px;
    color: #6a6f75;
    margin-bottom: 4px;
    text-transform: uppercase;
}
.news-item h3 {
    font-size: 19px;
    margin-bottom: 6px;
}
.news-item h3 a {
    color: #e8e8e8;
}
.news-item h3 a:hover {
    color: #f0a500;
}
.news-item p {
    color: #b0b5ba;
    font-size: 14px;
}

.more-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #f0a500;
}
.more-link:hover {
    text-decoration: underline;
}

/* ===== Правая колонка — виджеты ===== */
.sidebar-section {
    background: #1a1e24;
    border-radius: 4px;
    padding: 18px 20px;
    margin-bottom: 20px;
}

.sidebar-section h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #a0a5ab;
    border-bottom: 1px solid #2a2f36;
    padding-bottom: 8px;
    margin-bottom: 14px;
}

.rank-item,
.stream-item {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    font-size: 14px;
    border-bottom: 1px solid #252a30;
}
.rank-item:last-child,
.stream-item:last-child {
    border-bottom: none;
}

.rank-item .points {
    color: #f0a500;
    font-weight: 600;
}

.stream-item .viewers {
    color: #6a6f75;
    font-size: 13px;
}
.stream-item .viewers::before {
    content: "▶ ";
    font-size: 11px;
    color: #f0a500;
}

/* Блок "Now playing" — заглушка */
.match-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #b0b5ba;
    padding: 5px 0;
    border-bottom: 1px solid #252a30;
}
.match-item:last-child {
    border-bottom: none;
}
.match-item .live {
    color: #e74c3c;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
}
.match-item .time {
    color: #6a6f75;
    font-size: 13px;
}

/* ===== Подвал ===== */
footer {
    background: #1a1e24;
    padding: 20px 0;
    margin-top: 30px;
    border-top: 1px solid #2a2f36;
    text-align: center;
    font-size: 13px;
    color: #6a6f75;
}
footer a {
    color: #a0a5ab;
}
footer a:hover {
    color: #f0a500;
}
footer .footer-small {
    margin-top: 5px;
    font-size: 12px;
    color: #4a4f55;
}

/* ===== Адаптив ===== */
@media (max-width: 992px) {
    .main-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 12px;
    }
    nav a {
        margin: 0 12px;
        font-size: 13px;
    }
    .news-item h3 {
        font-size: 17px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    nav a {
        margin: 0 8px;
        font-size: 12px;
    }
    .logo {
        font-size: 22px;
    }
}

.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    color: #a0a5ab;
    margin-bottom: 5px;
    font-size: 14px;
}
.form-group input {
    width: 100%;
    padding: 10px;
    background: #0b0e11;
    border: 1px solid #2a2f36;
    color: #e8e8e8;
    border-radius: 4px;
    font-size: 14px;
}
.form-group input:focus {
    outline: none;
    border-color: #f0a500;
}
.match-prize {
    background: #1a2a1a;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 13px;
    color: #f0a500;
}
a.player-link {
    color: #e8e8e8;
    text-decoration: none;
    transition: color 0.2s;
}
a.player-link:hover {
    color: #f0a500;
    text-decoration: underline;
}
a.player-link {
    color: #e8e8e8;
    text-decoration: none;
    transition: color 0.2s;
}
a.player-link:hover {
    color: #f0a500;
    text-decoration: underline;
}
.player-avatar {
    width: 220px;
    height: 280px;
    border-radius: 8px;
    object-fit: cover;
    border: 3px solid #f0a500;
    background: #0b0e11;
    display: block;
}

@media (max-width: 768px) {
    .player-avatar {
        width: 140px;
        height: 180px;
    }
}
/* ============================================================
   Таблицы (статистика, рейтинги, матчи)
   ============================================================ */

.table-wrap {
    background: #1a1e24;
    border-radius: 8px;
    overflow-x: auto;          /* горизонтальный скролл на маленьких экранах */
    margin: 25px 0 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 500px;          /* чтобы не сжималась до безобразия */
}

/* Заголовки */
.table-wrap thead th {
    background: #252a30;
    color: #a0a5ab;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    text-align: left;
    border-bottom: 2px solid #2a2f36;
    position: sticky;
    top: 0;
    z-index: 2;
}

/* Ячейки */
.table-wrap tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #252a30;
    vertical-align: middle;
    color: #e8e8e8;
}

/* Чередование строк (зебра) */
.table-wrap tbody tr:nth-child(even) td {
    background: #15191e;
}
.table-wrap tbody tr:nth-child(odd) td {
    background: #1a1e24;
}

/* Hover – подсветка строки */
.table-wrap tbody tr:hover td {
    background: #22282f !important;
    transition: background 0.15s;
}

/* Ссылка на игрока внутри таблицы */
.table-wrap a.player-link {
    color: #e8e8e8;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}
.table-wrap a.player-link:hover {
    color: #f0a500;
    text-decoration: underline;
}

/* Выравнивание числовых значений (рейтинг, kills) */
.table-wrap td:nth-child(4),   /* rating 2.0 */
.table-wrap td:nth-child(5) {  /* kills */
    text-align: center;
    font-weight: 600;
}
.table-wrap th:nth-child(4),
.table-wrap th:nth-child(5) {
    text-align: center;
}

/* Рейтинг 2.0 – золотой цвет */
.table-wrap td:nth-child(4) {
    color: #f0a500;
}

/* Первая колонка (номер) – центрируем */
.table-wrap td:first-child,
.table-wrap th:first-child {
    text-align: center;
}

/* Подпись под таблицей */
.table-note {
    color: #6a6f75;
    font-size: 13px;
    margin-top: -10px;
    margin-bottom: 25px;
    font-style: italic;
}

/* Адаптив: на маленьких экранах делаем шрифт поменьше */
@media (max-width: 768px) {
    .table-wrap table {
        font-size: 13px;
        min-width: 400px;
    }
    .table-wrap thead th,
    .table-wrap tbody td {
        padding: 8px 12px;
    }
}
@media (max-width: 480px) {
    .table-wrap table {
        font-size: 12px;
        min-width: 320px;
    }
}
.social-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0b0e11;
    padding: 6px 14px;
    border-radius: 20px;
    color: #a0a5ab;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.social-link:hover {
    background: #1a1e24;
    color: #f0a500;
}
.social-link .icon {
    font-size: 18px;
}
/* ===== Таблица матчей ===== */
.table-wrap .match-score {
    font-weight: 700;
    color: #f0a500;
    text-align: center;
}
.table-wrap .match-prize {
    font-weight: 600;
    color: #4caf50; /* зелёный для призовых */
}
.table-wrap td:nth-child(4) { /* Score */
    text-align: center;
}
.table-wrap td:nth-child(5) { /* Status */
    text-align: center;
}
.table-wrap td:nth-child(7) { /* Prize */
    text-align: center;
}
.table-wrap td:nth-child(8) { /* Time */
    text-align: center;
}
.table-wrap th:nth-child(4),
.table-wrap th:nth-child(5),
.table-wrap th:nth-child(7),
.table-wrap th:nth-child(8) {
    text-align: center;
}
.stream-link {
    color: #e8e8e8;
    text-decoration: none;
    transition: color 0.2s;
}
.stream-link:hover {
    color: #f0a500;
}