/* ==========================================================================
   TOP NHÀ CÁI UY TÍN 2026 - CLEAN & HIGH CONVERTING SPORT UI
   ========================================================================== */

:root {
    --bg-main: #0a0f1d;
    --bg-card: #121b2d;
    --bg-card-hover: #17243c;
    --bg-secondary: #0d1527;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 180, 216, 0.4);

    --primary-red: #ff3366;
    --primary-red-hover: #ff174d;
    --primary-red-glow: 0 0 20px rgba(255, 51, 102, 0.4);

    --electric-blue: #00b4d8;
    --stadium-green: #00e676;
    --gold-accent: #ffb703;
    --gold-glow: 0 0 15px rgba(255, 183, 3, 0.35);

    --text-white: #ffffff;
    --text-gray-100: #e2e8f0;
    --text-gray-300: #94a3b8;
    --text-gray-400: #64748b;
    --text-muted: #475569;

    --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-display: 'Teko', sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --transition-fast: 0.2s ease;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-gray-100);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
    transition: var(--transition-fast);
}

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
    background: #080d1a;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 0;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary-red) 0%, #ff6b8b 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(255, 51, 102, 0.35);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-size: 1.3rem;
    font-weight: 900;
    color: #fff;
    line-height: 1.1;
    letter-spacing: 0.5px;
}

.logo-main .highlight {
    color: var(--primary-red);
}

.logo-sub {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--electric-blue);
    letter-spacing: 1px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.search-box-header {
    position: relative;
    display: none;
}

@media (min-width: 768px) {
    .search-box-header {
        display: block;
        width: 220px;
    }
}

.search-box-header i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray-400);
    font-size: 0.85rem;
}

.search-box-header input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 7px 30px 7px 34px;
    color: #fff;
    font-size: 0.82rem;
    font-family: inherit;
    outline: none;
}

.search-box-header input:focus {
    border-color: var(--electric-blue);
}

.clear-search {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    color: var(--text-gray-400);
    font-size: 0.8rem;
}

.btn-top1-hot {
    background: linear-gradient(135deg, var(--primary-red) 0%, #d90429 100%);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(255, 51, 102, 0.4);
    animation: pulse-hot 2s infinite;
}

@keyframes pulse-hot {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* ==========================================================================
   MAIN CONTENT
   ========================================================================== */
.main-content {
    flex: 1;
    padding: 24px 0 40px;
}

.top-headline-bar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
}

@media (min-width: 992px) {
    .top-headline-bar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.headline-title h1 {
    font-size: 1.25rem;
    font-weight: 900;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.3px;
}

.headline-title p {
    font-size: 0.82rem;
    color: var(--text-gray-400);
    margin-top: 2px;
}

.text-gold {
    color: var(--gold-accent);
}

.font-bold {
    font-weight: 700;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-gray-300);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.tab-btn.active {
    background: var(--electric-blue);
    color: #000;
    font-weight: 800;
    border-color: var(--electric-blue);
}

/* ==========================================================================
   BOOKMAKER LIST & CARDS
   ========================================================================== */
.bookmakers-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 36px;
}

.bm-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    transition: var(--transition-fast);
    position: relative;
}

.bm-card:hover {
    border-color: var(--border-glow);
    background: var(--bg-card-hover);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.bm-card.rank-1 {
    border: 2px solid var(--gold-accent);
    background: linear-gradient(145deg, #16243d 0%, #10192a 100%);
    box-shadow: var(--gold-glow);
}

.bm-card-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: center;
}

@media (min-width: 992px) {
    .bm-card-inner {
        grid-template-columns: 48px 180px 1.4fr 1.1fr 200px;
        gap: 20px;
    }
}

/* Rank Badge */
.bm-rank-badge {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: #080d1a;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.2rem;
    color: var(--text-gray-300);
}

.bm-card.rank-1 .bm-rank-badge {
    background: var(--gold-accent);
    color: #000;
    border: none;
    box-shadow: var(--gold-glow);
}

.bm-card.rank-2 .bm-rank-badge {
    background: #e0e0e0;
    color: #000;
    border: none;
}

.bm-card.rank-3 .bm-rank-badge {
    background: #cd7f32;
    color: #fff;
    border: none;
}

/* Brand Box */
.bm-brand-col {
    display: flex;
    align-items: center;
    gap: 14px;
}

.bm-logo-box {
    width: 72px;
    height: 52px;
    background: #080d1a;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    flex-shrink: 0;
}

.bm-logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.bm-name-wrap h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.bm-rating-pill {
    font-size: 0.75rem;
    color: var(--gold-accent);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

/* Info Column */
.bm-info-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bm-tag-badge {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--electric-blue);
    background: rgba(0, 180, 216, 0.12);
    border: 1px solid rgba(0, 180, 216, 0.3);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.bm-desc {
    font-size: 0.85rem;
    color: var(--text-gray-300);
}

.bm-perks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-gray-300);
}

.bm-perks span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.bm-perks i {
    color: var(--stadium-green);
}

/* Promo Bonus Column */
.bm-promo-col {
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bm-bonus-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    color: var(--text-gray-400);
    font-weight: 700;
}

.bm-bonus-title {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--gold-accent);
    line-height: 1.2;
}

.bm-speed-tag {
    font-size: 0.78rem;
    color: var(--stadium-green);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Actions Column */
.bm-actions-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-bet-now {
    background: linear-gradient(135deg, var(--primary-red) 0%, #d90429 100%);
    color: #fff;
    font-weight: 800;
    font-size: 0.92rem;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(255, 51, 102, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.btn-bet-now:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 51, 102, 0.5);
}

.bm-sub-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-gray-400);
    padding: 0 2px;
}

.bm-sub-actions a {
    color: var(--electric-blue);
    text-decoration: underline;
}

.btn-quick-review {
    background: none;
    color: var(--text-gray-300);
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-quick-review:hover {
    color: #fff;
}

/* ==========================================================================
   COMPACT TABLE SECTION
   ========================================================================== */
.compact-table-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.compact-table-header h2 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-responsive-wrapper {
    overflow-x: auto;
}

.clean-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
    min-width: 680px;
}

.clean-table th {
    background: #080d1a;
    padding: 12px 14px;
    color: var(--text-gray-300);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.clean-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-gray-100);
    vertical-align: middle;
}

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

.badge-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #080d1a;
    font-weight: 800;
    font-size: 0.8rem;
}

.badge-rank.rank1 { background: var(--gold-accent); color: #000; }
.badge-rank.rank2 { background: #e0e0e0; color: #000; }
.badge-rank.rank3 { background: #cd7f32; color: #fff; }

.tbl-brand-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tbl-brand-item img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    background: #080d1a;
    border-radius: 4px;
    padding: 2px;
}

.speed-pill {
    background: rgba(0, 230, 118, 0.1);
    color: var(--stadium-green);
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
}

.btn-tbl-cta {
    background: var(--primary-red);
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    display: inline-block;
}

.btn-tbl-cta:hover {
    filter: brightness(1.15);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background: #050913;
    border-top: 1px solid var(--border-color);
    padding: 16px 0;
    font-size: 0.8rem;
    color: var(--text-gray-400);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
}

@media (min-width: 768px) {
    .footer-inner {
        flex-direction: row;
    }
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.age-pill {
    background: var(--primary-red);
    color: #fff;
    font-weight: 900;
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 4px;
}

/* ==========================================================================
   REVIEW MODAL
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

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

.modal-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.modal-close:hover {
    background: var(--primary-red);
}

/* Toast */
.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #11223e;
    border: 1px solid var(--stadium-green);
    color: #fff;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    z-index: 1100;
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition-fast);
}

.toast-notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* ==========================================================================
   MOBILE COMPACT (< 992px)
   ========================================================================== */
@media (max-width: 991px) {
    .main-content {
        padding: 12px 0 24px;
    }

    .top-headline-bar {
        padding: 12px 14px;
        gap: 10px;
        margin-bottom: 12px;
    }

    .headline-title h1 {
        font-size: 1.05rem;
    }

    .headline-title p {
        font-size: 0.75rem;
    }

    .bookmakers-list {
        gap: 10px;
        margin-bottom: 24px;
    }

    .bm-card {
        padding: 12px 14px;
    }

    /* Rank + logo/name on one row; promo & CTA full width below */
    .bm-card-inner {
        grid-template-columns: auto 1fr;
        gap: 10px 12px;
    }

    .bm-rank-badge {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .bm-info-col,
    .bm-promo-col,
    .bm-actions-col {
        grid-column: 1 / -1;
    }

    /* Remove description & perk checklist on mobile */
    .bm-desc,
    .bm-perks {
        display: none;
    }

    .bm-logo-box {
        width: 56px;
        height: 42px;
    }

    .bm-name-wrap h3 {
        font-size: 1rem;
    }

    .bm-info-col {
        display: none;
    }

    .bm-promo-col {
        padding: 8px 12px;
    }

    .bm-bonus-title {
        font-size: 0.95rem;
    }

    .btn-bet-now {
        padding: 9px 14px;
        font-size: 0.88rem;
    }

    .compact-table-section {
        padding: 14px;
    }
}
