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

:root {
    --bg-body: #0f172a;
    /* Dark Blue Slate */
    --bg-card: #1e293b;
    /* Slightly Lighter Slate */
    --bg-header: #0f172a;
    --primary: #00f2ea;
    /* Neon Cyan */
    --primary-hover: #00c4bd;
    --text-main: #f8fafc;
    /* Off-white */
    --text-muted: #94a3b8;
    /* Slate Grey */
    --border-color: #334155;
    --odd-bg: #334155;
    --odd-hover: #00f2ea;
}

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    /* Wider */
    margin: 0 auto;
    padding: 0 1rem;
}

/* Detail Button */
.detail-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    background-color: var(--odd-bg);
    /* Button look */
    color: var(--text-muted);
    padding: 0.25rem;
    width: 40px;
    /* Smaller */
    height: 40px;
    border-radius: 6px;
    transition: 0.2s;
    margin-left: 0.5rem;
}

.detail-btn:hover {
    background-color: var(--odd-hover);
    color: #000;
}

.market-count {
    font-size: 0.6rem;
    background: var(--primary);
    color: #000;
    border-radius: 8px;
    padding: 0 4px;
    margin-top: 2px;
    font-weight: 700;
}

/* Header */
header {
    background-color: var(--bg-header);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(15, 23, 42, 0.9);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 242, 234, 0.5);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-muted);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.2s;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    text-shadow: 0 0 8px rgba(0, 242, 234, 0.6);
}

/* Match Row Layout (Single Line) */
.match-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    /* Allow time column to expand */
    /* Time - Match - Odds */
    gap: 20px;
    align-items: center;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
}

/* ... existing hover ... */

.match-time {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding-right: 0.5rem;
    /* Reduced padding */
    border-right: 1px solid var(--border-color);
    gap: 8px;
    /* Slightly reduced gap */
    min-width: 140px;
    /* Prevent shrinking/overflow */
}

.gtl-logo {
    height: 24px;
    width: auto;
    object-fit: contain;
}

.time-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.time-separator {
    width: 1px;
    height: 20px;
    background-color: var(--border-color);
}

.channel-info {
    font-size: 0.7rem;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 600;
    margin: 0;

    /* Box Styling */
    border: 1px solid rgba(0, 242, 234, 0.4);
    background: rgba(0, 242, 234, 0.05);
    /* Very subtle fill */
    padding: 0 6px;
    /* Slightly reduced padding */
    height: 24px;
    /* Reduced height */
    display: flex;
    /* Centering text */
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    min-width: 50px;
    /* Reduced min-width */
    line-height: normal;
    /* Better for centering */
}

/* Match Info (Teams - Redesigned) */
.match-info {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Strictly Left Aligned */
    gap: 15px;
    /* Spacing between Home - Separator - Away */
    flex: 1;
    /* Take remaining space */
}

.team-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Home Team Fixed Width */
.match-info .team-wrapper:first-child {
    flex: 0 0 250px;
    /* Fixed width for Home Team */
    width: 250px;
    justify-content: flex-end;
    /* Align to the right edge */
    text-align: right;
    /* Text aligns right */
}

/* Align text row for home team */
.match-info .team-wrapper:first-child .team-details {
    justify-content: flex-end;
    /* Align right */
}

.team-details {
    display: flex;
    flex-direction: row;
    /* Inline */
    align-items: baseline;
    /* Align text baselines */
    gap: 5px;
    width: 100%;
    /* Take available space */
}

.team-name {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.95rem;
}

.player-name {
    font-size: 0.8rem;
    /* Slightly larger since it's inline */
    color: var(--text-muted);
    font-weight: 400;
}

.vs-divider {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0 5px;
}

/* Odds Container */
.odds-group {
    display: flex;
    gap: 0.5rem;
}

.odd-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 40px;
    background-color: var(--odd-bg);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.odd-btn:hover {
    background-color: var(--odd-hover);
    color: #000;
    box-shadow: 0 0 10px rgba(0, 242, 234, 0.4);
}

.odd-label {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.odd-btn:hover .odd-label {
    color: #000;
    opacity: 0.7;
}

.odd-value {
    font-weight: 700;
    font-size: 0.9rem;
}

/* Section Header */
h2 {
    color: var(--text-main);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Badge/Tag */
.tag {
    background: rgba(0, 242, 234, 0.1);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    border: 1px solid rgba(0, 242, 234, 0.3);
}

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-card);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
}

.search-group {
    display: flex;
    align-items: center;
    background: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0 0.5rem;
}

.search-input {
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 0.5rem;
    outline: none;
}

.search-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    cursor: pointer;
}

.date-filters {
    display: flex;
    gap: 0.5rem;
    background: #0f172a;
    padding: 0.25rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.date-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.date-btn.active,
.date-btn:hover {
    background-color: var(--primary);
    color: #000;
    font-weight: 600;
}

/* Logos */
.team-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    /* margin-right removed, gap handles it */
}

/* Expanded Details */
.match-details {
    display: none;
    /* Hidden by default */
    background-color: #0f172a;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    width: 100%;
    grid-column: 1 / -1;
    /* Span full width if in grid */
}

/* Ensure match-row wraps details correctly */
.match-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.match-row {
    margin-bottom: 0;
    border: none;
    border-radius: 0;
}



/* Detail Button */
.detail-btn {
    display: flex;
    flex-direction: row;
    /* Side by side */
    justify-content: center;
    align-items: center;
    cursor: pointer;
    background-color: transparent;
    /* No background */
    color: #fff;
    /* White icon */
    padding: 0;
    width: auto;
    /* Auto width */
    height: 40px;
    border-radius: 6px;
    transition: 0.2s;
    margin-left: 1rem;
    gap: 5px;
    /* Space between icon and number */
}

.detail-btn:hover {
    color: var(--primary);
    background-color: transparent;
}

.market-count {
    font-size: 0.85rem;
    background: transparent;
    /* No background */
    color: #fff;
    /* White text */
    padding: 0;
    font-weight: 500;
    margin: 0;
}

.detail-btn:hover .market-count {
    color: var(--primary);
}

.goto-btn {
    margin-left: 0;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    /* Circle */
    justify-content: center;
    font-size: 1.2rem;
    line-height: 1;
    padding-bottom: 2px;
}

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

/* Detail Grid */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Force 2 columns */
    gap: 1.5rem;
}

.detail-group {
    background: rgba(15, 23, 42, 0.5);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.detail-group h4 {
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.detail-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
}

/* Override odd-btn inside details for full width */
.detail-items .odd-btn {
    width: 100% !important;
    height: 48px !important;
    background-color: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-items .odd-btn:hover {
    background-color: var(--odd-hover);
    border-color: var(--primary);
}

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

.mt-4 {
    margin-top: 1rem;
}