/* =========================================================
   每日大赛 yandex 每日 — Yandex 风格搜索门户样式
   配色: #ffcc00 / #fc3f1d / #ffffff / #000000 / #f5f5f5 / #4285f4
   ========================================================= */

/* ---------- Reset ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --yellow: #ffcc00;
    --red: #fc3f1d;
    --white: #ffffff;
    --black: #000000;
    --gray-bg: #f5f5f5;
    --gray-line: #e3e3e3;
    --gray-text: #70757a;
    --blue: #4285f4;
    --green: #1a7f37;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 18px rgba(252, 63, 29, 0.18);
    --max: 1180px;
    --transition: 0.2s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "PT Sans", "Arial", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--white);
    color: var(--black);
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--blue);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--red);
    text-decoration: underline;
}

ul,
ol {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ---------- Top Nav ---------- */
.topbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-line);
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 20px;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 20px;
    color: var(--black);
    white-space: nowrap;
}

.brand:hover {
    text-decoration: none;
    color: var(--black);
}

.brand-mark {
    width: 32px;
    height: 32px;
    background: var(--red);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 900;
    font-size: 18px;
    font-family: "Arial", sans-serif;
    box-shadow: 0 0 0 3px var(--yellow);
    flex-shrink: 0;
}

.brand-mark::after {
    content: "Я";
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text small {
    font-size: 11px;
    color: var(--gray-text);
    font-weight: 400;
    letter-spacing: 1px;
}

.nav {
    display: flex;
    gap: 4px;
    margin-left: auto;
    flex-wrap: wrap;
}

.nav a {
    color: var(--black);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
}

.nav a:hover {
    background: var(--gray-bg);
    text-decoration: none;
    color: var(--red);
}

.nav a.active {
    background: var(--yellow);
    color: var(--black);
    font-weight: 700;
}

/* ---------- Layout ---------- */
.container {
    max-width: var(--max);
    margin: 0 auto;
    padding: 28px 20px 60px;
}

.page-head {
    margin-bottom: 28px;
}

.page-head h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-head h1::before {
    content: "";
    width: 6px;
    height: 26px;
    background: var(--red);
    border-radius: 3px;
}

.page-head .sub {
    color: var(--gray-text);
    font-size: 14px;
}

.breadcrumb {
    font-size: 13px;
    color: var(--gray-text);
    margin-bottom: 12px;
}

.breadcrumb a {
    color: var(--gray-text);
}

.breadcrumb span {
    margin: 0 6px;
}

/* ---------- Hero Search (homepage) ---------- */
.hero {
    text-align: center;
    padding: 70px 20px 40px;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 204, 0, 0.18), transparent 45%),
        radial-gradient(circle at 85% 30%, rgba(252, 63, 29, 0.12), transparent 40%),
        var(--white);
    border-bottom: 1px solid var(--gray-line);
    position: relative;
    overflow: hidden;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hero::before {
    width: 180px;
    height: 180px;
    border: 14px solid var(--yellow);
    border-right-color: transparent;
    border-bottom-color: transparent;
    top: -60px;
    left: -40px;
    transform: rotate(-25deg);
    opacity: 0.5;
}

.hero::after {
    width: 120px;
    height: 120px;
    background: var(--red);
    bottom: -50px;
    right: 8%;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    opacity: 0.18;
}

.hero-logo {
    font-size: 64px;
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.hero-logo .ya {
    color: var(--red);
}

.hero-logo .dot {
    color: var(--black);
}

.hero-logo .end {
    color: var(--black);
}

.hero-logo .accent {
    display: inline-block;
    width: 14px;
    height: 14px;
    background: var(--yellow);
    border-radius: 50%;
    vertical-align: 4px;
    margin-left: 4px;
}

.hero-tagline {
    color: var(--gray-text);
    font-size: 15px;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.search-box {
    max-width: 640px;
    margin: 0 auto 20px;
    position: relative;
    z-index: 1;
    display: flex;
    background: var(--white);
    border: 2px solid var(--yellow);
    border-radius: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.search-box:focus-within {
    border-color: var(--red);
    box-shadow: var(--shadow-hover);
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    padding: 16px 24px;
    font-size: 16px;
    background: transparent;
    color: var(--black);
}

.search-box input::placeholder {
    color: var(--gray-text);
}

.search-box button {
    background: var(--yellow);
    border: none;
    padding: 0 28px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    color: var(--black);
    transition: background var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-box button:hover {
    background: var(--red);
    color: var(--white);
}

.search-icon {
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-radius: 50%;
    position: relative;
}

.search-icon::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 2px;
    background: currentColor;
    bottom: -3px;
    right: -5px;
    transform: rotate(45deg);
    border-radius: 2px;
}

/* Compact search (sub pages) */
.search-compact {
    max-width: 100%;
    margin-bottom: 24px;
}

/* ---------- Category Quick Buttons ---------- */
.quick-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 640px;
    margin: 0 auto 10px;
    position: relative;
    z-index: 1;
}

.quick-cats a {
    background: var(--gray-bg);
    color: var(--black);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
}

.quick-cats a:hover {
    background: var(--yellow);
    text-decoration: none;
    color: var(--black);
}

.quick-cats a.hot::before {
    content: "🔥";
    margin-right: 4px;
}

/* ---------- Section ---------- */
.section {
    margin-bottom: 44px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--yellow);
    padding-bottom: 10px;
}

.section-title .left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title .bar {
    width: 4px;
    height: 20px;
    background: var(--red);
    border-radius: 2px;
}

.section-title .more {
    font-size: 13px;
    color: var(--gray-text);
    font-weight: 400;
}

/* ---------- Card Grid ---------- */
.grid {
    display: grid;
    gap: 20px;
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.card {
    background: var(--white);
    border: 1px solid var(--gray-line);
    border-radius: var(--radius);
    padding: 20px;
    transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
    position: relative;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--yellow);
    transform: translateY(-2px);
}

.card-tag {
    display: inline-block;
    background: var(--yellow);
    color: var(--black);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-tag.red {
    background: var(--red);
    color: var(--white);
}

.card-tag.blue {
    background: var(--blue);
    color: var(--white);
}

.card-tag.gray {
    background: var(--gray-bg);
    color: var(--gray-text);
}

.card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}

.card h3 a {
    color: var(--black);
}

.card h3 a:hover {
    color: var(--red);
    text-decoration: none;
}

.card p {
    color: var(--gray-text);
    font-size: 13px;
    margin-bottom: 12px;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: var(--gray-text);
    border-top: 1px solid var(--gray-line);
    padding-top: 12px;
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* CSS shape decorations on cards */
.card.deco::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    background: var(--yellow);
    border-radius: 0 var(--radius) 0 40px;
}

.card.deco-red::before {
    background: var(--red);
}

/* ---------- Trending list ---------- */
.trend-list {
    background: var(--white);
    border: 1px solid var(--gray-line);
    border-radius: var(--radius);
    overflow: hidden;
}

.trend-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--gray-line);
    transition: background var(--transition);
}

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

.trend-item:hover {
    background: var(--gray-bg);
}

.trend-rank {
    width: 30px;
    height: 30px;
    background: var(--gray-bg);
    color: var(--gray-text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.trend-item:nth-child(1) .trend-rank {
    background: var(--red);
    color: var(--white);
}

.trend-item:nth-child(2) .trend-rank {
    background: var(--yellow);
    color: var(--black);
}

.trend-item:nth-child(3) .trend-rank {
    background: var(--blue);
    color: var(--white);
}

.trend-text {
    flex: 1;
}

.trend-text a {
    color: var(--black);
    font-weight: 500;
}

.trend-text a:hover {
    color: var(--red);
    text-decoration: none;
}

.trend-text small {
    display: block;
    color: var(--gray-text);
    font-size: 12px;
    margin-top: 2px;
}

.trend-heat {
    font-size: 12px;
    color: var(--red);
    font-weight: 700;
    white-space: nowrap;
}

.trend-arrow {
    font-size: 12px;
    font-weight: 700;
    width: 50px;
    text-align: right;
}

.trend-arrow.up {
    color: var(--red);
}

.trend-arrow.down {
    color: var(--green);
}

.trend-arrow.flat {
    color: var(--gray-text);
}

/* ---------- Two column layout ---------- */
.layout-2col {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 28px;
    align-items: start;
}

.sidebar {
    background: var(--gray-bg);
    border-radius: var(--radius);
    padding: 18px;
    position: sticky;
    top: 76px;
}

.sidebar h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-text);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-line);
}

.sidebar ul li {
    margin-bottom: 4px;
}

.sidebar ul li a {
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--black);
    font-size: 14px;
    transition: background var(--transition);
}

.sidebar ul li a:hover {
    background: var(--white);
    text-decoration: none;
}

.sidebar ul li a.active {
    background: var(--yellow);
    color: var(--black);
    font-weight: 700;
}

.filter-group {
    margin-bottom: 18px;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    font-size: 13px;
    color: var(--black);
    cursor: pointer;
}

.filter-group input[type="checkbox"],
.filter-group input[type="radio"] {
    accent-color: var(--red);
}

/* ---------- Search result list ---------- */
.result-list .result {
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-line);
}

.result .r-url {
    font-size: 12px;
    color: var(--green);
    margin-bottom: 2px;
}

.result .r-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 6px;
}

.result .r-title a {
    color: var(--blue);
}

.result .r-title a:visited {
    color: #681da8;
}

.result .r-snippet {
    color: var(--gray-text);
    font-size: 14px;
    line-height: 1.6;
}

.result .r-meta {
    margin-top: 6px;
    font-size: 12px;
    color: var(--gray-text);
}

.related {
    margin-top: 28px;
    padding: 20px;
    background: var(--gray-bg);
    border-radius: var(--radius);
}

.related h4 {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--gray-text);
}

.related-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.related-tags a {
    background: var(--white);
    border: 1px solid var(--gray-line);
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
    color: var(--black);
}

.related-tags a:hover {
    border-color: var(--yellow);
    background: var(--yellow);
    text-decoration: none;
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
}

.pagination a,
.pagination span {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gray-line);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--black);
    padding: 0 10px;
}

.pagination a:hover {
    background: var(--gray-bg);
    text-decoration: none;
    border-color: var(--gray-text);
}

.pagination .current {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
    font-weight: 700;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--yellow);
    color: var(--black);
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

.btn:hover {
    background: var(--red);
    color: var(--white);
    text-decoration: none;
}

.btn.red {
    background: var(--red);
    color: var(--white);
}

.btn.red:hover {
    background: var(--black);
}

.btn.outline {
    background: transparent;
    border: 1px solid var(--gray-line);
    color: var(--black);
}

.btn.outline:hover {
    border-color: var(--red);
    background: var(--white);
    color: var(--red);
}

.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ---------- Stats / Highlights ---------- */
.stat-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.stat {
    background: var(--white);
    border: 1px solid var(--gray-line);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--yellow);
}

.stat:nth-child(2)::before {
    background: var(--red);
}

.stat:nth-child(3)::before {
    background: var(--blue);
}

.stat:nth-child(4)::before {
    background: var(--black);
}

.stat .num {
    font-size: 30px;
    font-weight: 900;
    color: var(--black);
    line-height: 1.2;
}

.stat .label {
    color: var(--gray-text);
    font-size: 13px;
    margin-top: 4px;
}

/* ---------- Today competition hero ---------- */
.today-hero {
    background: linear-gradient(135deg, var(--yellow) 0%, #ffd633 100%);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    color: var(--black);
}

.today-hero::before {
    content: "Я";
    position: absolute;
    right: -20px;
    bottom: -40px;
    font-size: 200px;
    font-weight: 900;
    color: rgba(252, 63, 29, 0.18);
    line-height: 1;
    font-family: Arial;
}

.today-hero .label {
    display: inline-block;
    background: var(--red);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 14px;
}

.today-hero h2 {
    font-size: 28px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.today-hero p {
    font-size: 15px;
    margin-bottom: 18px;
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.today-hero .btn-row {
    display: flex;
    gap: 12px;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.today-hero .countdown {
    display: flex;
    gap: 14px;
    margin-top: 18px;
    position: relative;
    z-index: 1;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    text-align: center;
    min-width: 60px;
}

.countdown-item .v {
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
}

.countdown-item .l {
    font-size: 11px;
    color: var(--gray-text);
}

/* ---------- Schedule table ---------- */
.schedule {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.schedule th,
.schedule td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-line);
    font-size: 14px;
}

.schedule th {
    background: var(--gray-bg);
    font-weight: 700;
    color: var(--black);
    font-size: 13px;
}

.schedule tr:hover td {
    background: #fffdf5;
}

.schedule .status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
}

.status.live {
    background: var(--red);
    color: var(--white);
}

.status.upcoming {
    background: var(--yellow);
    color: var(--black);
}

.status.done {
    background: var(--gray-bg);
    color: var(--gray-text);
}

/* ---------- Leaderboard ---------- */
.leaderboard {
    background: var(--white);
    border: 1px solid var(--gray-line);
    border-radius: var(--radius);
    overflow: hidden;
}

.lb-row {
    display: grid;
    grid-template-columns: 50px 1fr 80px 100px 80px;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--gray-line);
    transition: background var(--transition);
}

.lb-row:hover {
    background: var(--gray-bg);
}

.lb-row.head {
    background: var(--gray-bg);
    font-weight: 700;
    font-size: 13px;
    color: var(--gray-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lb-rank {
    font-weight: 900;
    font-size: 18px;
    text-align: center;
}

.lb-row:nth-child(2) .lb-rank {
    color: var(--red);
}

.lb-row:nth-child(3) .lb-rank {
    color: var(--yellow);
}

.lb-row:nth-child(4) .lb-rank {
    color: var(--blue);
}

.lb-name {
    font-weight: 600;
}

.lb-name small {
    display: block;
    color: var(--gray-text);
    font-weight: 400;
    font-size: 12px;
}

.lb-score {
    text-align: right;
    font-weight: 700;
    color: var(--red);
}

.lb-bar {
    height: 8px;
    background: var(--gray-bg);
    border-radius: 4px;
    overflow: hidden;
}

.lb-bar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--yellow), var(--red));
    border-radius: 4px;
}

.lb-change {
    text-align: right;
    font-size: 13px;
    font-weight: 700;
}

/* ---------- Rules list ---------- */
.rules-list {
    background: var(--white);
    border: 1px solid var(--gray-line);
    border-radius: var(--radius);
    padding: 24px;
}

.rules-list ol {
    list-style: none;
    counter-reset: rules;
}

.rules-list li {
    counter-increment: rules;
    padding: 12px 0 12px 44px;
    position: relative;
    border-bottom: 1px dashed var(--gray-line);
    font-size: 14px;
}

.rules-list li:last-child {
    border-bottom: none;
}

.rules-list li::before {
    content: counter(rules);
    position: absolute;
    left: 0;
    top: 10px;
    width: 30px;
    height: 30px;
    background: var(--yellow);
    color: var(--black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

/* ---------- Time filter pills ---------- */
.time-filter {
    display: inline-flex;
    background: var(--gray-bg);
    border-radius: 20px;
    padding: 4px;
    margin-bottom: 20px;
}

.time-filter button,
.time-filter a {
    border: none;
    background: transparent;
    padding: 6px 18px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 13px;
    color: var(--gray-text);
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
}

.time-filter a:hover,
.time-filter button:hover {
    text-decoration: none;
    color: var(--black);
}

.time-filter .active {
    background: var(--red);
    color: var(--white);
    font-weight: 700;
}

/* ---------- Category breakdown ---------- */
.cat-bars {
    background: var(--white);
    border: 1px solid var(--gray-line);
    border-radius: var(--radius);
    padding: 20px;
}

.cat-bar {
    margin-bottom: 14px;
}

.cat-bar:last-child {
    margin-bottom: 0;
}

.cat-bar .lbl {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 6px;
}

.cat-bar .lbl b {
    color: var(--black);
}

.cat-bar .lbl span {
    color: var(--gray-text);
}

.cat-bar .track {
    height: 10px;
    background: var(--gray-bg);
    border-radius: 5px;
    overflow: hidden;
}

.cat-bar .track i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--yellow), var(--red));
    border-radius: 5px;
}

/* ---------- CSS Charts ---------- */
.chart-bar-wrap {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    height: 220px;
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--gray-line);
    border-radius: var(--radius);
}

.chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    height: 100%;
    justify-content: flex-end;
}

.chart-col .col-bar {
    width: 70%;
    background: linear-gradient(180deg, var(--yellow), var(--red));
    border-radius: 6px 6px 0 0;
    transition: opacity var(--transition);
    min-height: 4px;
}

.chart-col:hover .col-bar {
    opacity: 0.7;
}

.chart-col .col-val {
    font-size: 12px;
    font-weight: 700;
    color: var(--red);
}

.chart-col .col-lbl {
    font-size: 12px;
    color: var(--gray-text);
}

.chart-donut {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: conic-gradient(
        var(--red) 0% 38%,
        var(--yellow) 38% 64%,
        var(--blue) 64% 84%,
        var(--green) 84% 100%
    );
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-donut::after {
    content: "100%";
    position: absolute;
    width: 110px;
    height: 110px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--black);
}

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.donut-legend li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.donut-legend i {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

/* ---------- News cards ---------- */
.news-card {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 16px;
    background: var(--white);
    border: 1px solid var(--gray-line);
    border-radius: var(--radius);
    padding: 16px;
    transition: box-shadow var(--transition);
}

.news-card:hover {
    box-shadow: var(--shadow-hover);
}

.news-date {
    background: var(--gray-bg);
    border-radius: var(--radius-sm);
    padding: 10px;
    text-align: center;
}

.news-date .d {
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
    color: var(--red);
}

.news-date .m {
    font-size: 12px;
    color: var(--gray-text);
    margin-top: 2px;
}

.news-body h3 {
    font-size: 16px;
    margin-bottom: 6px;
}

.news-body h3 a {
    color: var(--black);
}

.news-body h3 a:hover {
    color: var(--red);
    text-decoration: none;
}

.news-body p {
    color: var(--gray-text);
    font-size: 13px;
    margin-bottom: 8px;
}

.news-body .news-meta {
    font-size: 12px;
    color: var(--gray-text);
}

/* ---------- FAQ Accordion ---------- */
.faq {
    border: 1px solid var(--gray-line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
}

.faq-item {
    border-bottom: 1px solid var(--gray-line);
}

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

.faq-q {
    width: 100%;
    background: none;
    border: none;
    padding: 18px 20px;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    color: var(--black);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    transition: background var(--transition);
}

.faq-q:hover {
    background: var(--gray-bg);
}

.faq-q .icon {
    width: 22px;
    height: 22px;
    background: var(--yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--black);
    flex-shrink: 0;
    transition: transform var(--transition), background var(--transition);
}

.faq-item.open .faq-q .icon {
    transform: rotate(45deg);
    background: var(--red);
    color: var(--white);
}

.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 20px;
    color: var(--gray-text);
    font-size: 14px;
}

.faq-item.open .faq-a {
    max-height: 400px;
    padding: 0 20px 18px;
}

/* ---------- Guide steps ---------- */
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.step {
    background: var(--white);
    border: 1px solid var(--gray-line);
    border-radius: var(--radius);
    padding: 24px 18px;
    text-align: center;
    position: relative;
}

.step-num {
    width: 44px;
    height: 44px;
    background: var(--yellow);
    color: var(--black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 18px;
    margin: 0 auto 12px;
}

.step:nth-child(2) .step-num {
    background: var(--red);
    color: var(--white);
}

.step:nth-child(3) .step-num {
    background: var(--blue);
    color: var(--white);
}

.step:nth-child(4) .step-num {
    background: var(--black);
    color: var(--white);
}

.step h4 {
    font-size: 15px;
    margin-bottom: 6px;
}

.step p {
    font-size: 13px;
    color: var(--gray-text);
}

/* ---------- Contact support ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.contact-card {
    background: var(--white);
    border: 1px solid var(--gray-line);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: box-shadow var(--transition);
}

.contact-card:hover {
    box-shadow: var(--shadow-hover);
}

.contact-card .ico {
    width: 50px;
    height: 50px;
    margin: 0 auto 12px;
    background: var(--yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 900;
    color: var(--black);
}

.contact-card:nth-child(2) .ico {
    background: var(--red);
    color: var(--white);
}

.contact-card:nth-child(3) .ico {
    background: var(--blue);
    color: var(--white);
}

.contact-card h4 {
    font-size: 16px;
    margin-bottom: 6px;
}

.contact-card p {
    font-size: 13px;
    color: var(--gray-text);
    margin-bottom: 10px;
}

/* ---------- Subscribe box ---------- */
.subscribe {
    background: linear-gradient(135deg, var(--red), #d93417);
    color: var(--white);
    border-radius: var(--radius);
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.subscribe h3 {
    font-size: 20px;
    margin-bottom: 4px;
}

.subscribe p {
    font-size: 14px;
    opacity: 0.9;
}

.subscribe-form {
    display: flex;
    gap: 8px;
    background: var(--white);
    border-radius: 24px;
    padding: 4px;
    flex: 1;
    min-width: 280px;
    max-width: 420px;
}

.subscribe-form input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 16px;
    font-size: 14px;
    background: transparent;
    color: var(--black);
}

.subscribe-form button {
    background: var(--black);
    color: var(--white);
    border: none;
    padding: 0 20px;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
    transition: background var(--transition);
}

.subscribe-form button:hover {
    background: var(--yellow);
    color: var(--black);
}

/* ---------- Results table ---------- */
.results-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.results-table th,
.results-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--gray-line);
    font-size: 14px;
}

.results-table th {
    background: var(--black);
    color: var(--white);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.results-table tr:hover td {
    background: #fffdf5;
}

.results-table .win {
    color: var(--green);
    font-weight: 700;
}

.results-table .lose {
    color: var(--gray-text);
}

.results-table .draw {
    color: var(--blue);
    font-weight: 700;
}

.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    background: var(--gray-bg);
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.filter-bar select,
.filter-bar input {
    padding: 8px 12px;
    border: 1px solid var(--gray-line);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--white);
    color: var(--black);
    outline: none;
}

.filter-bar select:focus,
.filter-bar input:focus {
    border-color: var(--red);
}

.filter-bar label {
    font-size: 13px;
    color: var(--gray-text);
    font-weight: 600;
}

/* ---------- Footer ---------- */
.footer {
    background: var(--black);
    color: #b8b8b8;
    padding: 40px 20px 20px;
    margin-top: 40px;
}

.footer-inner {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 32px;
}

.footer h5 {
    color: var(--white);
    font-size: 14px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer ul li {
    margin-bottom: 8px;
}

.footer ul li a {
    color: #b8b8b8;
    font-size: 13px;
}

.footer ul li a:hover {
    color: var(--yellow);
    text-decoration: none;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.footer-brand .brand-mark {
    width: 28px;
    height: 28px;
    font-size: 15px;
}

.footer-brand span {
    color: var(--white);
    font-weight: 700;
    font-size: 18px;
}

.footer p {
    font-size: 13px;
    line-height: 1.7;
}

.footer-bottom {
    max-width: var(--max);
    margin: 30px auto 0;
    padding-top: 20px;
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-bottom .links a {
    color: #b8b8b8;
    margin-left: 16px;
}

/* ---------- Helpers ---------- */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

.badge-new {
    background: var(--red);
    color: var(--white);
}

.badge-hot {
    background: var(--yellow);
    color: var(--black);
}

.notice {
    background: #fffdf5;
    border: 1px solid var(--yellow);
    border-left: 4px solid var(--red);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--black);
}

.notice b {
    color: var(--red);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

    .layout-2col {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    .topbar-inner {
        gap: 10px;
        padding: 0 12px;
        height: auto;
        flex-wrap: wrap;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .nav {
        margin-left: 0;
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .nav a {
        white-space: nowrap;
        padding: 6px 10px;
        font-size: 13px;
    }

    .hero {
        padding: 40px 16px 30px;
    }

    .hero-logo {
        font-size: 44px;
    }

    .search-box {
        flex-direction: column;
        border-radius: var(--radius);
    }

    .search-box input {
        padding: 14px 18px;
    }

    .search-box button {
        padding: 14px;
        justify-content: center;
    }

    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .stat-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .today-hero {
        padding: 22px 18px;
    }

    .today-hero h2 {
        font-size: 22px;
    }

    .lb-row {
        grid-template-columns: 36px 1fr 60px;
        gap: 8px;
        padding: 12px 14px;
    }

    .lb-bar,
    .lb-change {
        display: none;
    }

    .news-card {
        grid-template-columns: 1fr;
    }

    .subscribe {
        flex-direction: column;
        align-items: stretch;
    }

    .subscribe-form {
        max-width: 100%;
    }

    .page-head h1 {
        font-size: 22px;
    }

    .chart-bar-wrap {
        height: 180px;
        gap: 8px;
        padding: 14px;
    }
}
