:root {
    --bg-color: #f2f2f2;
    --text-color: #333;
    --header-border: #bababa;
    --card-bg: #ffffff;
    --card-text: #202020;
    --current-temp-color: #222;
    --offline-bg: #ffebee;
    --source-color: #888;
    --icon-label-color: #555;
    --forecast-border: #ddd;
    --skeleton-base: #eee;
    --skeleton-highlight: #ddd;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --header-border: #606060;
    --card-bg: #424242;
    --card-text: #f5f5f5;
    --current-temp-color: #ffffff;
    --offline-bg: #3d1a1a;
    --source-color: #aaa;
    --icon-label-color: #ccc;
    --forecast-border: #555;
    --skeleton-base: #2a2a2a;
    --skeleton-highlight: #3a3a3a;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
    transition: background-color 0.3s, color 0.3s;
}

#header-banner {
    width: 100%;
    aspect-ratio: 8 / 1; /* Breite zu Höhe */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    max-height: 50px; /* optional: verhindert, dass es zu groß wird */
}

@media (max-width: 600px) {
    #header-banner {
        aspect-ratio: 3 / 1; /* Media Query für kleine Geräte - Etwas höher für Mobilgeräte */
    }
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--header-border);
    flex-wrap: wrap;
}

.header-left,
.header-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-container {
    flex: 1;
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

#search-location {
    max-width: 180px;
    width: 100%;
    padding: 6px 10px;
    border-radius: 20px;
    border: 1px solid var(--header-border);
    font-size: 0.75em;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: all 0.3s ease;
}

.current-weather-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
}

.current-temp {
    font-size: 3.2em;
    font-weight: bold;
    color: var(--current-temp-color);
    margin: 0;
}

#condition-icon-container img {
    width: 96px !important;
    height: 96px !important;
}

.current-condition {
    font-size: 1.5em;
    margin: 5px 0 20px;
    color: var(--text-color);
    text-align: center;
}

[data-theme="dark"] .dropdown-menu {
    background-color: #424242;
}

button {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px 10px;
    color: var(--text-color);
    transition: color 0.3s;
}

#dark-mode {
    font-size: 1.3em;
}

.settings-container {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: var(--card-bg);
    min-width: 60px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 8px;
    overflow: hidden;
    left: 0;
    top: 100%;
}

.dropdown-item {
    color: var(--card-text);
    padding: 10px 14px;
    display: block;
    cursor: pointer;
    transition: background-color 0.2s;
}

.dropdown-item:hover,
.dropdown-item.active {
    background-color: var(--header-border);
    font-weight: bold;
}

.settings-container:hover .dropdown-menu {
    display: block;
}

#date, #timestamp {
    color: var(--text-color);
}

#timestamp {
    font-size: 0.6em;
    margin-bottom: 15px;
    opacity: 0.8;
}

.hourly-forecast {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.hour-card {
    background: var(--card-bg);
    color: var(--card-text);
    border-radius: 12px;
    padding: 15px;
    width: 120px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: background-color 0.3s;
}

#offline-notice {
    color: #d32f2f;
    margin-top: 20px;
    font-weight: bold;
    display: none;
    background: var(--offline-bg);
    padding: 10px;
    border-radius: 5px;
}

.data-source {
    font-size: 0.8em;
    color: var(--source-color);
    text-align: center;
    margin-top: 40px;
    padding: 10px;
    border-top: 1px solid var(--header-border);
}

/* Info-Card */
.info-card {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 8px;
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 12px;
    margin: 16px 0;
    font-size: 12px;
    color: var(--card-text);
}
.info-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.info-item img {
    width: 16px;
    height: 16px;
}

/* AQI Card Styles */
.aqi-container {
    margin: 30px 0;
    width: 100%;
}

.aqi-card {
    border-radius: 12px;
    padding: 15px;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.aqi-card,
.aqi-card * {
    color: inherit !important;
}

.aqi-value {
    font-size: 2.8em;
    font-weight: bold;
    margin: 10px 0;
}

.aqi-label {
    font-size: 1.2em;
    margin-bottom: 5px;
    font-weight: 500;
}

.aqi-desc {
    font-size: 1em;
    margin: 5px 0;
    font-weight: bold;
}

.aqi-time {
    font-size: 0.7em;
    opacity: 0.9;
    margin-top: 10px;
}

.aqi-index-label {
    font-size: 0.5em;
    margin-top: 1px;
}

.aqi-source {
    font-size: 0.1em;
    margin-top: 1px;
    font-style: italic;
}

/* Skelett-Ladeanimationen */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--skeleton-base) 25%,
        var(--skeleton-highlight) 37%,
        var(--skeleton-base) 63%
    );
    background-size: 400% 100%;
    animation: skeleton-loading 1.4s ease-in-out infinite;
    border-radius: 4px;
    color: transparent !important;
    position: relative;
    overflow: hidden;
}

@keyframes skeleton-loading {
    0% { background-position: 100% 50%; }
    100% { background-position: -100% 50%; }
}

@media (max-width: 500px) {
    body {
        padding: 15px;
    }
    .hour-card {
        width: 70px;
        padding: 12px;
    }
}

.ten-day-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.forecast-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background-color: var(--card-bg);
    color: var(--card-text);
    border-radius: 10px;
    border: 0px solid var(--forecast-border);
    transition: background-color 0.3s;
}

.forecast-date {
    flex: 1.2;
    text-align: left;
}

.forecast-temp {
    flex: 1;
    font-weight: bold;
    text-align: center;
}

.forecast-condition {
    flex: 1.5;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.forecast-condition img {
    width: 24px;
    height: 24px;
}