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

:root {
    /* ธีม ดำ #000 + ทอง (ไม่มีแดง) */
    --primary-color: #f0c14b;
    --primary-hover: #e6a800;
    --bg-color-main: #000000;
    --bg-gradient: linear-gradient(180deg, #000000 0%, #0a0a0a 100%);
    --glass-bg: rgba(0, 0, 0, 0.85);
    --glass-border: rgba(240, 193, 75, 0.25);
    --text-color: #f0f0f0;
    --text-muted: #9ca3af;
    --win-color: #22c55e;
    --draw-color: #f0c14b;
    --loss-color: #ef4444;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --sidebar-width: 320px;
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: 'Prompt', sans-serif;
    background: var(--bg-gradient);
    background-color: var(--bg-color-main);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    font-size: 16px;
}

/* Glassmorphism utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* Header */
.site-header {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

.header-top {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
}

.site-logo {
    max-height: 150px;
    width: auto;
    display: block;
    transition: var(--transition);
}

.site-logo:hover {
    transform: scale(1.05);
}

.slogan-area {
    display: flex;
    align-items: center;
}

.site-slogan {
    max-height: 150px;
    width: auto;
    display: block;
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: row;
        gap: 10px;
        padding: 15px;
    }

    .site-logo,
    .site-slogan {
        width: 100%;
        max-height: 100px;
    }
}

/* Navigation */
.main-nav {
    background: rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid var(--border-subtle);
}

.desktop-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-container {
    display: flex;
    margin: 0;
    flex: 1;
    list-style: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.nav-container::-webkit-scrollbar {
    display: none;
}

.nav-item {
    display: block;
    padding: 10px 25px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.desktop-auth-menu {
    display: flex;
    gap: 12px;
    padding-right: 20px;
    align-items: center;
}

.auth-btn-with-avatar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.auth-avatar-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* ปุ่มสมัครสมาชิก / เข้าระบบ (เมนูหลัก) */
.auth-btn-small,
.auth-btn {
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 10px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    border: none;
    font-family: inherit;
}

.auth-btn-small.btn-primary,
.auth-btn.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #0a0000;
    box-shadow: 0 2px 12px rgba(240, 193, 75, 0.35);
}

.auth-btn-small.btn-primary:hover,
.auth-btn.btn-primary:hover {
    background: linear-gradient(135deg, #e8c547 0%, var(--primary-color) 100%);
    box-shadow: 0 4px 18px rgba(240, 193, 75, 0.45);
    transform: translateY(-2px);
}

.auth-btn-small.btn-secondary,
.auth-btn.btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-btn-small.btn-secondary:hover,
.auth-btn.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.nav-item:hover,
.nav-item.active {
    background: rgba(240, 193, 75, 0.1);
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    text-shadow: 0 0 8px rgba(240, 193, 75, 0.4);
}

/* Mobile Auth Menu */
.mobile-auth-nav {
    display: none;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-auth-container {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    gap: 15px;
}

.mobile-auth-nav .auth-btn {
    flex: 1;
    font-size: 0.95rem;
    padding: 12px 16px;
    justify-content: center;
    width: 100%;
}

/* Main Layout */
.container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: 30px;
}

@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr;
    }
    .mobile-auth-container{
        gap: 5px;
    }
    .mobile-auth-nav .auth-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Banners Container */
.promo-banners-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.promo-link {
    display: block;
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
}

.promo-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 193, 75, 0.3);
}

.responsive-banner {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Leaderboard — ธีมเข้ม โทนทอง */
.leaderboard-section {
    padding: 24px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title i {
    color: var(--primary-color);
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-input {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 15px;
    border-radius: 6px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(240, 193, 75, 0.2);
}

.btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: #000;
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 15px rgba(240, 193, 75, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Table — ธีมเข้ม โทนทอง */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.custom-table th,
.custom-table td {
    padding: 14px 16px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.custom-table thead tr {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.35) 100%);
    border-bottom: 1px solid rgba(240, 193, 75, 0.15);
}

.custom-table th {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.custom-table tbody tr {
    transition: background 0.2s ease;
}

.custom-table tbody tr:hover {
    background: rgba(240, 193, 75, 0.06);
}

.custom-table td {
    color: var(--text-color);
    font-size: 0.9375rem;
}

.rank-badge {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    font-weight: 700;
}

.rank-1 {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #000;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.rank-2 {
    background: linear-gradient(135deg, #e0e0e0, #808080);
    color: #000;
}

.rank-3 {
    background: linear-gradient(135deg, #e74c3c, #b71c1c);
    color: #fff;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #333;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.username {
    font-weight: 500;
    color: #fff;
}

.stat-w {
    color: var(--win-color);
    font-weight: 600;
}

.stat-d {
    color: var(--draw-color);
    font-weight: 600;
}

.stat-l {
    color: var(--loss-color);
    font-weight: 600;
}

.points-highlight {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
}

.form-badge {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    margin: 0 2px;
    color: #000;
}

.form-w {
    background-color: var(--win-color);
}

.form-d {
    background-color: var(--draw-color);
    color: #fff;
}

.form-l {
    background-color: var(--loss-color);
    color: #fff;
}

.action-icon {
    color: var(--text-muted);
    transition: var(--transition);
    cursor: pointer;
}

.action-icon:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}

.load-more-btn {
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    color: var(--primary-color);
    font-family: inherit;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.load-more-btn:hover {
    background: rgba(240, 193, 75, 0.1);
    border-color: var(--primary-color);
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.login-box {
    padding: 25px;
}

.login-box h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(0, 0, 0, 0.6);
}

.login-btn-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.login-btn-group .btn {
    flex: 1;
    justify-content: center;
}

.sidebar-ad-link {
    display: block;
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
}

.sidebar-ad-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 193, 75, 0.3);
}

.responsive-sidebar-banner {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.ad-banner {
    width: 100%;
    height: 300px;
    border-radius: var(--border-radius);
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ad-banner.custom-style-45 {
    height: auto;
    min-height: 0;
}

.ad-banner i {
    font-size: 3rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

.sidebar-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--primary-color, var(--primary-color));
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    border: 1px solid rgba(240, 193, 75, 0.2);
    transition: background 0.2s, border-color 0.2s;
}
.sidebar-contact-link:hover {
    background: rgba(240, 193, 75, 0.15);
    border-color: rgba(240, 193, 75, 0.4);
    color: #fff;
}

/* Bottom Section */
.info-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 10px;
}

.info-card {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.info-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(240, 193, 75, 0.1);
    color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
}

.info-details h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
}

.info-details p {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 40px;
    color: var(--text-muted);
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.6);
}

/* -----------------------------
   Play / Prediction Page Styles
-------------------------------- */
.container-play {
    margin: 20px auto;
    display: block;
    /* Overrides grid */
}

.play-page-header {
    background: linear-gradient(to right, #7b1fa2, #d32f2f, #7b1fa2);
    color: white;
    text-align: center;
    padding: 15px;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}

.play-page-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.prediction-container {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 0 0 8px 8px;
    padding-bottom: 20px;
}

.play-no-matches {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-muted);
}

/* Play page: โลโก้จาก API (imagecache.365scores) + placeholder แบบ backoffice */
.play-league-head .play-league-logo,
.play-league-head .play-league-logo-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: contain;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.play-league-head .play-league-logo-placeholder {
    color: #888;
    font-size: 0.75rem;
}
.play-league-head .play-league-logo-placeholder i {
    font-size: 0.9rem;
}
.play-match-home .play-team-logo,
.play-match-home .play-team-logo-placeholder,
.play-match-away .play-team-logo,
.play-match-away .play-team-logo-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: contain;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}
.play-match-home .play-team-logo-placeholder,
.play-match-away .play-team-logo-placeholder {
    color: #888;
    font-size: 0.8rem;
}
.play-match-home .play-team-logo-placeholder i,
.play-match-away .play-team-logo-placeholder i {
    font-size: 1rem;
    opacity: 0.7;
}

/* ---------- Play Page Theme (หน้าทายผล) — ความกว้าง 1400px ---------- */
body.play-page-body .container.container-play {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

body.play-page-body .main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px 48px;
    width: 100%;
}

.play-theme-header {
    text-align: center;
    padding: 36px 32px 40px;
    margin-bottom: 32px;
    background: linear-gradient(160deg, #1a0505 0%, #0d0000 50%, #140505 100%);
    border: 1px solid rgba(240, 193, 75, 0.18);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03), inset 0 1px 0 rgba(240, 193, 75, 0.06);
    position: relative;
    overflow: hidden;
}

.play-theme-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.6;
}

.play-theme-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}

.play-theme-logo {
    max-height: 56px;
    width: auto;
    filter: drop-shadow(0 4px 12px rgba(240, 193, 75, 0.25));
}

.play-theme-badge {
    display: inline-block;
    padding: 8px 18px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #0a0000;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border: none;
    border-radius: 999px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 4px 14px rgba(240, 193, 75, 0.35);
}

.play-theme-title {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.play-theme-title i {
    color: var(--primary-color);
    font-size: 1.75rem;
    filter: drop-shadow(0 0 8px rgba(240, 193, 75, 0.3));
}

.play-theme-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}

.play-theme-rule {
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.9;
    margin: 4px 0 0 0;
    line-height: 1.5;
}

/* League Slider (แนวนอน เลือกลีก) */
.play-league-slider-wrap {
    margin: 20px 0 24px 0;
    -webkit-overflow-scrolling: touch;
}

.play-league-slider {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 4px 12px 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    scroll-behavior: auto;
}

.play-league-slider.dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.play-league-slider.dragging .play-league-slider-item {
    pointer-events: none;
}

.play-league-slider::-webkit-scrollbar {
    height: 6px;
}

.play-league-slider::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.play-league-slider::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.play-league-slider-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    min-height: 52px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
    font-family: inherit;
}

.play-league-slider-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
}

.play-league-slider-item.active {
    background: rgba(240, 193, 75, 0.18);
    border-color: rgba(240, 193, 75, 0.45);
    color: var(--primary-color, var(--primary-color));
    box-shadow: 0 0 0 1px rgba(240, 193, 75, 0.2);
}

.play-league-slider-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.play-league-slider-logo-placeholder {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    font-size: 0.9rem;
    color: #666;
    flex-shrink: 0;
}

.play-league-slider-item.active .play-league-slider-logo-placeholder {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color, var(--primary-color));
}

.play-league-slider-name {
    line-height: 1.3;
}

.play-prediction-wrap {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.play-empty-state {
    text-align: center;
    padding: 64px 32px 72px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 2px dashed rgba(255, 255, 255, 0.12);
    border-radius: 24px;
}

.play-empty-icon {
    font-size: 4.5rem;
    color: var(--text-muted);
    opacity: 0.3;
    margin-bottom: 24px;
    display: block;
}

.play-empty-text {
    font-size: 1.15rem;
    color: var(--text-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.play-empty-hint {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
}

.play-league-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.play-league-card:hover {
    border-color: rgba(240, 193, 75, 0.2);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(240, 193, 75, 0.08);
}

.play-league-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 28px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.25) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.play-league-head .play-league-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    letter-spacing: 0.02em;
}

.play-matches-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px 16px;
}

.play-date-group {
    margin-top: 8px;
}
.play-date-header {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color, var(--primary-color));
    padding: 10px 0 6px;
    margin-top: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.play-date-group:first-child .play-date-header {
    margin-top: 0;
}

/* กลุ่มตามเวลา — เวลาไว้ด้านบน คู่แข่งเวลาเดียวกันอยู่ด้วยกัน */
.play-time-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.play-time-header {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    padding: 4px 0 2px;
    margin-top: 15px;
    text-align: center;
}

/* แถวหนึ่งนัด (เวลาแยกไว้ด้านบนแล้ว) */
.play-match-row {
    display: flex;
    align-items: stretch;
    gap: 0;
    min-height: 0;
    border-radius: 12px;
    overflow: hidden;
    transition: background 0.2s ease;
}

.play-match-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* เวลาแข่ง — ไว้นอกรายการ (คอลัมน์ซ้าย แยกชัด) */
.play-match-time-wrap {
    flex-shrink: 0;
    width: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-right: none;
    border-radius: 12px 0 0 12px;
}

.play-match-time {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* กล่องรายการนัด: ทีมเหย้า | ปุ่ม/สกอร์ | ทีมเยือน (เวลาแยกไว้ด้านบนแล้ว) */
.play-match-body {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

.play-match-home,
.play-match-away {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.play-match-home {
    justify-content: flex-end;
}

.play-match-away {
    justify-content: flex-start;
}

.play-match-home .play-team-name,
.play-match-away .play-team-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.play-match-home .play-team-name {
    text-align: right;
}

.play-match-score-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    min-width: 120px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    min-width: 0;
}

.play-score-box {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.play-predict-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 100px;
    padding: 10px 20px;
    font-size: 0.9375rem;
    font-weight: 700;
    font-family: inherit;
    color: #0a0a0a;
    background: linear-gradient(145deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(240, 193, 75, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.play-predict-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(240, 193, 75, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.play-guest-hint {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.play-guest-hint:hover {
    color: var(--primary-color);
    background: rgba(240, 193, 75, 0.1);
    border-color: rgba(240, 193, 75, 0.2);
}

.play-predict-closed {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    opacity: 0.85;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    white-space: nowrap;
    cursor: default;
}

.play-league-actions {
    padding: 20px 28px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0 0 20px 20px;
}

.play-league-hint {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

/* Prediction Modal (popup ทายผล) */
.play-predict-modal .play-predict-modal-content {
    max-width: 420px;
    width: 100%;
    padding: 0;
    overflow: hidden;
}

.play-predict-modal .close-modal.play-predict-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    background: rgba(0,0,0,0.3);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.play-predict-modal .play-predict-close:hover {
    background: rgba(255,255,255,0.15);
}

.play-predict-header {
    padding: 24px 24px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.play-predict-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.play-predict-title i {
    color: var(--primary-color);
}

.play-predict-match {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0;
}

.play-predict-body {
    padding: 20px 24px;
}

.play-predict-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 14px 0;
}

.play-predict-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.play-predict-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(255,255,255,0.06);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.play-predict-option:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(240, 193, 75, 0.25);
}

.play-predict-option input:checked + .play-predict-option-label {
    color: var(--primary-color);
    font-weight: 700;
}

.play-predict-option:has(input:checked) {
    border-color: var(--primary-color);
    background: rgba(240, 193, 75, 0.1);
}

.play-predict-radio {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.play-predict-option-label {
    font-size: 1rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.play-predict-option-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 6px;
}

.play-predict-result-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 14px 0 0 0;
}

.play-predict-handicap-wrap {
    margin-top: 8px;
}

.play-predict-handicap-select {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #fff;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    cursor: pointer;
}

.play-predict-handicap-select option {
    background: #1a1a1a;
    color: #fff;
}

.play-predict-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px 24px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.play-predict-cancel,
.play-predict-confirm {
    flex: 1;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: 10px;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.play-predict-cancel {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
}

.play-predict-cancel:hover {
    background: rgba(255,255,255,0.15);
}

.play-predict-confirm {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border: none;
    color: #0a0000;
}

.play-predict-confirm:hover:not(:disabled) {
    opacity: 0.95;
    transform: translateY(-1px);
}

.play-predict-confirm:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.play-save-btn {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    display: block;
    padding: 16px 28px;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    color: #0a0000;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(240, 193, 75, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    letter-spacing: 0.02em;
}

.play-save-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(240, 193, 75, 0.45);
    background: linear-gradient(135deg, #e8c547 0%, var(--primary-color) 100%);
}

.play-save-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    body.play-page-body .main-content,
    body.play-page-body .container.container-play {
        padding-left: 16px;
        padding-right: 16px;
    }
    body.play-page-body .main-content {
        padding-bottom: 36px;
    }
    .play-theme-header {
        padding: 28px 20px 32px;
        margin-bottom: 24px;
        border-radius: 20px;
    }
    .play-theme-logo {
        max-height: 48px;
    }
    .play-theme-title {
        font-size: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    .play-theme-title i {
        font-size: 1.35rem;
    }
    .play-matches-list {
        padding: 0 12px 12px;
    }
    .play-time-header {
        font-size: 0.8125rem;
    }
    .play-match-body {
        gap: 10px 12px;
        padding: 10px 12px;
    }
    .play-match-home .play-team-name,
    .play-match-away .play-team-name {
        font-size: 0.875rem;
    }
    .play-match-score-wrap {
        padding: 10px 12px;
        min-width: 100px;
    }
    .play-predict-btn,
    .play-guest-hint,
    .play-predict-closed {
        font-size: 0.8125rem;
        padding: 8px 14px;
        min-width: 86px;
    }
    .play-match-home .play-team-logo,
    .play-match-home .play-team-logo-placeholder,
    .play-match-away .play-team-logo,
    .play-match-away .play-team-logo-placeholder {
        width: 28px;
        height: 28px;
    }
    .play-league-head {
        padding: 16px 20px;
    }
    .play-league-head .play-league-logo,
    .play-league-head .play-league-logo-placeholder {
        width: 26px;
        height: 26px;
    }
    .play-save-btn {
        max-width: none;
        padding: 14px 24px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    body.play-page-body .main-content,
    body.play-page-body .container.container-play {
        padding-left: 12px;
        padding-right: 12px;
    }
    .play-time-header {
        font-size: 0.75rem;
    }
    .play-match-body {
        gap: 8px 10px;
        padding: 8px 10px;
    }
    .play-match-home .play-team-name,
    .play-match-away .play-team-name {
        font-size: 0.8125rem;
    }
}

.league-block {
    margin-bottom: 25px;
}

.league-header {
    background: linear-gradient(180deg, #66bb6a, #2e7d32);
    color: #fff;
    text-align: center;
    font-weight: 600;
    padding: 10px;
    border-top: 1px solid #81c784;
    border-bottom: 1px solid #1b5e20;
}

.prediction-th {
    display: flex;
    background: #1a0505;
    color: #f7ec1f;
    padding: 12px 10px;
    font-weight: 500;
    align-items: center;
}

.row-match {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #2a0808;
    border-bottom: 1px solid #1a0505;
    transition: var(--transition);
    cursor: pointer;
}

.row-match:hover {
    background: #3a0a0a;
}

.row-match:nth-child(even) {
    background: #1a0505;
}

.row-match:nth-child(even):hover {
    background: #2a0808;
}

/* Col Widths for Row and TH */
.col-time {
    width: 60px;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.col-home {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    text-align: right;
}

.col-price {
    width: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.col-away {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.team-logo {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: contain;
}

.home-color {
    color: #f7ec1f;
    font-weight: 500;
}

.away-color {
    color: #f6e8b7;
    font-weight: 500;
}

.price-box {
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 4px;
    color: #fff;
    font-family: monospace;
    font-size: 1rem;
    min-width: 60px;
    text-align: center;
}

.hidden-radio {
    display: none;
}

/* Row active state (simulated selection) */
.hidden-radio:checked+.price-box {
    background: var(--primary-color);
    color: #000;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(240, 193, 75, 0.5);
}

.action-row {
    padding: 15px;
    text-align: center;
    background: #1a0505;
    border-bottom: 2px solid var(--primary-color);
}

.save-btn {
    background: linear-gradient(180deg, #f1a340, #e67e22);
    color: #000;
    font-weight: 700;
    font-family: inherit;
    border: none;
    padding: 10px 40px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.1rem;
}

.save-btn:hover {
    background: linear-gradient(180deg, #f5b056, #d35400);
    transform: scale(1.05);
}

/* -----------------------------
   Board / Forum Page — ธีมเข้ม โทนทอง
-------------------------------- */
.container-board {
    margin: 20px auto;
    display: block;
    max-width: 1400px;
}

.board-banners {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.board-promo-img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.board-promo-img:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

.board-container {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%);
    padding: 24px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.board-header-title {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.board-header-title h2 {
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.board-header-title h2 i {
    color: var(--primary-color);
}

.board-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

.board-table-wrapper {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.2);
}

.board-th {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.35) 100%);
    color: var(--primary-color);
    display: flex;
    padding: 14px 18px;
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid rgba(240, 193, 75, 0.15);
}

.th-topic,
.td-topic {
    flex: 4;
    min-width: 0;
}

.th-author,
.td-author {
    flex: 1;
    text-align: center;
}

.th-replies,
.td-replies {
    flex: 0 0 60px;
    text-align: center;
}

.th-views,
.td-views {
    flex: 0 0 60px;
    text-align: center;
}

.th-latest,
.td-latest {
    flex: 2;
    text-align: center;
    min-width: 100px;
}

.board-row {
    display: flex;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.2s ease;
    align-items: center;
}

.board-row:last-of-type {
    border-bottom: none;
}

.board-row:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.board-row:hover {
    background: rgba(240, 193, 75, 0.06);
}

.td-topic {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topic-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    opacity: 0.9;
}

.topic-link {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

.topic-link:hover {
    color: var(--primary-color);
}

.author-name {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.td-replies,
.td-views {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
}

.td-latest {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.board-empty {
    padding: 40px 20px !important;
    text-align: center;
    color: var(--text-muted) !important;
    font-size: 1rem;
}

.board-pagination {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.page-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-right: 4px;
}

.page-num {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.page-num:hover {
    background: rgba(240, 193, 75, 0.2);
    border-color: rgba(240, 193, 75, 0.3);
    color: var(--primary-color);
}

.page-num.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-color: var(--primary-color);
    color: #0a0000;
    font-weight: 700;
}

/* ตารางอันดับ หน้าแรก - เลขหน้า */
.pagination-wrap {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}
.pagination-info {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
}
.pagination-wrap .pagination {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}
.pagination-wrap .pagination-num,
.pagination-wrap .pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.pagination-wrap .pagination-num:hover,
.pagination-wrap .pagination-btn:hover {
    background: rgba(240, 193, 75, 0.2);
    border-color: rgba(240, 193, 75, 0.3);
    color: var(--primary-color);
}
.pagination-wrap .pagination-num.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-color: var(--primary-color);
    color: #0a0000;
    font-weight: 700;
}

.page-dots {
    color: var(--text-muted);
    letter-spacing: 2px;
}

/* -----------------------------
   Topic Details Page — ธีมเข้ม โทนทอง
-------------------------------- */
.topic-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.3) 100%);
    padding: 20px 24px;
    border-radius: 14px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.topic-title-area {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.topic-main-icon {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-top: 4px;
}

.topic-title-text h2 {
    color: #fff;
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.topic-category-badge {
    display: inline-block;
    background: rgba(240, 193, 75, 0.15);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(240, 193, 75, 0.3);
}

.topic-stats-area {
    display: flex;
    gap: 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.topic-posts-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.post-block {
    display: flex;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.post-sidebar {
    width: 150px;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.post-avatar {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    margin-bottom: 12px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.post-author {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
    word-break: break-all;
    text-align: center;
}

.post-role {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.role-admin {
    color: var(--primary-color);
    font-weight: 600;
}

.post-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: transparent;
    color: var(--text-color);
}

.post-meta {
    background: rgba(0, 0, 0, 0.25);
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.post-number {
    font-weight: 600;
    color: var(--primary-color);
}

.post-content {
    padding: 20px 18px;
    flex: 1;
    line-height: 1.75;
    color: var(--text-color);
}

.post-content p {
    margin-bottom: 12px;
}

.post-content ul,
.post-content ol {
    margin-left: 24px;
    margin-bottom: 12px;
}

.post-content a {
    color: var(--primary-color);
}

.post-actions {
    padding: 12px 18px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: right;
}

.btn-quote {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    font-family: inherit;
    font-size: 0.9rem;
}

.btn-quote:hover {
    background: rgba(240, 193, 75, 0.15);
    border-color: rgba(240, 193, 75, 0.3);
    color: var(--primary-color);
}

.reply-box-container {
    background: rgba(0, 0, 0, 0.25);
    padding: 24px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.reply-box-title {
    color: var(--primary-color);
    margin-bottom: 16px;
    font-size: 1.15rem;
    font-weight: 600;
}

.reply-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 15px;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    outline: none;
}

.reply-textarea:focus {
    border-color: var(--primary-color);
}

.reply-form-actions {
    margin-top: 15px;
    text-align: right;
}

.submit-reply-btn {
    padding: 10px 30px;
    font-size: 1.1rem;
}

/* -----------------------------
   Rules Page Styles
-------------------------------- */
.rule-header-title {
    background: linear-gradient(180deg, #5e1111, #330505);
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    border-bottom: 2px solid #e74c3c;
}

.rule-header-title h2 {
    color: #fff;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rule-body-content {
    padding: 30px;
}

.rule-content-columns {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
}
@media (max-width: 768px) {
    .rule-content-columns { grid-template-columns: 1fr; }
}
.rule-side-column {
    max-width: 500px;
}
.rule-side-column .rule-side-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

.rule-row-split {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.rule-col-text {
    flex: 1;
}

.rule-col-img {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.rule-infographic {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.rule-section-title {
    color: #f1c40f;
    font-size: 1.4rem;
    margin-bottom: 15px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
    padding-bottom: 8px;
}

.rule-list {
    color: var(--text-color);
    padding-left: 20px;
}

.rule-list.custom-counter {
    list-style-type: decimal;
}

.rule-list li {
    margin-bottom: 12px;
    line-height: 1.6;
}

.text-highlight {
    color: #f1c40f;
}

.text-blue {
    color: var(--primary-color);
    font-weight: bold;
}

.text-red {
    color: #e74c3c;
}

.text-yellow {
    color: #f1c40f;
    font-weight: bold;
}

.rule-score-board {
    background: linear-gradient(180deg, #1b0a0a, #0b0505);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin: 30px 0;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.score-line {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.score-item {
    min-width: 150px;
}

.score-bonus {
    margin-top: 15px;
    font-size: 1.2rem;
}

.rule-additional-rules {
    margin-top: 20px;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    body {
        padding-bottom: 70px;
        font-size: 12px;
    }

    .desktop-nav {
        display: none !important;
    }

    .mobile-auth-nav {
        display: block;
    }

    /* Bottom Fixed Navigation */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-top: 1px solid rgba(240, 193, 75, 0.2);
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.8);
        z-index: 1000;
        justify-content: space-around;
        padding: 8px 5px;
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 0.7rem;
        gap: 4px;
        transition: var(--transition);
        width: 20%;
    }

    .mobile-nav-item i {
        font-size: 1.2rem;
    }

    .mobile-nav-item:hover,
    .mobile-nav-item.active {
        color: var(--primary-color);
    }

    .mobile-nav-item.active {
        transform: translateY(-2px);
    }

    .nav-item i {
        font-size: 1.1rem;
        margin-bottom: 2px;
    }

    .info-section {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .search-box {
        flex-direction: column;
        width: 100%;
    }

    .search-input {
        width: 100%;
    }

    .search-box .btn {
        width: 100%;
        justify-content: center;
    }

    /* Responsive Table Styles */
    .table-wrapper {
        overflow-x: hidden;
    }

    .custom-table,
    .custom-table thead,
    .custom-table tbody,
    .custom-table th,
    .custom-table td,
    .custom-table tr {
        display: block;
    }

    .custom-table {
        min-width: 100%;
    }

    .custom-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .custom-table tr {
        border: 1px solid rgba(255, 255, 255, 0.1);
        margin-bottom: 15px;
        border-radius: 8px;
        background: rgba(0, 0, 0, 0.3);
        padding: 10px;
    }

    .custom-table td {
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        position: relative;
        padding-left: 45%;
        text-align: right;
        min-height: 40px;
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }

    .custom-table td:last-child {
        border-bottom: none;
    }

    .custom-table td:before {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        left: 10px;
        width: 40%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: var(--text-muted);
        content: attr(data-label);
    }

    .user-cell {
        justify-content: flex-end;
    }

    .form-badge {
        margin: 2px;
    }

    .custom-table td[data-label="10 ครั้งล่าสุด"] {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    /* Reduce paddings and margins for mobile */
    .container {
        padding: 0 10px;
        margin: 15px auto;
        gap: 15px;
    }

    .main-content,
    .sidebar {
        gap: 15px;
    }

    .promo-banners-container {
        gap: 10px;
    }

    .leaderboard-section {
        padding: 10px;
    }

    .info-card {
        padding: 15px;
        gap: 10px;
    }

    .login-box {
        padding: 15px;
    }

    .site-footer {
        padding: 15px;
        margin-top: 20px;
    }

    .section-header {
        margin-bottom: 10px;
        padding-bottom: 10px;
        gap: 10px;
    }

    /* Mobile overrides for play page */
    .prediction-th {
        display: none;
        /* Hide desktop headers */
    }

    .row-match {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 12px 10px;
        position: relative;
    }

    .col-time {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        margin-bottom: 10px;
        padding-bottom: 5px;
    }

    .col-home {
        width: 40%;
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .col-price {
        width: 20%;
        order: 2;
        /* Put score between columns */
    }

    .price-box {
        padding: 5px;
        font-size: 0.9rem;
        min-width: 50px;
    }

    .col-away {
        width: 40%;
        flex-direction: column-reverse;
        /* Stack logo above text */
        justify-content: center;
        text-align: center;
        order: 3;
    }

    .team-logo {
        margin-bottom: 5px;
        width: 32px;
        height: 32px;
    }

    /* Mobile overrides for board page */
    .board-th {
        display: none;
    }

    .board-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
        background: rgba(255, 255, 255, 0.03);
        margin-bottom: 10px;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.06);
    }

    .board-row:nth-child(even) {
        background: rgba(0, 0, 0, 0.2);
    }

    .td-topic {
        width: 100%;
        margin-bottom: 12px;
        font-size: 1.05rem;
    }

    .td-author,
    .td-replies,
    .td-views,
    .td-latest {
        width: 100%;
        text-align: left;
        display: flex;
        justify-content: space-between;
        padding: 6px 0;
        font-size: 0.9rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .td-latest {
        border-bottom: none;
    }

    .td-author:before,
    .td-replies:before,
    .td-views:before,
    .td-latest:before {
        content: attr(data-label);
        color: var(--text-muted);
        font-weight: 500;
        min-width: 80px;
    }

    .board-pagination {
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Mobile overrides for topic page */
    .topic-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .topic-title-area {
        flex-direction: column;
        gap: 10px;
    }

    .topic-main-icon {
        display: none;
    }

    .topic-stats-area {
        width: 100%;
        justify-content: space-between;
        border-top: 1px dashed rgba(255, 255, 255, 0.1);
        padding-top: 10px;
    }

    .post-block {
        flex-direction: column;
    }

    .post-sidebar {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 10px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .post-avatar {
        width: 50px;
        height: 50px;
        margin-bottom: 0;
        margin-right: 15px;
    }

    .post-author {
        text-align: left;
        margin-bottom: 0;
        flex: 1;
    }

    .post-role {
        text-align: right;
    }

    .post-content {
        padding: 15px;
    }

    /* Mobile overrides for rules page */
    .rule-body-content {
        padding: 15px;
    }

    .rule-row-split {
        flex-direction: column;
        gap: 20px;
    }

    .score-line {
        flex-direction: column;
        gap: 10px;
    }

    .score-item {
        min-width: unset;
    }
}

/* Login Modal CSS */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 400px;
    padding: 30px;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-content h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--loss-color);
    transform: scale(1.1);
}

\n

/* Login Modal Redesign */
.login-modal-content {
    max-width: 450px;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(240, 193, 75, 0.2);
}

.login-modal-close {
    top: 20px;
    right: 20px;
}

.login-modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-modal-icon-container {
    width: 70px;
    height: 70px;
    background: rgba(240, 193, 75, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(240, 193, 75, 0.3);
}

.login-modal-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.login-modal-title {
    color: #fff;
    font-size: 1.8rem;
    margin-bottom: 5px;
    border: none;
    padding: 0;
}

.login-modal-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.login-form-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-form-group-sm {
    margin-bottom: 15px;
    text-align: left;
}

.login-form-label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
    font-size: 0.95rem;
}

.login-form-label-icon {
    color: var(--primary-color);
    margin-right: 8px;
}

.login-form-input {
    padding: 12px 15px;
    font-size: 1rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.5);
}

.login-forgot-container {
    text-align: right;
    margin-bottom: 30px;
}

.login-forgot-link {
    color: #e74c3c;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.login-forgot-link:hover {
    color: #fff;
}

.login-submit-btn {
    display: block;

    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(240, 193, 75, 0.4);
    margin-bottom: 25px;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}

.login-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(240, 193, 75, 0.6);
}

.login-register-container {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 25px;
}

.login-register-text {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.login-register-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    margin-left: 5px;
    font-size: 1rem;
    transition: text-shadow 0.3s;
}

.login-register-link:hover {
    text-shadow: 0 0 10px rgba(240, 193, 75, 0.6);
}

/* เนื้อหาจาก DB (Quill editor + รูป) */
.rule-from-db {
    line-height: 1.75;
    color: rgba(255,255,255,0.9);
}
.rule-from-db p { margin: 0 0 1em 0; }
.rule-from-db h1, .rule-from-db h2, .rule-from-db h3 { margin: 1.25em 0 0.5em 0; color: #fff; }
.rule-from-db ul, .rule-from-db ol { margin: 0.5em 0 1em 1.5em; padding-left: 1.5em; }
.rule-from-db li { margin-bottom: 0.35em; }
.rule-from-db blockquote { margin: 1em 0; padding: 0.5em 1em; border-left: 4px solid var(--primary, var(--primary-color)); background: rgba(255,255,255,0.05); border-radius: 0 8px 8px 0; }
.rule-from-db a { color: var(--primary, var(--primary-color)); text-decoration: none; }
.rule-from-db a:hover { text-decoration: underline; }
.rule-from-db img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 12px 0;
}
.rule-from-db table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
}
.rule-from-db th,
.rule-from-db td {
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 12px;
    text-align: left;
}

/* หน้ารางวัล (event.php) — เชื่อมดาต้า */
.event-rewards-wrap {
    padding: 24px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.event-rewards-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.event-rewards-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.event-rewards-title i {
    color: var(--primary-color);
}
.event-rewards-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}
.event-rewards-intro {
    margin-bottom: 28px;
    color: var(--text-color);
}
.event-rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.event-reward-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.event-reward-card:hover {
    border-color: rgba(240, 193, 75, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.event-reward-image-wrap {
    aspect-ratio: 1;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}
.event-reward-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.event-reward-no-image {
    font-size: 3rem;
    color: var(--text-muted);
    opacity: 0.5;
}
.event-reward-info {
    padding: 16px;
}
.event-reward-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px 0;
}
.event-reward-points {
    font-size: 0.95rem;
    color: var(--primary-color);
    margin: 0 0 4px 0;
}
.event-reward-qty {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}
.event-rewards-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 20px;
    margin: 0;
}
.event-rewards-body {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}
.event-rewards-center {
    flex: 1;
    min-width: 0;
}
.event-rewards-side {
    flex: 0 0 auto;
    max-width: 280px;
}
.event-rewards-side-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    object-fit: contain;
}
@media (max-width: 900px) {
    .event-rewards-body { flex-direction: column; align-items: stretch; }
    .event-rewards-side { max-width: none; }
    .event-rewards-side-left { order: 1; }
    .event-rewards-center { order: 2; }
    .event-rewards-side-right { order: 3; }
}