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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e6edf3;
    min-height: 100vh;
}

.dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #f9a825, #ff6f00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.header p {
    color: #8b949e;
}

/* Search Section */
.search-section, .ranking-section {
    background: #21262d;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #30363d;
}

.search-section h2, .ranking-section h2 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #f9a825;
}

.search-group, .ranking-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

input[type="text"], select {
    padding: 12px 16px;
    background: #0d1117;
    color: #e6edf3;
    border: 1px solid #30363d;
    border-radius: 8px;
    font-size: 0.95rem;
    flex: 1;
    min-width: 180px;
}

input[type="text"]:focus, select:focus {
    outline: none;
    border-color: #f9a825;
}

input[type="text"] {
    min-width: 250px;
}

button {
    padding: 12px 24px;
    background: #f9a825;
    color: #1a1a2e;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
}

button:hover {
    background: #fbc02d;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

/* Metrics */
.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: #21262d;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #30363d;
    transition: transform 0.2s, border-color 0.2s;
}

.metric-card:hover {
    transform: translateY(-2px);
    border-color: #f9a825;
}

.metric-card h3 {
    font-size: 0.8rem;
    color: #8b949e;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.metric-card p {
    font-size: 1.8rem;
    font-weight: bold;
    color: #f9a825;
}

/* Charts */
.charts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.chart-container {
    background: #21262d;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #30363d;
}

.chart-container.large {
    grid-column: span 2;
}

.chart-container h3 {
    font-size: 1rem;
    color: #e6edf3;
    margin-bottom: 15px;
}

canvas {
    max-height: 300px;
}

/* Table */
.table-section {
    background: #21262d;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #30363d;
    margin-bottom: 30px;
}

.table-section h2 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #f9a825;
}

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

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

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #30363d;
}

th {
    color: #8b949e;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:hover {
    background: rgba(249, 168, 37, 0.05);
}

td:first-child {
    color: #f9a825;
    font-weight: bold;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: #8b949e;
    font-size: 0.85rem;
}

.footer a {
    color: #f9a825;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Loading */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: #8b949e;
}

.loading.hidden {
    display: none;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(249, 168, 37, 0.2);
    border-top-color: #f9a825;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .charts {
        grid-template-columns: 1fr;
    }

    .chart-container.large {
        grid-column: span 1;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .metric-card p {
        font-size: 1.4rem;
    }

    .search-group, .ranking-filters {
        flex-direction: column;
    }

    input[type="text"], select, button {
        width: 100%;
    }
}
