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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    background: #2c3e50;
    color: white;
    padding: 1rem 1.5rem;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

header p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

#map {
    flex: 1;
    min-height: 400px;
    background: #e8e8e8;
}

#sidebar {
    width: 320px;
    background: white;
    padding: 1.5rem;
    border-left: 1px solid #ddd;
    overflow-y: auto;
}

#sidebar h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

dt {
    font-size: 0.85rem;
    color: #666;
}

dd {
    font-size: 1rem;
    font-weight: 600;
    text-align: right;
}

#score {
    font-size: 1.5rem;
    color: #27ae60;
}

#score.low {
    color: #e74c3c;
}

#score.medium {
    color: #f39c12;
}

#score.high {
    color: #27ae60;
}

#placeholder {
    color: #666;
}

#placeholder p {
    margin-bottom: 1rem;
}

.hint {
    font-size: 0.85rem;
    color: #999;
}

.hidden {
    display: none !important;
}

#error .error-message {
    color: #e74c3c;
    background: #fdecea;
    padding: 1rem;
    border-radius: 4px;
}

#loading {
    color: #666;
    font-style: italic;
}

footer {
    background: #ecf0f1;
    padding: 0.75rem 1.5rem;
    font-size: 0.8rem;
    color: #666;
    border-top: 1px solid #ddd;
}

/* Score bar visualization */
.score-bar {
    height: 8px;
    background: #eee;
    border-radius: 4px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Wind rose */
.wind-rose {
    background: white;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    text-align: center;
}

.wind-rose h4 {
    margin: 0 0 2px 0;
    font-size: 12px;
    color: #333;
}

.wind-rose .subtitle {
    margin: 0 0 6px 0;
    font-size: 10px;
    color: #666;
}

.wind-rose svg {
    display: block;
    margin: 0 auto;
}

/* Legend */
.legend {
    background: white;
    padding: 10px 14px;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    font-size: 12px;
    line-height: 1.6;
}

.legend h4 {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #333;
}

.legend div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend span {
    display: inline-block;
    width: 18px;
    height: 12px;
    border-radius: 2px;
}

/* Tooltip */
.score-tooltip {
    background: rgba(44, 62, 80, 0.9);
    border: none;
    border-radius: 3px;
    color: white;
    font-weight: 600;
    padding: 4px 8px;
}

.score-tooltip::before {
    border-top-color: rgba(44, 62, 80, 0.9);
}

.shadow-tooltip {
    background: rgba(41, 128, 185, 0.9);
    border: none;
    border-radius: 3px;
    color: white;
    font-size: 11px;
    padding: 4px 8px;
}

/* Responsive */
@media (max-width: 768px) {
    main {
        flex-direction: column;
    }

    #sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid #ddd;
    }

    #map {
        height: 50vh;
    }
}
