body {
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    overflow: hidden;
}

#sidebar {
    width: 320px;
    padding: 20px;
    background: #ffffff;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow-y: auto;
    flex-shrink: 0;
}

#map {
    flex-grow: 1;
    height: 100%;
    position: relative;
    z-index: 1;
}

h2 {
    margin-top: 0;
    color: #333;
    font-weight: 700;
}

h4 {
    margin-bottom: 8px;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
}

.control-group {
    margin-bottom: 24px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9em;
}

select,
button {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-size: 1em;
}

button {
    background: #f0f0f0;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

button:hover {
    background: #e0e0e0;
}

#engine-status {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.status-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8em;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    transition: background 0.3s;
}

.status-dot.up   { background: #28a745; }
.status-dot.down { background: #dc3545; }

#results {
    margin-top: 10px;
}

.result-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s;
    cursor: pointer;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.result-card.error {
    background: #fff5f5;
    border-color: #feb2b2;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.engine-name {
    font-weight: 700;
    font-size: 1.1em;
}

.rank {
    font-size: 0.8em;
    background: #eee;
    padding: 2px 6px;
    border-radius: 10px;
    color: #666;
}

.result-stats {
    display: flex;
    gap: 15px;
    font-size: 0.95em;
}

.result-stats strong {
    font-size: 1.2em;
}

.instructions-preview {
    border-top: 1px solid #f0f0f0;
    margin-top: 12px;
    padding-top: 8px;
    color: #555;
    animation: fadeIn 0.3s ease;
}

.instructions-preview ol {
    padding-left: 20px;
    margin: 5px 0;
}

.instructions-preview li {
    margin-bottom: 4px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
