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

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
            background: #f5f5f5;
            color: #333;
            line-height: 1.5;
        }

        .header {
            background: #2c3e50;
            color: white;
            padding: 25px;
            text-align: center;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .header h1 {
            font-size: 28px;
            margin-bottom: 5px;
            font-weight: 600;
        }

        .header p {
            font-size: 13px;
            opacity: 0.9;
        }

        .main-container {
            display: flex;
            max-width: 1600px;
            margin: 20px auto;
            gap: 20px;
            padding: 0 20px;
        }

        .filters-panel {
            width: 280px;
            background: white;
            border-radius: 6px;
            padding: 20px;
            box-shadow: 0 1px 4px rgba(0,0,0,0.08);
            height: fit-content;
            position: sticky;
            top: 20px;
        }

        .filter-section {
            margin-bottom: 22px;
        }

        .filter-section:last-child {
            margin-bottom: 0;
        }

        .filter-label {
            display: block;
            font-size: 12px;
            font-weight: 700;
            color: #2c3e50;
            margin-bottom: 8px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .filter-control {
            width: 100%;
            padding: 9px 12px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 13px;
            background: #fafafa;
            color: #333;
            transition: all 0.2s;
        }

        .filter-control:focus {
            outline: none;
            border-color: #2c3e50;
            background: white;
            box-shadow: 0 0 0 2px rgba(44,62,80,0.1);
        }

        .filter-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }

        .filter-row .filter-control {
            font-size: 12px;
            padding: 8px 10px;
        }

        .checkbox-group {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .checkbox-item {
            display: flex;
            align-items: center;
        }

        .checkbox-item input[type="checkbox"] {
            margin-right: 8px;
            width: 16px;
            height: 16px;
            cursor: pointer;
            accent-color: #2c3e50;
        }

        .checkbox-item label {
            font-size: 13px;
            cursor: pointer;
            user-select: none;
        }

        .btn-group {
            display: flex;
            gap: 10px;
            margin-top: 20px;
            padding-top: 20px;
            border-top: 1px solid #eee;
        }

        button {
            flex: 1;
            padding: 10px;
            border: none;
            border-radius: 4px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .btn-primary {
            background: #2c3e50;
            color: white;
        }

        .btn-primary:hover {
            background: #1a252f;
        }

        .btn-secondary {
            background: #ecf0f1;
            color: #2c3e50;
        }

        .btn-secondary:hover {
            background: #dde1e6;
        }

        .content {
            flex: 1;
            min-width: 0;
        }

        .status-bar {
            background: white;
            padding: 15px 20px;
            border-radius: 6px;
            margin-bottom: 20px;
            display: none;
            align-items: center;
            gap: 12px;
            font-size: 13px;
            box-shadow: 0 1px 4px rgba(0,0,0,0.08);
        }

        .status-bar.success {
            display: flex;
            background: #d4edda;
            color: #155724;
            border-left: 4px solid #28a745;
        }

        .status-bar.error {
            display: flex;
            background: #f8d7da;
            color: #721c24;
            border-left: 4px solid #dc3545;
        }

        .status-bar.info {
            display: flex;
            background: #eef2f5;
            color: #34495e;
            border-left: 4px solid #95a5a6;
        }

        .stats-row {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 15px;
            margin-bottom: 20px;
        }

        .stat-box {
            background: white;
            padding: 15px;
            border-radius: 6px;
            box-shadow: 0 1px 4px rgba(0,0,0,0.08);
        }

        .stat-label {
            font-size: 11px;
            font-weight: 700;
            color: #7f8c8d;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 8px;
        }

        .stat-value {
            font-size: 24px;
            font-weight: 600;
            color: #2c3e50;
        }

        .table-wrapper {
            background: white;
            border-radius: 6px;
            box-shadow: 0 1px 4px rgba(0,0,0,0.08);
            overflow: hidden;
        }

        .table-header {
            padding: 15px 20px;
            background: #f8f9fa;
            border-bottom: 1px solid #e0e0e0;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 12px;
            font-weight: 700;
            color: #7f8c8d;
        }

        .pager {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 16px;
            background: #fbfbfb;
            border-bottom: 1px solid #e0e0e0;
            gap: 12px;
            flex-wrap: wrap;
        }

        .pager .page-buttons {
            display: flex;
            gap: 6px;
        }

        .pager button {
            padding: 6px 10px;
            font-size: 12px;
            background: #ecf0f1;
            color: #2c3e50;
            border-radius: 4px;
            border: 1px solid #d7dcdf;
            cursor: pointer;
        }

        .pager button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .pager .page-info {
            font-size: 12px;
            color: #7f8c8d;
        }

        .pager .page-size {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
        }

        .table-scroll {
            overflow-x: auto;
            overflow-y: visible;
        }

        table {
            width: 120%;
            border-collapse: collapse;
            font-size: 13px;
        }

        thead {
            background: #f8f9fa;
            position: sticky;
            top: 0;
            z-index: 10;
        }

        th {
            padding: 12px 15px;
            text-align: left;
            font-weight: 700;
            color: #2c3e50;
            border-bottom: 1px solid #e0e0e0;
            white-space: nowrap;
            cursor: pointer;
            user-select: none;
            transition: background 0.2s;
        }

        th:hover {
            background: #ecf0f1;
        }

        th.sortable::after {
            content: ' ⇅';
            opacity: 0.35;
            font-size: 11px;
        }

        th.sorted-asc::after {
            content: ' ↑';
            opacity: 1;
        }

        th.sorted-desc::after {
            content: ' ↓';
            opacity: 1;
        }

        td {
            padding: 12px 15px;
            border-bottom: 1px solid #f0f0f0;
        }

        tbody tr:nth-child(even) {
            background: #fcfcfc;
        }

        tbody tr:hover {
            background: #f3f6f8;
        }

        .player-name {
            font-weight: 600;
            color: #2c3e50;
            min-width: 120px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .player-name:hover {
            color: #3498db;
            text-decoration: underline;
        }

        .event-cell {
            cursor: default;
        }

        .league-logo {
            text-align: center;
            width: 42px;
        }

        .league-logo img {
            width: 26px;
            height: 26px;
            object-fit: contain;
            filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
        }

        .modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }

        .modal-content {
            background: white;
            padding: 30px;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            max-width: 400px;
            width: 90%;
            position: relative;
        }

        .close-btn {
            position: absolute;
            top: 15px;
            right: 20px;
            font-size: 28px;
            font-weight: bold;
            color: #7f8c8d;
            cursor: pointer;
            transition: all 0.2s;
        }

        .close-btn:hover {
            color: #2c3e50;
        }

        .modal-content h2 {
            margin-bottom: 25px;
            color: #2c3e50;
            font-size: 20px;
        }

        .modal-stats {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .stat-line {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px;
            background: #f8f9fa;
            border-radius: 4px;
            border-left: 4px solid #3498db;
        }

        .stat-line .stat-label {
            font-weight: 600;
            color: #2c3e50;
            font-size: 13px;
        }

        .stat-line span:last-child {
            font-weight: 600;
            color: #27ae60;
            font-size: 14px;
        }

        .event {
            color: #7f8c8d;
            font-size: 12px;
            min-width: 140px;
        }

        .soglia {
            text-align: center;
            color: #2c3e50;
            font-weight: 600;
            min-width: 60px;
        }

        .quote {
            text-align: center;
            font-weight: 600;
            min-width: 60px;
            padding: 8px 6px;
        }

        .quote.best {
            background: #d4edda;
            color: #155724;
        }

        .quote.empty {
            color: #bdc3c7;
            font-weight: normal;
        }

        .difference {
            text-align: center;
            font-weight: 600;
            color: #dc3545;
            min-width: 70px;
        }

        .surebet {
            text-align: center;
            font-weight: 700;
            min-width: 70px;
        }
        .surebet.yes {
            color: #155724;
        }
        .surebet.no {
            color: #c0392b;
        }

        .no-data {
            text-align: center;
            padding: 60px 20px;
            color: #7f8c8d;
        }

        .no-data p {
            font-size: 14px;
            margin-bottom: 8px;
        }

        .no-data small {
            font-size: 12px;
            color: #bdc3c7;
        }

        .best{
            background:#d4edda;
            color:#155724;
            padding:2px 6px;
            border-radius:4px;
            font-weight:700;
            }

        @media (max-width: 1000px) {
            .main-container {
                flex-direction: column;
            }

            .filters-panel {
                width: 100%;
                position: static;
            }

            .filter-row {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 600px) {
            .header h1 {
                font-size: 20px;
            }

            .stats-row {
                grid-template-columns: repeat(2, 1fr);
            }

            table {
                font-size: 12px;
            }

            th, td {
                padding: 10px 8px;
            }
        }

