:root {
    --primary-color: #646cff;
    --background-color: #242424;
    --text-color: rgba(255, 255, 255, 0.87);
}

body {
    font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    margin: 0;
    display: flex;
    place-items: center;
    min-width: 320px;
    min-height: 100vh;
    background-color: var(--background-color);
    color: var(--text-color);
}

#app {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

.weather-container {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.location-controls {
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.location-input {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.location-divider {
    font-size: 0.9em;
    opacity: 0.7;
    margin: 0.5rem 0;
}

input {
    padding: 0.6em 1.2em;
    font-size: 1em;
    border-radius: 8px;
    border: 1px solid transparent;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

button {
    border-radius: 8px;
    border: 1px solid transparent;
    padding: 0.6em 1.2em;
    font-size: 1em;
    font-weight: 500;
    font-family: inherit;
    background-color: var(--primary-color);
    cursor: pointer;
    transition: border-color 0.25s;
    color: white;
}

button:hover {
    border-color: #fff;
}

.location-btn {
    background-color: rgba(255, 255, 255, 0.1);
}

.location-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.weather-data {
    margin: 2rem 0;
    text-align: left;
}

.comfort-score {
    font-size: 2rem;
    margin: 2rem 0;
}

.data-row {
    display: flex;
    justify-content: space-between;
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.error-message {
    margin-top: 1rem;
    padding: 0.5rem;
    border: 1px solid red;
    background-color: #fdd; /* Light red background */
    border-radius: 4px;
}

.score-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.tooltip {
    visibility: hidden;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.9);
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 1rem;
    z-index: 1;
    max-width: 90vw;
    max-height: 80vh;
    overflow: auto;
    white-space: pre-wrap;
    font-size: 0.9rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
}

.tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
}

.score-container:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* Style for light mode */
@media (prefers-color-scheme: light) {
    .tooltip {
        background-color: rgba(50, 50, 50, 0.95);
        color: white;
    }
    
    .tooltip::after {
        border-color: rgba(50, 50, 50, 0.95) transparent transparent transparent;
    }
}


@media (prefers-color-scheme: light) {
    :root {
        --background-color: #ffffff;
        --text-color: #213547;
    }
    
    .weather-container {
        background: rgba(0, 0, 0, 0.05);
    }
    
    input {
        background-color: rgba(0, 0, 0, 0.05);
        color: var(--text-color);
    }

    .location-btn {
        background-color: rgba(0, 0, 0, 0.05);
    }

    .location-btn:hover {
        background-color: rgba(0, 0, 0, 0.1);
    }
}