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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}

header {
    text-align: center;
    margin-bottom: 30px;
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

h1 {
    color: #0066cc;
    font-size: 32px;
    margin-bottom: 10px;
    font-weight: 600;
}

.subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 5px;
}

.note {
    font-style: italic;
    color: #888;
    font-size: 14px;
    margin-bottom: 10px;
}

.stats {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    font-size: 14px;
    color: #666;
}

.search-container {
    margin-bottom: 30px;
}

.search-panel {
    background-color: white;
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.search-panel h2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    font-size: 18px;
    text-align: center;
    margin: 0;
}

.search-form {
    padding: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

label {
    font-weight: 600;
    color: #444;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

select {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s;
}

select:hover {
    border-color: #667eea;
}

select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.help-text {
    font-size: 12px;
    color: #888;
    font-style: italic;
}

.button-row {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.search-btn, .clear-btn {
    padding: 12px 35px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.clear-btn {
    background-color: #f0f0f0;
    color: #666;
}

.clear-btn:hover {
    background-color: #e0e0e0;
}

.search-btn:active, .clear-btn:active {
    transform: translateY(0);
}

.search-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.results-container {
    background-color: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-height: 200px;
}

#resultsHeader {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

#resultsHeader h3 {
    color: #333;
    font-size: 22px;
    margin-bottom: 5px;
    font-weight: 600;
}

#resultCount {
    color: #666;
    font-size: 15px;
}

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

thead {
    background-color: #f8f9fa;
}

th {
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid #dee2e6;
    color: #495057;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    font-size: 15px;
}

tbody tr {
    transition: background-color 0.2s;
}

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

.view-link {
    display: inline-block;
    padding: 5px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
    text-align: center;
}

.view-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

#noResults, #initialMessage {
    text-align: center;
    padding: 40px;
    color: #666;
}

.hint {
    margin-top: 10px;
    font-size: 14px;
    color: #888;
}

footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 15px;
    margin-top: auto;
    font-size: 14px;
}

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

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

#serverStatus {
    font-weight: bold;
}

#serverStatus.online {
    color: #2ecc71;
}

#serverStatus.offline {
    color: #e74c3c;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .button-row {
        flex-direction: column;
    }
    
    .search-btn, .clear-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    th, td {
        padding: 8px;
        font-size: 13px;
    }
    
    .view-link {
        padding: 4px 10px;
        font-size: 12px;
    }
}
