@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-blue: #152238;
    --primary-red: #cc0000;
    --text-dark: #333;
    --text-light: #fff;
    --bg-main: #f5f5f5;
    --table-header-bg: #cce0ef;
    --league-bg: #eaeff5;
    --border-color: #dcdcdc;
    --odds-green: #008000;
    --live-red: #ff0000;
}

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

body {
    font-family: 'Kanit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-dark);
    font-size: 13px;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header & Navigation */
.top-nav {
    background-color: var(--primary-blue);
    display: flex;
    justify-content: center;
    border-bottom: 2px solid var(--primary-blue);
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
}

.logo-box {
    background-color: var(--primary-red);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    transform: skew(-15deg);
    margin-left: -10px;
}

.logo-box img {
    height: 30px;
    transform: skew(15deg);
    margin-right: 10px;
}

.logo-box h1 {
    color: var(--text-light);
    font-size: 20px;
    font-weight: 700;
    transform: skew(15deg);
    margin: 0;
    letter-spacing: 1px;
}

.main-menu {
    display: flex;
    list-style: none;
    margin-left: 20px;
}

.main-menu li a {
    color: var(--text-light);
    padding: 15px 15px;
    display: block;
    font-weight: 400;
    font-size: 14px;
    transition: background 0.2s;
}

.main-menu li a:hover, .main-menu li a.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Main Container */
.container {
    max-width: 1100px;
    margin: 20px auto;
    background: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    min-height: 500px;
}

.breadcrumb {
    padding: 10px 15px;
    font-size: 12px;
    color: #666;
    border-bottom: 1px solid #eee;
}

.breadcrumb a {
    color: var(--primary-blue);
}

.page-header {
    text-align: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.page-header h2 {
    font-size: 20px;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.page-header p {
    color: #666;
    font-size: 13px;
}

/* Date Nav */
.date-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: #fff;
}

.date-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    padding: 6px 15px;
    font-family: 'Kanit', sans-serif;
    font-size: 13px;
    cursor: pointer;
    border-radius: 3px;
    color: #333;
}

.date-btn:hover {
    background: #e0e0e0;
}

.date-btn.active {
    background: var(--primary-blue);
    color: #fff;
    border-color: var(--primary-blue);
}

/* Table Layout */
.fixtures-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table-title {
    background-color: var(--primary-blue);
    color: #fff;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-title h3 {
    font-size: 15px;
    font-weight: 500;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-filters span {
    background: #fff;
    color: #333;
    padding: 2px 8px;
    font-size: 11px;
    border-radius: 3px;
    margin-left: 5px;
    cursor: pointer;
}

.table-filters span.red { background: var(--live-red); color: white; }
.table-filters span.blue { background: var(--primary-blue); color: white; border: 1px solid #fff; }
.table-filters span.gray { background: #999; color: white; }
.table-filters span.green { background: #00a65a; color: white; }

.col-header {
    background-color: var(--table-header-bg);
    color: #333;
    font-weight: 500;
    text-align: center;
    padding: 8px;
    border: 1px solid var(--border-color);
}

.league-row {
    background-color: var(--league-bg);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-blue);
}

.league-row td {
    padding: 8px 10px;
    font-weight: 600;
    color: var(--primary-blue);
}

.league-row img {
    height: 16px;
    vertical-align: middle;
    margin-right: 5px;
}

.match-row {
    background-color: #fff;
    border: 1px solid var(--border-color);
}

.match-row:nth-child(even) {
    background-color: #fcfcfc;
}

.match-row:hover {
    background-color: #f5f9ff;
}

.match-row td {
    padding: 8px 5px;
    text-align: center;
    border-right: 1px solid var(--border-color);
    vertical-align: middle;
}

.col-time { width: 50px; }
.col-tv { width: 40px; }
.col-home { width: 25%; text-align: right !important; padding-right: 10px !important; }
.col-odds { width: 10%; color: var(--odds-green); font-weight: 500; }
.col-away { width: 25%; text-align: left !important; padding-left: 10px !important; }
.col-analysis { width: auto; font-size: 12px; color: #666; }
.col-ht { width: 40px; color: #888; font-size: 12px; }
.col-ft { width: 40px; font-weight: 600; }

.team-logo {
    height: 16px;
    vertical-align: middle;
    margin: 0 5px;
}

.live-time {
    color: var(--live-red);
    font-weight: bold;
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% { opacity: 0; }
}

.score-red { color: var(--live-red); }
.score-blue { color: var(--primary-blue); }

.no-data {
    text-align: center;
    padding: 50px;
    color: #666;
}

.loader {
    text-align: center;
    padding: 20px;
    display: none;
}
.htmx-request .loader { display: block; }
.htmx-request .fixtures-wrapper { opacity: 0.5; }

/* Footer */
footer {
    background-color: #333;
    color: #ccc;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    font-size: 12px;
}
