/* ==========================================
   GENERAL STYLES
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ADD THIS */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}


/* ==========================================
   FREE TIPS SECTION
   ========================================== */
.free-tips-section {
    width: 100%;
    padding: 20px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.free-tips-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ==========================================
   HEADER BANNER
   ========================================== */
.tips-banner {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: white;
    text-align: center;
    padding: 50px 30px;
    border-radius: 15px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(255, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.tips-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.tips-banner h1 {
    font-size: 42px;
    margin: 0 0 15px 0;
    font-weight: bold;
    position: relative;
    z-index: 1;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.tips-banner h1 i {
    margin-right: 15px;
    color: #ffd700;
}

.tips-banner p {
    font-size: 20px;
    margin: 0;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

/* ==========================================
   STATISTICS CARDS
   ========================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: all 0.3s;
    border-top: 4px solid #ff0000;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-card.won-card {
    border-top-color: #28a745;
}

.stat-card.lost-card {
    border-top-color: #dc3545;
}

.stat-card.rate-card {
    border-top-color: #ffc107;
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.stat-icon.total { color: #ff0000; }
.stat-icon.won { color: #28a745; }
.stat-icon.lost { color: #dc3545; }
.stat-icon.rate { color: #ffc107; }

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #333;
    margin: 10px 0;
}

.stat-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ==========================================
   QUICK DATE FILTER TABS
   ========================================== */
.quick-date-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

.date-tab {
    padding: 12px 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.date-tab:hover {
    background: #e9ecef;
    border-color: #28a745;
    color: #28a745;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.date-tab.active {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
    border-color: #28a745;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.date-tab.all-tab.active {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.date-tab i {
    font-size: 14px;
}

/* ==========================================
   SECTION HEADERS
   ========================================== */
.section-header {
    background: white;
    padding: 20px 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    border-left: 6px solid #ff0000;
}

.section-header h2 {
    margin: 0;
    font-size: 26px;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header h2 i {
    color: #ff0000;
}

.section-header.upcoming {
    border-left-color: #28a745;
}

.section-header.upcoming h2 i {
    color: #28a745;
}

/* ==========================================
   SEARCH CONTAINER
   ========================================== */
.search-container {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    border-left: 6px solid #ff0000;
}

.search-container.results-search {
    border-left-color: #28a745;
}

.search-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.search-header i {
    font-size: 22px;
    color: #ff0000;
}

.search-container.results-search .search-header i {
    color: #28a745;
}

.search-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 15px;
    align-items: flex-end;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-input,
.date-input {
    padding: 14px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    font-family: inherit;
    width: 100%;
    max-width: 100%;
}

.search-input:focus,
.date-input:focus {
    outline: none;
    border-color: #ff0000;
    box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.1);
}

.search-container.results-search .search-input:focus,
.search-container.results-search .date-input:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.1);
}

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

.search-btn {
    padding: 14px 28px;
    background: #ff0000;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 50px;
}

.search-btn:hover {
    background: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 0, 0, 0.4);
}

.search-btn i {
    margin-right: 8px;
}

.search-container.results-search .search-btn {
    background: #28a745;
}

.search-container.results-search .search-btn:hover {
    background: #218838;
    box-shadow: 0 6px 15px rgba(40, 167, 69, 0.4);
}

.clear-btn {
    background: #6c757d;
}

.clear-btn:hover {
    background: #5a6268;
    box-shadow: 0 6px 15px rgba(108, 117, 125, 0.4);
}

/* ==========================================
   ACTIVE SEARCH BANNER
   ========================================== */
.active-search-banner {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 5px solid #ffc107;
    padding: 15px 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 3px 10px rgba(255, 193, 7, 0.2);
}

.active-search-banner i {
    font-size: 24px;
    color: #856404;
}

.active-search-banner p {
    margin: 0;
    color: #856404;
    font-size: 15px;
    font-weight: 600;
}

.active-search-banner strong {
    color: #ff0000;
}

/* ==========================================
   TIPS TABLE - DESKTOP
   ========================================== */
.tips-table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.tips-table {
    width: 100%;
    border-collapse: collapse;
}

.tips-table thead {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: white;
}

.tips-table thead.upcoming-header {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
}

.tips-table th {
    padding: 18px 15px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.tips-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s;
}

.tips-table tbody tr:hover {
    background: #f8f9fa;
}

.tips-table tbody tr:last-child {
    border-bottom: none;
}

.tips-table td {
    padding: 20px 15px;
    font-size: 15px;
}

.match-name {
    font-weight: 600;
    color: #333;
}

.league-name {
    color: #6c757d;
    font-size: 14px;
}

.prediction {
    font-weight: 600;
    color: #ff0000;
}

/* ==========================================
   ODDS BADGES
   ========================================== */
.odds-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.odds-low {
    background: #28a745;
    color: white;
}

.odds-medium {
    background: #ffc107;
    color: #333;
}

.odds-high {
    background: #dc3545;
    color: white;
}

/* ==========================================
   RESULT BADGES
   ========================================== */
.result-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.result-won {
    background: #28a745;
    color: white;
}

.result-lost {
    background: #dc3545;
    color: white;
}

.result-pending {
    background: #ffc107;
    color: #333;
}

/* ==========================================
   TIME STYLING
   ========================================== */
.time-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #495057;
}

.time-badge i {
    color: #ff0000;
}

.time-tbd {
    color: #6c757d;
    font-style: italic;
    font-size: 13px;
}

/* ==========================================
   EMPTY STATE - FORCE CENTER ALIGNMENT
   ========================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    width: 100%;
    margin: 0 auto;
}

.empty-state i {
    font-size: 64px;
    margin: 0 auto 20px auto;
    color: #dee2e6;
    display: block;
    text-align: center;
}

.empty-state h3 {
    font-size: 20px;
    color: #6c757d;
    margin: 0 auto 10px auto;
    font-weight: 600;
    text-align: center;
}

.empty-state p {
    font-size: 15px;
    color: #adb5bd;
    text-align: center;
    margin: 0 auto;
}

/* Force center for table cells containing empty state */
td[colspan] .empty-state,
td[colspan] .empty-state *,
.tips-table td .empty-state,
.tips-table td .empty-state * {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}



/* ==========================================
   ADS CONTAINERS
   ========================================== */
.ads-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px;
}

.ad-banner {
    flex: 1;
    max-width: 600px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.ad-banner:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.ad-banner img {
    width: 100%;
    height: auto;
    display: block;
}

.ad-banner-small {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.ad-banner-small:hover {
    transform: scale(1.01);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.ad-banner-small img {
    width: 100%;
    height: auto;
    display: block;
}

/* ==========================================
   DUAL TABLE LAYOUT (50/50)
   ========================================== */
.dual-table-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.half-table {
    width: 100%;
}

.half-table .section-header {
    margin-bottom: 15px;
}

.half-table .section-header h2 {
    font-size: 18px;
}

.half-table .tips-table th {
    padding: 12px 10px;
    font-size: 12px;
}

.half-table .tips-table td {
    padding: 12px 10px;
    font-size: 13px;
}

/* ==========================================
   MOBILE RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 992px) {
    .search-form {
        grid-template-columns: 1fr;
    }
    
    .search-buttons {
        flex-direction: row;
        justify-content: flex-start;
    }
    
    .ads-container {
        flex-direction: column;
    }
    
    .ad-banner {
        max-width: 100%;
    }
    
    .dual-table-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .tips-banner h1 {
        font-size: 28px;
    }
    
    .tips-banner p {
        font-size: 16px;
    }
    
    /* Stats grid - 2 per row on mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    /* Date filter tabs - scrollable container */
    .quick-date-filter {
        padding: 15px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    .quick-date-filter::-webkit-scrollbar {
        height: 6px;
    }
    
    .quick-date-filter::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }
    
    .quick-date-filter::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 10px;
    }
    
    .date-tab {
        padding: 10px 15px;
        font-size: 13px;
        flex-shrink: 0;
    }
    
    /* Fix date input overflow */
    .date-input {
        max-width: 100%;
        min-width: 0;
        font-size: 14px;
        padding: 12px 10px;
    }
    
    .section-header h2 {
        font-size: 20px;
    }
    
    .search-header h3 {
        font-size: 17px;
    }
    
    .step-box h2 {
        font-size: 20px;
    }
    
    .step-box p {
        font-size: 14px;
    }

    /* ==========================================
       MAIN TABLES - CARD LAYOUT ON MOBILE
       Only for 6+ column tables
       ========================================== */
    .tips-table-container:not(.half-table .tips-table-container) {
        overflow-x: visible;
    }

    .tips-table-container:not(.half-table .tips-table-container) .tips-table thead {
        display: none;
    }

    .tips-table-container:not(.half-table .tips-table-container) .tips-table,
    .tips-table-container:not(.half-table .tips-table-container) .tips-table tbody,
    .tips-table-container:not(.half-table .tips-table-container) .tips-table tr {
        display: block;
        width: 100%;
    }

    .tips-table-container:not(.half-table .tips-table-container) .tips-table tr {
        background: white;
        border: 2px solid #e9ecef;
        border-radius: 10px;
        margin-bottom: 12px;
        padding: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 8px 12px;
    }

    .tips-table-container:not(.half-table .tips-table-container) .tips-table tr:hover {
        background: white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transform: none;
    }

    .tips-table-container:not(.half-table .tips-table-container) .tips-table td {
        padding: 0;
        border: none;
        display: flex;
        flex-direction: column;
        gap: 3px;
        font-size: 13px;
    }

    .tips-table-container:not(.half-table .tips-table-container) .tips-table td.match-name {
        grid-column: 1 / -1;
        font-weight: 700;
        font-size: 14px;
        color: #1f2937;
        padding-bottom: 8px;
        border-bottom: 2px solid #f0f0f0;
    }

    .tips-table-container:not(.half-table .tips-table-container) .tips-table td.league-name {
        grid-column: 1;
        font-size: 12px;
        color: #6c757d;
    }

    .tips-table-container:not(.half-table .tips-table-container) .tips-table td.prediction {
        grid-column: 2;
        font-weight: 700;
        font-size: 13px;
        color: #ff0000;
        text-align: right;
    }

    .tips-table-container:not(.half-table .tips-table-container) .tips-table td:nth-child(4) {
        grid-column: 1;
        color: #28a745;
        font-weight: 700;
        font-size: 15px;
    }

    .tips-table-container:not(.half-table .tips-table-container) .tips-table td:nth-child(5) {
        grid-column: 2;
        justify-self: end;
    }

    .tips-table-container:not(.half-table .tips-table-container) .tips-table td:nth-child(6) {
        grid-column: 1 / -1;
        color: #6c757d;
        font-size: 12px;
        padding-top: 6px;
        border-top: 1px solid #f0f0f0;
    }

    .tips-table-container:not(.half-table .tips-table-container) .tips-table td::before {
        content: attr(data-label);
        font-size: 10px;
        font-weight: 600;
        color: #999;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .tips-table-container:not(.half-table .tips-table-container) .tips-table td.match-name::before {
        content: '⚽ MATCH';
    }

    .tips-table-container:not(.half-table .tips-table-container) .tips-table td.league-name::before {
        content: '🏆 LEAGUE';
    }

    .tips-table-container:not(.half-table .tips-table-container) .tips-table td.prediction::before {
        content: '🎯 TIP';
    }

    .tips-table-container:not(.half-table .tips-table-container) .tips-table td:nth-child(4)::before {
        content: '📊 ODDS';
    }

    .tips-table-container:not(.half-table .tips-table-container) .tips-table td:nth-child(5)::before {
        content: '🕐 TIME';
    }

    .tips-table-container:not(.half-table .tips-table-container) .tips-table td:nth-child(6)::before {
        content: '📅 DATE';
    }

    .time-badge {
        background: #e3f2fd;
        border-color: #90caf9;
        padding: 4px 8px;
        font-size: 11px;
        width: fit-content;
    }

    .time-badge i {
        font-size: 10px;
    }

    /* ==========================================
       HALF-TABLES - COMPACT CARD VIEW ON MOBILE
       4-column tables get simplified card layout
       ========================================== */
    .half-table .tips-table-container {
        overflow-x: visible;
    }
    
    .half-table .tips-table thead {
        display: none;
    }
    
    .half-table .tips-table,
    .half-table .tips-table tbody,
    .half-table .tips-table tr {
        display: block;
        width: 100%;
    }
    
    .half-table .tips-table tr {
        background: white;
        border: 2px solid #e9ecef;
        border-radius: 8px;
        margin-bottom: 10px;
        padding: 10px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    }
    
    .half-table .tips-table td {
        display: block;
        padding: 6px 0;
        border: none;
        font-size: 13px;
        text-align: left;
    }
    
    .half-table .tips-table td:first-child {
        font-weight: 700;
        color: #1f2937;
        font-size: 14px;
        margin-bottom: 5px;
        padding-bottom: 8px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .half-table .tips-table td:nth-child(2) {
        color: #6c757d;
        font-size: 12px;
    }
    
    .half-table .tips-table td:nth-child(3),
    .half-table .tips-table td:nth-child(4) {
        display: inline-block;
        margin-right: 15px;
    }
    
    .half-table .tips-table td::before {
        content: attr(data-label);
        font-size: 10px;
        font-weight: 600;
        color: #999;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-right: 8px;
    }

    /* Empty state - FORCE center on mobile */
    .empty-state {
        padding: 40px 15px;
        text-align: center;
        margin: 0 auto;
    }

    .empty-state i {
        font-size: 48px;
        margin: 0 auto 20px;
        display: block;
    }

    .empty-state h3 {
        font-size: 18px;
        text-align: center;
    }

    .empty-state p {
        font-size: 14px;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .free-tips-wrapper {
        padding: 0 10px;
    }
    
    .tips-banner {
        padding: 35px 20px;
    }
    
    /* Keep stats grid 2 per row */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-card {
        padding: 20px 15px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .search-buttons {
        flex-direction: column;
    }
    
    .search-btn {
        width: 100%;
    }
}