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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0f1b2e;
    color: #e0e6ed;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

header {
    text-align: center;
    padding: 20px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
}

h1 {
    font-size: 2.5rem;
    color: #5b9bd5;
    margin-bottom: 5px;
}

.subtitle {
    color: #a0aec0;
    font-size: 1.1rem;
}

.region-selector {
    margin-top: 15px;
    margin-bottom: 0px;
}

.region-selector label {
    display: block;
    margin-bottom: 8px;
    color: #a0aec0;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#regionSelect {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(91, 155, 213, 0.3);
    border-radius: 8px;
    color: #e0e6ed;
    cursor: pointer;
    transition: all 0.2s;
}

#regionSelect:hover {
    border-color: rgba(91, 155, 213, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

#regionSelect:focus {
    outline: none;
    border-color: #5b9bd5;
    background: rgba(255, 255, 255, 0.15);
}

#regionSelect option {
    background: #1a2942;
    color: #e0e6ed;
    padding: 8px;
}

.last-update {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #718096;
}

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

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 5px;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #5b9bd5;
    margin-bottom: 0px;
}

.stat-label {
    color: #a0aec0;
    font-size: 0.9rem;
}

.search-container {
    margin-bottom: 15px;
}

#searchInput {
    width: 100%;
    padding: 15px 20px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #e0e6ed;
    backdrop-filter: blur(10px);
}

#searchInput::placeholder {
    color: #718096;
}

#searchInput:focus {
    outline: none;
    border-color: #5b9bd5;
}

.table-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: visible;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    overflow: visible;
    border-radius: 12px;
    table-layout: auto;
}

th, td {
    width: auto;
    white-space: nowrap;
}

th:nth-child(2), td:nth-child(2) {
    width: auto;
    min-width: 150px;
}

thead {
    background: rgba(91, 155, 213, 0.1);
    position: relative;
    z-index: 10;
}

th {
    padding: 8px 12px;
    text-align: center;
    font-weight: 600;
    color: #5b9bd5;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: visible;
}

th:first-child,
th:nth-child(2) {
    text-align: left;
}

th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

th.sortable:hover {
    background: rgba(91, 155, 213, 0.15);
}

th.sortable::after {
    content: '⇅';
    margin-left: 8px;
    opacity: 0.4;
}

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

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

tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.2s;
}

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

tbody tr:hover {
    background: rgba(91, 155, 213, 0.15);
}

td {
    padding: 2px 10px;
    color: #e0e6ed;
    text-align: center;
}

td:first-child,
td:nth-child(2) {
    text-align: left;
}

td a {
    color: #1670c2;
    text-decoration: none;
    transition: color 0.2s, text-decoration 0.2s;
}

td a:hover {
    color: #7eb3e6;
    text-decoration: underline;
}

.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
    margin-left: 4px;
    color: #a0aec0;
    font-size: 0.85rem;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 280px;
    background-color: #1a2942;
    color: #e0e6ed;
    text-align: left;
    border-radius: 8px;
    padding: 12px;
    position: absolute;
    z-index: 1000;
    bottom: 150%;
    left: 50%;
    margin-left: -140px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
    font-weight: normal;
    text-transform: none;
    letter-spacing: normal;
    border: 1px solid rgba(91, 155, 213, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    line-height: 1.4;
    white-space: normal;
    word-wrap: break-word;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1a2942 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-active {
    background: rgba(72, 187, 120, 0.2);
    color: #48bb78;
}

.status-inactive {
    background: rgba(229, 62, 62, 0.2);
    color: #e53e3e;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #718096;
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
    }

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

    #regionSelect {
        max-width: 100%;
    }

    .table-container {
        overflow-x: auto;
    }

    table {
        min-width: 800px;
    }
}

.selector-section {
    margin-bottom: 20px;
}

.selector-section label {
    display: block;
    margin-bottom: 12px;
    color: #a0aec0;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.button-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.season-grid .selector-button {
    padding: 12px 24px;
    font-size: 1rem;
    min-width: 150px;
}

.region-grid .selector-button {
    padding: 10px 16px;
    font-size: 0.9rem;
    min-width: 60px;
}

.selector-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(91, 155, 213, 0.3);
    border-radius: 8px;
    color: #e0e6ed;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    text-align: center;
}

.selector-button:hover {
    border-color: rgba(91, 155, 213, 0.3);
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.selector-button.active {
    background: rgbargba(91, 155, 213, 0.3);
    border-color: #5b9bd5;
    color: #5b9bd5;
}

@media (max-width: 768px) {
    .region-grid .selector-button {
        min-width: 50px;
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .season-grid .selector-button {
        min-width: 120px;
        padding: 10px 20px;
    }
}
