:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --background-color: #f8fafc;
    --card-background: #ffffff;
    --text-color: #1e293b;
    --border-color: #e2e8f0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    font-size: 12px;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem;
}

header {
    text-align: center;
    display: flex;
    justify-content: start;
    align-items: center;
}

h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0 20px 0 0;
}

.config-section {
    background: var(--card-background);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 250px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

input[type="text"] {
    width: 94%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 12px;
    transition: border-color 0.2s;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    width: 100%;
}

.primary-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.secondary-btn {
    background-color: #e2e8f0;
    color: #475569;
}

.secondary-btn:hover {
    background-color: #cbd5e1;
}

.action-section {
    text-align: center;
    margin-bottom: 1rem;
}

.hidden {
    display: none;
}

/* Loading Spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 1rem auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Table Styles */
.table-wrapper {
    overflow: auto;
    max-height: 75vh;
    background: var(--card-background);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
    table-layout: fixed;
}

th,
td {
    padding: 0.4rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th:first-child,
td:first-child {
    white-space: nowrap;
    width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

th {
    background-color: #f1f5f9;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

tr:hover {
    background-color: #f8fafc;
}

.rank-cell {
    font-weight: bold;
    text-align: center;
}

.rank-top {
    color: #16a34a;
    /* Green for good rank */
}

.rank-low {
    color: #dc2626;
    /* Red for low rank */
}