:root {
    --primary: #2563EB;
    --primary-light: #3B82F6;
    --secondary: #0F172A;
    --accent: #60A5FA;
    --bg-dark: #030712;
    --bg-card: rgba(15, 23, 42, 0.9);
    --border: rgba(59, 130, 246, 0.15);
    --text: #E2E8F0;
    --text-muted: #94A3B8;
    --text-dim: #64748B;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Prompt', 'Noto Sans Thai', sans-serif;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--bg-dark) 100%);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Kanit', 'Prompt', sans-serif;
    line-height: 1.3;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-light); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 16px; max-width: 1100px; margin: 0 auto;
}
.logo { font-size: 1.5rem; font-weight: 800; color: var(--primary) !important; letter-spacing: -0.5px; }
.logo span { color: var(--accent); }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 8px; z-index: 200; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); transition: all 0.3s; border-radius: 2px; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--primary-light); }

@media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav-links {
        position: fixed; top: 0; right: -100%; width: 280px; height: 100vh;
        flex-direction: column; gap: 0; padding: 70px 0 0;
        background: rgba(15, 23, 42, 0.98); backdrop-filter: blur(20px);
        border-left: 1px solid var(--border);
        transition: right 0.3s ease; z-index: 150;
    }
    .nav-links.open { right: 0; }
    .nav-links a { padding: 14px 24px; font-size: 1rem; border-bottom: 1px solid rgba(255,255,255,0.05); width: 100%; }
    .nav-overlay {
        display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0,0,0,0.6); z-index: 140;
    }
    .nav-overlay.show { display: block; }
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

/* Match rows - compact single line per match */
.match-row {
    display: flex; align-items: center;
    padding: 7px 12px; gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s;
}
.match-row:last-child { border-bottom: none; }
.match-row:hover { background: rgba(37, 99, 235, 0.08); }

.m-status { width: 48px; flex-shrink: 0; text-align: center; }
.m-status .badge {
    display: inline-block; font-size: 0.6rem; padding: 1px 6px;
    border-radius: 3px; color: #fff; font-weight: 600; line-height: 1.5;
    white-space: nowrap;
}
.badge-live { background: #EF4444; animation: pulse-live 2s infinite; }
.badge-ht { background: #F59E0B; }
.badge-ft { background: #22C55E; }
.badge-ns { background: #475569; }

@keyframes pulse-live { 0%,100%{opacity:1} 50%{opacity:0.7} }

.m-home {
    flex: 1; min-width: 0;
    display: flex; align-items: center; gap: 6px;
    justify-content: flex-end;
}
.m-away {
    flex: 1; min-width: 0;
    display: flex; align-items: center; gap: 6px;
    justify-content: flex-start;
}
.m-home .m-name { text-align: right; }

.m-logo { width: 16px; height: 16px; object-fit: contain; flex-shrink: 0; }
.m-name {
    font-size: 0.8rem; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; min-width: 0;
}
.m-score {
    flex-shrink: 0; min-width: 44px; text-align: center;
    font-size: 0.85rem; font-weight: 700; font-variant-numeric: tabular-nums;
    display: flex; align-items: center; justify-content: center; gap: 2px;
}
.m-dash { opacity: 0.5; font-weight: 400; }
.m-vs { color: var(--text-dim); font-weight: 400; font-size: 0.75rem; }
.score-live { color: #F87171; }
.score-ft { color: var(--primary-light); }

.m-arrow { flex-shrink: 0; color: var(--text-dim); font-size: 0.7rem; opacity: 0.5; }
.match-row:hover .m-arrow { opacity: 1; }

@media (max-width: 480px) {
    .match-row { padding: 6px 10px; gap: 4px; }
    .m-status { width: 40px; }
    .m-status .badge { font-size: 0.55rem; padding: 1px 4px; }
    .m-name { font-size: 0.72rem; }
    .m-score { font-size: 0.78rem; min-width: 36px; }
    .m-logo { width: 14px; height: 14px; }
    .m-arrow { display: none; }
}

/* League header */
.league-hdr {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.league-bar { width: 3px; height: 14px; border-radius: 2px; background: var(--primary); flex-shrink: 0; }
.league-title {
    font-size: 0.78rem; font-weight: 600; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0;
}
.league-country { font-size: 0.65rem; color: var(--text-dim); }
.league-count { font-size: 0.65rem; color: var(--text-dim); flex-shrink: 0; }

/* Section headings */
.section-title {
    font-size: 1rem; font-weight: 700; margin-bottom: 10px; padding-left: 4px;
    display: flex; align-items: center; gap: 8px;
}
.section-title .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.section-title .count { font-size: 0.7rem; font-weight: 400; color: var(--text-dim); }

/* Filter */
.filter-bar {
    position: sticky; top: 52px; z-index: 40; padding: 8px 0;
    background: linear-gradient(180deg, rgba(3,7,18,0.95) 0%, rgba(3,7,18,0.8) 100%);
    backdrop-filter: blur(8px);
}
.filter-input {
    width: 100%; padding: 10px 14px 10px 38px;
    background: rgba(255,255,255,0.06); border: 1px solid var(--border);
    border-radius: 10px; color: var(--text); font-size: 0.9rem; outline: none;
    transition: border-color 0.2s;
}
.filter-input:focus { border-color: var(--primary); }
.filter-input::placeholder { color: var(--text-dim); }
.filter-wrap { position: relative; }
.filter-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-dim); font-size: 0.9rem; pointer-events: none; }
.filter-clear { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-dim); cursor: pointer; font-size: 1.2rem; display: none; }

/* Content sections */
.content-section { margin-bottom: 2rem; }
.content-section h2 { font-size: 1.3rem; color: var(--primary-light); margin-bottom: 12px; }
.content-section h3 { font-size: 1.1rem; color: var(--accent); margin-bottom: 8px; }
.content-section p { color: var(--text-muted); margin-bottom: 12px; font-size: 0.95rem; }
.content-section strong { color: var(--text); }

/* Banner */
.banner-img { width: 100%; border-radius: 12px; margin: 16px 0; display: block; }
.banner-sm { max-height: 180px; object-fit: cover; object-position: center; }
.banner-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.banner-grid a { display: block; border-radius: 10px; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; }
.banner-grid a:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(37,99,235,0.25); }
.banner-grid img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; border-radius: 10px; }
@media (max-width: 480px) { .banner-grid { gap: 6px; } .banner-grid img { border-radius: 8px; } .banner-grid a { border-radius: 8px; } }

/* Reviews */
.review-card { padding: 16px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.review-card:last-child { border-bottom: none; }
.review-stars { color: #FBBF24; font-size: 0.9rem; letter-spacing: 1px; }
.review-name { font-weight: 600; font-size: 0.9rem; margin-top: 4px; }
.review-comment { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }

/* Breadcrumb */
.breadcrumb { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 16px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { margin: 0 6px; }

/* Footer */
.site-footer {
    margin-top: 3rem; padding: 2rem 0;
    border-top: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.5);
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-col h3 { font-size: 0.95rem; color: var(--primary-light); margin-bottom: 12px; font-weight: 600; }
.footer-col p, .footer-col a { font-size: 0.85rem; color: var(--text-muted); }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 6px; }
.footer-keywords {
    margin-top: 1.5rem; padding-top: 1.5rem;
    border-top: 1px solid var(--border); text-align: center;
}
.footer-keywords h3 { font-size: 0.95rem; color: var(--primary-light); margin-bottom: 12px; font-weight: 600; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.footer-links a {
    font-size: 0.75rem; padding: 5px 14px; border-radius: 20px;
    background: rgba(255,255,255,0.06); color: var(--text-muted);
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.2s;
}
.footer-links a:hover { background: rgba(37,99,235,0.15); color: var(--accent); border-color: rgba(37,99,235,0.3); }
.footer-bottom { text-align: center; color: var(--text-dim); font-size: 0.75rem; padding-top: 1rem; border-top: 1px solid var(--border); }

/* Article */
.article-card {
    display: flex; gap: 16px; padding: 16px; border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.15s; align-items: flex-start;
}
.article-card:hover { background: rgba(37, 99, 235, 0.06); }
.article-thumb {
    flex-shrink: 0; width: 140px; height: 140px; border-radius: 10px; overflow: hidden;
    background: rgba(255,255,255,0.04);
}
.article-thumb img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.3s;
}
.article-card:hover .article-thumb img { transform: scale(1.05); }
.article-info { flex: 1; min-width: 0; }
.article-card h3 { font-size: 1rem; color: var(--text); margin-bottom: 6px; line-height: 1.4; }
.article-card p { font-size: 0.85rem; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-card .date { font-size: 0.75rem; color: var(--text-dim); margin-top: 8px; }
@media (max-width: 480px) {
    .article-card { flex-direction: column; gap: 12px; }
    .article-thumb { width: 100%; height: 180px; }
}

/* Contact */
.contact-info { display: grid; gap: 1rem; }
.contact-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px; background: rgba(255,255,255,0.03); border-radius: 10px; }
.contact-icon { font-size: 1.5rem; flex-shrink: 0; }

/* No results */
.no-results { display: none; text-align: center; padding: 2rem; color: var(--text-dim); }

/* Utility */
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.font-bold { font-weight: 700; }
.inline-link { color: var(--accent); font-weight: 500; }
.inline-link:hover { color: var(--primary-light); text-decoration: underline; }
