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

:root {
    --bg-color: #f1f5f9;
    --header-bg: #0f172a;
    --card-bg: #ffffff;
    --primary: #2563eb;
    --secondary: #64748b;
    --accent: #3b82f6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

header {
    background: var(--header-bg);
    color: white;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    position: relative;
    overflow: hidden;
}

header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
    text-transform: uppercase;
}

header p {
    color: #94a3b8;
    font-weight: 400;
}

.container {
    max-width: 1400px;
    margin: -2rem auto 3rem;
    padding: 0 1.5rem;
    position: relative;
    z-index: 10;
}

/* Tabs */
.tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    background: white;
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 6px -1px var(--primary);
}

/* Summary Cards */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.summary-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    transition: transform 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-5px);
}

.summary-card i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.summary-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.summary-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--header-bg);
    margin-top: 0.25rem;
}

/* Rank Section */
.ranks-section {
    margin-bottom: 3rem;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--header-bg);
}

.rank-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.rank-card {
    background: var(--card-bg);
    border-radius: 1rem;
    border: 1px solid var(--border);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.rank-badge {
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 800;
    font-size: 0.875rem;
}

.rank-symbol {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--header-bg);
}

.rank-score {
    font-size: 1.25rem;
    color: var(--text-muted);
}

.rank-score span {
    font-weight: 700;
    color: var(--primary);
}

/* Table Section */
.table-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

table.dataTable {
    width: 100% !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
}

table.dataTable thead th {
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    padding: 1rem !important;
    border-bottom: 1px solid var(--border) !important;
}

table.dataTable tbody td {
    padding: 1rem !important;
    border-bottom: 1px solid var(--border) !important;
    font-size: 0.875rem;
}

.puan-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.75rem;
}

.puan-high { background: #d1fae5; color: #065f46; }
.puan-med { background: #fef3c7; color: #92400e; }
.puan-low { background: #fee2e2; color: #991b1b; }

/* DataTables Styling Overrides */
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    margin-left: 0.5rem;
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--border);
    padding: 0.5rem;
    border-radius: 0.5rem;
}

footer {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header h1 { font-size: 1.5rem; }
    .container { margin-top: 1rem; }
}
