:root {
    --primary-color: #ffffff;
    --text-color: #e2e8f0;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

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

body {
    font-family: 'Outfit', sans-serif;
    color: var(--primary-color);
    min-height: 100vh;
    overflow-x: hidden;
    background: linear-gradient(45deg, #1e3c72, #2a5298);
}

/* Split Background System */
.background-half {
    position: fixed;
    top: 0;
    width: 50vw;
    height: 100vh;
    z-index: -2;
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    transition: background-image 1s ease;
    background-image: linear-gradient(45deg, #1e3c72, #2a5298); /* Default */
}
.background-half.left { left: 0; }
.background-half.right { right: 0; }

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

/* Weather Effects System */
.weather-effects-half {
    position: fixed;
    top: 0;
    width: 50vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}
.weather-effects-half.left { left: 0; }
.weather-effects-half.right { right: 0; }

.raindrop {
    position: absolute;
    width: 2px;
    height: 80px;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.8));
    animation: rainDrop linear infinite;
}
@keyframes rainDrop {
    0% { transform: translateY(-100px); opacity: 0; }
    20% { opacity: 1; }
    100% { transform: translateY(100vh); opacity: 0; }
}

.snowflake {
    position: absolute;
    background: #ffffff;
    border-radius: 50%;
    filter: blur(1px);
    animation: snowFall linear infinite;
}
@keyframes snowFall {
    0% { transform: translateY(-20px) translateX(0) scale(0); opacity: 0; }
    20% { opacity: 1; transform: translateY(20vh) translateX(10px) scale(1); }
    100% { transform: translateY(100vh) translateX(-20px) scale(1); opacity: 0; }
}

.sun-ray {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200vw;
    height: 200vw;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 50%);
    transform-origin: center;
    margin-left: -100vw;
    margin-top: -100vw;
    animation: rotateSun 40s linear infinite;
}
@keyframes rotateSun {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 1s ease;
}

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

header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Glassmorphism Utilities */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    padding: 2.5rem;
}

/* Search Section */
.search-section {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeIn 1s ease 0.5s both;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.search-box {
    flex: 1;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.search-box h2 {
    font-size: 1.6rem;
    font-weight: 600;
}

input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    border-radius: 50px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 1.1rem;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

input:focus {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

button {
    padding: 1.2rem 2rem;
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

button:active {
    transform: translateY(1px);
}

/* Weather Results */
.weather-results {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeIn 0.8s ease;
}

.weather-card {
    flex: 1;
    min-width: 320px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.weather-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px 0 rgba(31, 38, 135, 0.5);
}

.card-header h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem; /* This margin is overridden inline locally now */
}

/* UI Badge für Entfernungen (bessere Lesbarkeit) */
.distance-badge {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.weather-icon {
    font-size: 6rem;
    margin-bottom: 1rem;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.temperature {
    font-size: 5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.condition {
    font-size: 1.5rem;
    opacity: 0.9;
}

/* Hourly Forecast Container */
.hourly-forecast-container {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: left;
    animation: fadeIn 0.8s ease;
}

.hourly-forecast-container h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    opacity: 0.9;
}

/* Forecast Comparison */
.forecast-comparison {
    text-align: center;
    animation: fadeIn 0.8s ease;
}

.forecast-comparison h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

#comparison-result {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    font-weight: 300;
}

.timeline {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding-bottom: 1rem;
    scroll-behavior: smooth;
}

.timeline::-webkit-scrollbar {
    height: 10px;
}

.timeline::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.timeline::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 5px;
}

/* Timeline Item (to be injected by JS) */
.timeline-item {
    min-width: 150px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    padding: 1.5rem 1rem;
    text-align: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.timeline-item:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.25);
}

.timeline-item.match {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.6) 0%, rgba(118, 75, 162, 0.6) 100%);
    border: 1px solid var(--primary-color);
    transform: scale(1.05);
}

.timeline-time {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-icon {
    font-size: 2.5rem;
    margin: 1rem 0;
}

.timeline-temp {
    font-size: 1.4rem;
    font-weight: 700;
}
