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

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

:root {
    --primary: #20D6D1;
    --primary-dark: #0CA5A0;
    --secondary: #6366F1;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --dark: #0F172A;
    --light: #F8FAFC;
    --gold: #FFD700;
    --gold-dark: #FFA500;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #334155 100%);
    min-height: 100vh;
    padding: 0;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(32, 214, 209, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    margin: 20px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(32, 214, 209, 0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.header-logo {
    max-width: 350px;
    height: auto;
    margin-bottom: 30px;
    filter: drop-shadow(0 10px 30px rgba(32, 214, 209, 0.4));
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    animation: logoFloat 6s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.header-logo:hover {
    transform: scale(1.05) translateY(-5px);
    filter: drop-shadow(0 15px 40px rgba(32, 214, 209, 0.6));
    animation-play-state: paused;
}

header h1 {
    font-size: 56px;
    font-weight: 800;
    background: linear-gradient(135deg, #20D6D1 0%, #6366F1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    letter-spacing: -1px;
    position: relative;
    z-index: 1;
}

.subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    padding: 20px;
    margin: 0 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 36px 28px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card.success {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 165, 0, 0.2) 100%);
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.2);
}

.stat-card.success:hover {
    box-shadow: 0 20px 60px rgba(255, 215, 0, 0.4);
}

.stat-card.danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.2) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.2);
}

.stat-card.danger:hover {
    box-shadow: 0 20px 60px rgba(239, 68, 68, 0.4);
}

.stat-value {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #FFFFFF 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -2px;
}

.stat-card.success .stat-value {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card.danger .stat-value {
    background: linear-gradient(135deg, #FCA5A5 0%, #F87171 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.metric-selector-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    margin: 24px 20px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.metric-selector-section label {
    display: block;
    margin-bottom: 16px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    letter-spacing: 0.5px;
}

.metric-selector-section select {
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    font-size: 15px;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    min-width: 250px;
    cursor: pointer;
}

.metric-selector-section select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(32, 214, 209, 0.15);
}

.metric-selector-section select option {
    background: #1E293B;
    color: #FFFFFF;
}

.selected-metric-display {
    margin-top: 32px;
}

.metric-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.metric-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.metric-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.metric-item-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 12px;
}

.metric-item-value {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.filters-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    margin: 24px 20px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.filters-section h2 {
    margin-bottom: 28px;
    color: #FFFFFF;
    font-size: 28px;
    font-weight: 700;
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

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

.filter-group label {
    margin-bottom: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select,
.filter-group input {
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    font-size: 15px;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(32, 214, 209, 0.15);
}

.filter-group select option {
    background: #1E293B;
    color: #FFFFFF;
}

.btn-primary,
.btn-secondary {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(32, 214, 209, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(32, 214, 209, 0.5);
}

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

#refresh-btn {
    animation: refreshPulse 3s ease-in-out infinite;
}

@keyframes refreshPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(32, 214, 209, 0.3); }
    50% { box-shadow: 0 4px 30px rgba(32, 214, 209, 0.5); }
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.table-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    margin: 24px 20px 20px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: visible;
}

.table-section h2 {
    margin-bottom: 24px;
    color: #FFFFFF;
    font-size: 28px;
    font-weight: 700;
}

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

#results-count {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.2);
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

table {
    width: 100%;
    min-width: 1000px;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0 auto;
}

thead {
    background: rgba(255, 255, 255, 0.08);
}

th {
    padding: 18px 20px;
    text-align: left;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

td {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

tbody tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

tbody tr::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

tbody tr:hover {
    background: rgba(32, 214, 209, 0.08);
    transform: translateX(5px);
}

tbody tr:hover::before {
    opacity: 1;
}

tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

tbody tr:nth-child(even):hover {
    background: rgba(32, 214, 209, 0.08);
}

.loading {
    text-align: center;
    padding: 60px !important;
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
}

.outcome-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.outcome-won {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25) 0%, rgba(255, 165, 0, 0.25) 100%);
    color: var(--gold);
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
    transition: all 0.3s ease;
}

.outcome-won:hover {
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
}

.outcome-lost {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(220, 38, 38, 0.25) 100%);
    color: #FCA5A5;
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
    transition: all 0.3s ease;
}

.outcome-lost:hover {
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.4);
}

.outcome-pending {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.25) 100%);
    color: #FCD34D;
    border: 1px solid rgba(245, 158, 11, 0.3);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
    transition: all 0.3s ease;
}

.outcome-pending:hover {
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.4);
}

.sport-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    background: linear-gradient(135deg, rgba(32, 214, 209, 0.25) 0%, rgba(99, 102, 241, 0.25) 100%);
    color: #7DD3FC;
    font-weight: 700;
    border: 1px solid rgba(32, 214, 209, 0.3);
}

footer {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 32px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    margin: 20px;
    border-radius: 16px;
}

@media (max-width: 768px) {
    .header-logo {
        max-width: 250px;
    }

    header {
        padding: 40px 20px;
    }

    header h1 {
        font-size: 36px;
    }

    .stats-section,
    .filters-section,
    .table-section {
        padding: 24px;
        margin: 16px;
    }

    .filters {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 13px;
    }

    th, td {
        padding: 12px;
    }

    .stat-value {
        font-size: 36px;
    }
}

/* Smooth scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
}

/* Table wrapper specific scrollbar */
.table-wrapper::-webkit-scrollbar {
    height: 12px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0 0 16px 16px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.2);
}
