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

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 28px;
}

.controls {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-weight: bold;
    color: #2c3e50;
    font-size: 14px;
}

.filter-container {
    position: relative;
    min-width: 250px;
}

.filter-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.filter-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.filter-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    display: none;
}

.filter-options.visible {
    display: block;
}

.filter-option {
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.filter-option:hover {
    background-color: #ecf0f1;
}

.filter-option.selected {
    background-color: #e8f4f8;
    font-weight: bold;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background-color: #3498db;
    color: white;
    border-radius: 20px;
    font-size: 13px;
}

.filter-tag-remove {
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
}

.filter-tag-remove:hover {
    opacity: 0.7;
}

.loading-msg {
    text-align: center;
    padding: 20px;
    color: #3498db;
    font-size: 16px;
    font-weight: bold;
}

.counter-msg {
    text-align: center;
    padding: 15px;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    background-color: #ecf0f1;
    border-radius: 4px;
}

#tableContainer {
    overflow-x: auto;
    margin-bottom: 30px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead {
    background-color: #34495e;
    color: white;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: bold;
    border: 1px solid #2c3e50;
}

tbody tr {
    border-bottom: 1px solid #ddd;
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background-color: #ecf0f1;
}

td {
    padding: 12px 15px;
    border: 1px solid #ddd;
}

.row-number {
    text-align: center;
    font-weight: bold;
    color: #7f8c8d;
    width: 40px;
}

.sid-cell {
    font-weight: bold;
}

.sid-cell a {
    color: #2980b9;
    text-decoration: none;
}

.sid-cell a:hover {
    text-decoration: underline;
}

.place-link {
    color: #2980b9;
    text-decoration: none;
}

.place-link:hover {
    text-decoration: underline;
}

.sus-flags {
    text-align: center;
}

.flag-badge {
    display: inline-block;
    padding: 4px 8px;
    color: white;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

/* Different colors for different badge types */
.flag-badge.акф {
    background-color: #e74c3c; /* Red */
}

.flag-badge.акф_2021 {
    background-color: #c0392b; /* Dark Red */
}

.flag-badge.акф_стари {
    background-color: #d35400; /* Dark Orange */
}

.flag-badge.кс_топ50 {
    background-color: #3498db; /* Blue */
}

.flag-badge.махали {
    background-color: #f39c12; /* Orange */
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-link {
    display: inline-block;
    padding: 6px 12px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    transition: background-color 0.2s ease;
}

.action-link:hover {
    background-color: #2980b9;
}

.action-link.secondary {
    background-color: #95a5a6;
}

.action-link.secondary:hover {
    background-color: #7f8c8d;
}

#contact {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    color: #7f8c8d;
    font-size: 13px;
}

#contact a {
    color: #3498db;
    text-decoration: none;
}

#contact a:hover {
    text-decoration: underline;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 22px;
        margin-bottom: 20px;
    }

    table {
        font-size: 12px;
    }

    th, td {
        padding: 8px 10px;
    }
}
