:root {
    --primary-color: #0056b3;
    --secondary-color: #f4f6f9;
    --text-color: #333;
    --border-color: #eee;
    --white: #fff;
    --font-main: 'Inter', sans-serif;
    --top1-bg: #fff9e6;
    --top2-bg: #f2f2f2;
    --top3-bg: #fdf2f2;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    margin-bottom: 30px;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

nav a {
    margin-left: 20px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
}

nav a:hover {
    color: var(--primary-color);
}

/* Filters */
.filters {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.filters h1 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
}

#filterForm {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 0.9rem;
}

select,
button,
.btn-secondary {
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
}

/* Modern Button Styles */
.btn-primary,
.btn-secondary,
.btn-delete {
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #0056b3 0%, #004494 100%);
    color: var(--white);
    box-shadow: 0 4px 6px rgba(0, 86, 179, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 86, 179, 0.4);
    background: linear-gradient(135deg, #0069d9 0%, #0056b3 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: var(--white);
    box-shadow: 0 4px 6px rgba(108, 117, 125, 0.3);
    margin-left: 10px;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(108, 117, 125, 0.4);
    background: linear-gradient(135deg, #7e858c 0%, #6c757d 100%);
}

.btn-edit {
    background: linear-gradient(135deg, #398E3D 0%, #2d7230 100%);
    color: white;
    padding: 6px 12px;
    font-size: 0.9rem;
    box-shadow: 0 4px 6px rgba(57, 142, 61, 0.3);
}

.btn-edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgb(226 226 226);
    background: #07274b;
}

.btn-delete {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: var(--white);
    padding: 6px 12px;
    font-size: 0.9rem;
    box-shadow: 0 4px 6px rgba(220, 53, 69, 0.3);
}

.btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(220, 53, 69, 0.4);
    background: linear-gradient(135deg, #e4606d 0%, #dc3545 100%);
}

/* Table */
.ranking-table-container {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
}

.ranking-table th,
.ranking-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

/* Actions Column Layout */
.ranking-table td:last-child {
    white-space: nowrap;
    display: flex;
    gap: 10px;
    align-items: center;
}

.ranking-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.ranking-table tr:hover {
    background: #f9f9f9;
}

/* Top 3 Highlighting */
.top1 {
    background-color: var(--top1-bg) !important;
    font-weight: bold;
}

.top2 {
    background-color: var(--top2-bg) !important;
    font-weight: bold;
}

.top3 {
    background-color: var(--top3-bg) !important;
    font-weight: bold;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    color: #666;
    font-size: 0.9rem;
}

/* Responsiveness */
@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        gap: 10px;
    }

    #filterForm {
        flex-direction: column;
        align-items: stretch;
    }

    .ranking-table thead {
        display: none;
    }

    .ranking-table,
    .ranking-table tbody,
    .ranking-table tr,
    .ranking-table td {
        display: block;
        width: 100%;
    }

    .ranking-table tr {
        margin-bottom: 15px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 15px;
    }

    .ranking-table td {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px solid #eee;
    }

    .ranking-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #555;
    }

    .ranking-table td:last-child {
        border-bottom: none;
    }
}