* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

#top {
    scroll-margin-top: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeIn 0.5s ease-in;
    position: relative;
}

.help-button {
    position: absolute;
    top: 10px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.help-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.location-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.location-selector label {
    font-size: 1.1em;
}

.location-selector select {
    padding: 10px 20px;
    font-size: 1em;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.location-selector select option {
    background: #667eea;
    color: #fff;
}

/* Section Navigation */
.section-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 20px 0 30px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.nav-link {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-link:active {
    transform: translateY(0);
}

section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideUp 0.5s ease-out;
    scroll-margin-top: 20px;
}

h2 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.5em;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.1em;
    opacity: 0.8;
}

/* Current Weather Grid */
.current-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.weather-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.weather-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.5);
}

.weather-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.weather-temp {
    font-size: 2.5em;
    font-weight: bold;
    margin: 10px 0;
}

.weather-label {
    font-size: 0.9em;
    opacity: 0.8;
    margin-top: 5px;
}

.weather-value {
    font-size: 1.2em;
    font-weight: 600;
    margin: 5px 0;
}

/* Rain Forecast Grid */
.rain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.rain-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid rgba(100, 150, 255, 0.3);
}

.rain-amount {
    font-size: 2em;
    font-weight: bold;
    color: #64B5F6;
    margin: 10px 0;
}

.rain-label {
    font-size: 0.9em;
    opacity: 0.9;
}

/* Section Headers with Back to Top */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.section-header h2,
.section-header h3 {
    margin: 0;
}

.back-to-top {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    color: #fff;
    font-size: 0.9em;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

/* Weather Summary Section */
.summary-text-compact {
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.2), rgba(66, 165, 245, 0.15));
    border-radius: 12px;
    padding: 15px 20px;
    margin-top: 20px;
    line-height: 1.6;
    font-size: 1em;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.summary-text-compact p {
    margin: 0;
}

.summary-highlight {
    background: rgba(255, 215, 0, 0.25);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.weather-summary-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.summary-text {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 20px;
    line-height: 1.8;
    font-size: 1.05em;
}

.summary-text p {
    margin: 15px 0;
}

.summary-text strong {
    color: #FFD700;
    font-size: 1.1em;
}

.summary-day {
    margin: 12px 0;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border-left: 4px solid #64B5F6;
}

.summary-highlight {
    background: rgba(255, 215, 0, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
}

.back-to-top:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Today's Hourly Overview - Full Width */
.today-hourly-section {
    padding: 20px;
}

.today-hourly-section h3 {
    color: #fff;
    font-size: 1.2em;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.rain-chart-full {
    padding: 15px;
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.chart-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
}

.legend-color {
    width: 30px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Bottom Grid: 3-Day Forecast and Rain Summary */
.forecast-rain-bottom {
    padding: 15px;
}

.bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.three-day-section,
.rain-summary-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 15px;
}

.three-day-section h3,
.rain-summary-section h3 {
    color: #fff;
    font-size: 1.1em;
    margin-bottom: 12px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* 3-Day Forecast */
.three-day-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.mini-day-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
}

.mini-day-card.clickable {
    cursor: pointer;
}

.mini-day-card.clickable:hover {
    background: rgba(100, 150, 255, 0.2);
    border-color: rgba(100, 150, 255, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.mini-day-name {
    font-weight: bold;
    font-size: 1em;
    margin-bottom: 5px;
}

.mini-day-date {
    font-size: 0.8em;
    opacity: 0.8;
    margin-bottom: 10px;
}

.mini-day-icon {
    font-size: 3em;
    margin: 10px 0;
}

.mini-day-temps {
    font-size: 1.3em;
    margin: 8px 0;
}

.mini-day-temps .temp-max {
    font-weight: bold;
    margin-right: 10px;
}

.mini-day-temps .temp-min {
    opacity: 0.7;
}

.mini-day-rain {
    font-size: 0.9em;
    color: #64B5F6;
    margin-top: 5px;
}

/* Rain Summary */
.rain-grid-compact {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rain-grid-compact .rain-card {
    padding: 12px;
    font-size: 0.9em;
    border-width: 2px;
}

.rain-grid-compact .rain-amount {
    font-size: 1.6em;
    margin: 5px 0;
}

.rain-grid-compact .rain-label {
    font-size: 0.85em;
    font-weight: 600;
}

.rain-grid-compact .weather-label {
    font-size: 0.8em;
}

/* Radar Section */
.radar-section {
    padding: 15px;
}

.radar-section h3 {
    color: #fff;
    font-size: 1.2em;
    margin-bottom: 12px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.radar-container-full {
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    min-height: 400px;
}

.radar-preview {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.radar-preview iframe {
    display: block;
    width: 100%;
}

.radar-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    padding: 8px;
    text-align: center;
    opacity: 0.8;
}

.radar-click-hint {
    color: #fff;
    font-size: 0.85em;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Radar Controls */
.radar-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: center;
}

.radar-mode-btn {
    padding: 10px 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.3s ease;
}

.radar-mode-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.radar-mode-btn.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: #fff;
}

.radar-view {
    border-radius: 12px;
    overflow: hidden;
}

.radar-forecast-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
}

.radar-animation-view {
    min-height: 400px;
    background: #f0f0f0;
}

.radar-timeline {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
}

.radar-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 15px;
}

.radar-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.radar-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    border: none;
}

.radar-slider:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.radar-time-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

#radar-time-label {
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.radar-play-btn {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.3s ease;
}

.radar-play-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
}

.radar-play-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Today's Weather Chart */
.weather-chart-wrapper {
    display: flex;
    gap: 0;
    margin-bottom: 10px;
}

.y-axis-labels {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 120px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.y-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 0;
}

.y-section:last-child {
    border-bottom: none;
}

.y-section.temp-axis {
    height: 120px;
}

.y-section.rain-axis {
    height: 160px;
    padding-top: 0;
    justify-content: center;
    padding-bottom: 0;
}

.y-section.wind-axis {
    height: 90px;
    justify-content: center;
    padding-bottom: 0;
}

.y-scale-temp,
.y-scale-rain {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    font-size: 0.75em;
    color: rgba(255, 255, 255, 0.7);
}

.scale-mark {
    text-align: right;
    padding-right: 8px;
    border-right: 2px solid rgba(255, 255, 255, 0.3);
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.scale-mark.zero {
    font-weight: 600;
    color: #fff;
    border-right: 3px solid rgba(255, 255, 255, 0.6);
}

.y-label-wind {
    font-weight: 600;
    font-size: 0.9em;
    color: #fff;
    text-align: right;
    padding-right: 8px;
    border-right: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}

.chart-container {
    flex: 1;
    overflow-x: hidden;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.temp-chart-row,
.rain-chart-row,
.wind-chart-row {
    position: relative;
    width: 100%;
}

.temp-chart-row {
    height: 120px;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

.temp-bars,
.rain-bars,
.wind-items {
    display: flex;
    gap: 8px;
    width: 100%;
}

.rain-bars {
    height: 100%;
    align-items: flex-end;
    overflow-y: visible;
}

.temp-column,
.rain-column,
.wind-column {
    flex: 1;
    min-width: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.temp-line-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.weather-bar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
    position: relative;
}

.weather-bar-container.past {
    opacity: 0.5;
}

.bar-temp-value {
    font-weight: bold;
    color: #FFD700;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.temp-column {
    height: 120px;
    position: relative;
}

.zero-line {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.4);
    z-index: 1;
}

.temp-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.temp-dot.above-zero {
    background: #FFA000;
    border: 2px solid #FFB300;
    box-shadow: 0 2px 6px rgba(255, 160, 0, 0.6);
}

.temp-dot.below-zero {
    background: #1976D2;
    border: 2px solid #64B5F6;
    box-shadow: 0 2px 6px rgba(25, 118, 210, 0.6);
}

.temp-dot.above-zero:hover {
    transform: translateX(-50%) scale(1.4);
    box-shadow: 0 3px 10px rgba(255, 160, 0, 0.8);
}

.temp-dot.below-zero:hover {
    transform: translateX(-50%) scale(1.4);
    box-shadow: 0 3px 10px rgba(25, 118, 210, 0.8);
}

.temp-dot-label {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 4px;
    font-size: 0.8em;
    font-weight: bold;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

.temp-dot.above-zero .temp-dot-label {
    color: #FFD700;
}

.temp-dot.below-zero .temp-dot-label {
    color: #90CAF9;
}

.temp-labels-row {
    padding: 5px 0;
}

.temp-label-col {
    font-weight: bold;
    color: #FFD700;
    font-size: 0.85em;
}



.section-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0;
}

.rain-chart-row {
    height: 160px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 5px;
    padding-top: 5px;
    overflow: visible;
    display: flex;
    align-items: center;
}

.rain-column {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    overflow: visible;
    padding-bottom: 35px;
}

.wind-chart-row {
    height: 90px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

.wind-column {
    height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.time-labels-outside {
    display: flex;
    gap: 8px;
    padding-left: 135px;
    padding-top: 5px;
}

.time-label-col {
    flex: 1;
    min-width: 30px;
    display: flex;
    justify-content: center;
    font-size: 0.7em;
    opacity: 0.9;
}

.rain-bar {
    width: 24px;
    background: linear-gradient(180deg, #64B5F6 0%, #1976D2 100%);
    border-radius: 4px 4px 0 0;
    min-height: 2px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.rain-bar:hover {
    background: linear-gradient(180deg, #90CAF9 0%, #2196F3 100%);
    transform: scaleY(1.05);
}

.rain-value-above {
    font-size: 0.7em;
    font-weight: bold;
    color: #90CAF9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    margin-bottom: 2px;
    white-space: nowrap;
}

.precip-info-below {
    position: absolute;
    top: calc(100% - 33px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    pointer-events: none;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.precip-icon {
    font-size: 1.1em;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
}

.precip-amount {
    font-size: 0.75em;
    font-weight: bold;
    color: #90CAF9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    line-height: 1;
}



.compass-rose {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.compass-rose:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.compass-rose-current {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    border: 3px solid rgba(144, 202, 249, 0.5);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.compass-rose-current .compass-arrow {
    font-size: 2em;
    color: #90CAF9;
    text-shadow: 0 0 8px rgba(144, 202, 249, 0.8);
}

.compass-arrow {
    font-size: 1.2em;
    color: #90CAF9;
    text-shadow: 0 0 4px rgba(144, 202, 249, 0.8);
}

.wind-direction {
    font-size: 0.65em;
    color: #90CAF9;
    font-weight: 600;
    margin-top: 2px;
}

.wind-speed {
    font-size: 0.65em;
    color: #90CAF9;
    font-weight: 500;
}

.bar-time {
    font-size: 0.75em;
    margin-top: 5px;
    opacity: 0.9;
    white-space: nowrap;
}

/* Hourly Forecast */
.hourly-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    max-height: none;
    overflow-y: visible;
}

.hour-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hour-time {
    font-size: 0.85em;
    opacity: 0.8;
    margin-bottom: 8px;
}

.hour-icon {
    font-size: 2em;
    margin: 8px 0;
}

.hour-temp {
    font-size: 1.2em;
    font-weight: bold;
}

.hour-wind {
    font-size: 0.75em;
    opacity: 0.9;
    margin-top: 5px;
}

.hour-rain {
    font-size: 0.8em;
    color: #64B5F6;
    margin-top: 5px;
}

/* Daily Forecast */
.daily-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.day-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.day-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.4);
}

.day-name {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.day-date {
    font-size: 0.8em;
    opacity: 0.8;
    margin-bottom: 10px;
}

.day-icon {
    font-size: 2.5em;
    margin: 10px 0;
}

.day-temps {
    display: flex;
    justify-content: space-around;
    margin: 10px 0;
    font-size: 0.9em;
}

.temp-max {
    font-weight: bold;
}

.temp-min {
    opacity: 0.7;
}

.day-rain {
    font-size: 0.85em;
    color: #64B5F6;
    margin-top: 8px;
}

footer {
    text-align: center;
    padding: 20px;
    opacity: 0.8;
    font-size: 0.9em;
}

#last-update {
    color: #64B5F6;
    font-weight: bold;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar */
.hourly-grid::-webkit-scrollbar {
    width: 8px;
}

.hourly-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.hourly-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.hourly-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2em;
    }
    
    .section-nav {
        gap: 8px;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 0.85em;
    }
    
    .current-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .weather-card {
        padding: 10px;
    }
    
    .weather-icon {
        font-size: 1.8em;
        margin-bottom: 5px;
    }
    
    .weather-temp {
        font-size: 1.5em;
        margin: 5px 0;
    }
    
    .weather-label {
        font-size: 0.75em;
        margin-top: 3px;
    }
    
    .weather-value {
        font-size: 0.95em;
        margin: 3px 0;
    }
    
    .compass-rose-current {
        width: 35px;
        height: 35px;
        border-width: 2px;
    }
    
    .compass-rose-current .compass-arrow {
        font-size: 1.5em;
    }
    
    .bottom-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .three-day-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .mini-day-card {
        padding: 8px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .mini-day-icon {
        font-size: 1.8em;
        margin: 0;
        order: 3;
    }
    
    .mini-day-temps {
        font-size: 1em;
        order: 2;
        margin: 0 10px;
    }
    
    .mini-day-name {
        font-size: 0.85em;
        margin-bottom: 2px;
        order: 1;
    }
    
    .mini-day-date {
        font-size: 0.7em;
        margin-bottom: 0;
        order: 1;
    }
    
    .mini-day-rain {
        font-size: 0.75em;
        margin-top: 0;
        order: 4;
    }
    
    .rain-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .rain-card {
        padding: 10px;
    }
    
    .rain-amount {
        font-size: 1.5em;
        margin: 5px 0;
    }
    
    .rain-label {
        font-size: 0.8em;
    }
    
    .rain-grid-compact {
        display: flex;
        flex-direction: row;
        gap: 6px;
    }
    
    .rain-grid-compact .rain-card {
        padding: 8px;
        font-size: 0.8em;
        flex: 1;
        text-align: center;
    }
    
    .rain-grid-compact .rain-amount {
        font-size: 1.2em;
        margin: 3px 0;
    }
    
    .hourly-grid {
        display: flex;
        flex-direction: row;
        gap: 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .hour-card {
        padding: 8px;
        flex: 0 0 auto;
        width: 75px;
        min-width: 75px;
    }
    
    .hour-card.past {
        opacity: 0.5;
    }
    
    .hour-time {
        font-size: 0.75em;
        margin-bottom: 5px;
    }
    
    .hour-icon {
        font-size: 1.5em;
        margin: 5px 0;
    }
    
    .hour-temp {
        font-size: 1em;
    }
    
    .hour-wind {
        font-size: 0.7em;
        margin-top: 3px;
    }
    
    .hour-rain {
        font-size: 0.7em;
        margin-top: 3px;
    }
    
    .daily-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .day-card {
        padding: 8px;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }
    
    .day-name {
        font-size: 0.85em;
        margin-bottom: 2px;
    }
    
    .day-date {
        font-size: 0.7em;
        margin-bottom: 0;
    }
    
    .day-icon {
        font-size: 1.8em;
        margin: 0;
        order: 2;
    }
    
    .day-temps {
        font-size: 0.85em;
        margin: 0 10px;
        order: 3;
        display: flex;
        gap: 8px;
    }
    
    .day-rain {
        font-size: 0.7em;
        margin-top: 0;
        order: 4;
    }
    
    .today-hourly-section {
        overflow: visible !important;
    }
    
    .weather-chart-wrapper {
        display: flex !important;
        flex-direction: row !important;
        min-width: max-content !important;
        overflow: visible !important;
    }
    
    .weather-chart-wrapper::-webkit-scrollbar {
        display: none;
    }
    
    .y-axis-labels {
        min-width: 80px;
        max-width: 80px;
        padding: 5px;
        flex-shrink: 0;
        flex-grow: 0;
    }
    
    .y-section {
        flex: 1;
        padding: 5px 0;
    }
    
    .y-section.temp-axis {
        height: 100px;
    }
    
    .y-section.rain-axis {
        height: 105px;
    }
    
    .y-section.wind-axis {
        height: 70px;
    }
    
    .scale-mark {
        font-size: 0.7em;
        padding-right: 5px;
    }
    
    .y-label-wind {
        font-size: 0.8em;
        padding-right: 5px;
    }
    
    .temp-chart-row {
        height: 100px;
    }
    
    .rain-chart-row {
        height: 105px !important;
        overflow: visible !important;
        padding-top: 10px !important;
        position: relative !important;
        min-height: 105px !important;
    }
    
    .wind-chart-row {
        height: 70px;
    }
    
    .temp-column {
        height: 100px;
    }
    
    .wind-column {
        height: 70px;
    }
    
    .chart-container {
        padding: 5px;
        padding-top: 8px;
        gap: 8px;
        overflow: visible !important;
        flex: 1;
        min-width: 0;
    }
    
    .temp-bars,
    .rain-bars,
    .wind-items {
        gap: 4px;
        display: flex !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
    }
    
    .rain-bars {
        overflow: visible !important;
        padding-top: 5px !important;
        height: 100% !important;
        min-height: 90px !important;
        position: relative !important;
    }
    
    .temp-bars::-webkit-scrollbar,
    .rain-bars::-webkit-scrollbar,
    .wind-items::-webkit-scrollbar {
        display: none;
    }
    
    .temp-column,
    .rain-column,
    .wind-column {
        flex: 0 0 auto;
        width: 45px;
        min-width: 45px;
    }
    
    .rain-column {
        overflow: visible !important;
        min-height: 90px !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-end !important;
        position: relative !important;
    }
    
    .weather-bar-container {
        min-width: 35px;
    }
    
    .bar-temp-value {
        font-size: 0.75em;
        margin-bottom: 3px;
    }
    
    .temp-dot {
        width: 8px;
        height: 8px;
    }
    
    .temp-dot-label {
        font-size: 0.7em;
    }
    
    .rain-bar {
        width: 18px;
        position: relative !important;
        z-index: 1;
        min-height: 2px !important;
    }
    
    .rain-value-above {
        font-size: 0.7em;
        position: absolute !important;
        bottom: 100% !important;
        margin-bottom: 1px !important;
        z-index: 999 !important;
        white-space: nowrap !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: #90CAF9 !important;
        font-weight: bold !important;
        pointer-events: none !important;
    }
    
    .compass-rose {
        width: 16px;
        height: 16px;
        border-width: 1px;
    }
    
    .compass-arrow {
        font-size: 1em;
    }
    
    .wind-direction {
        font-size: 0.6em;
    }
    
    .wind-speed {
        font-size: 0.6em;
    }
    
    .rain-chart-full {
        display: flex !important;
        flex-direction: column !important;
        position: relative !important;
    }
    
    .time-labels-outside {
        padding-left: 85px;
        gap: 4px;
        display: flex;
        box-sizing: border-box;
        overflow-x: visible;
    }
    
    .time-label-col {
        font-size: 0.65em;
        flex: 0 0 auto;
        width: 45px;
        min-width: 45px;
        text-align: center;
    }
    
    .back-to-top {
        font-size: 0.75em;
        padding: 5px 10px;
    }
    
    section {
        padding: 12px;
        margin-bottom: 12px;
        overflow: visible;
    }
    
    .rain-chart-full {
        padding: 10px;
        padding-top: 15px;
        overflow-x: scroll;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .rain-chart-full::-webkit-scrollbar {
        display: none;
    }
    
    h2 {
        font-size: 1.2em;
        margin-bottom: 10px;
    }
    
    h3 {
        font-size: 1em;
        margin-bottom: 8px;
    }
    
    .section-header {
        margin-bottom: 10px;
    }
    
    .three-day-section,
    .rain-summary-section {
        padding: 10px;
    }
    
    .chart-legend {
        gap: 8px;
        padding: 6px;
        margin-bottom: 8px;
        font-size: 0.85em;
    }
    
    .legend-item {
        font-size: 0.75em;
        gap: 4px;
    }
    
    .legend-color {
        width: 16px;
        height: 10px;
    }
    
    .modal-rain-column {
        overflow: visible !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-end !important;
        position: relative !important;
    }
    
    .rain-bar-modal {
        position: relative;
    }
    
    .rain-value-modal-above {
        position: absolute;
        top: -15px;
        z-index: 10;
        white-space: nowrap;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.75em;
        color: #90CAF9;
        font-weight: bold;
    }
    
    .modal-rain-chart {
        overflow: visible !important;
        padding-top: 25px;
        height: 110px;
    }
    
    .y-axis-labels-modal {
        min-width: 80px !important;
        font-size: 0.85em;
    }
    
    .y-section-modal {
        padding: 3px 0 !important;
    }
    
    .y-scale-modal .scale-mark {
        font-size: 0.7em !important;
    }
    
    .y-label-modal {
        font-size: 0.75em !important;
    }
    
    .help-button {
        top: 5px;
        right: 10px;
        padding: 6px 12px;
        font-size: 0.9em;
    }
    
    .location-selector {
        flex-direction: column;
        gap: 8px;
    }
    
    .location-selector select {
        padding: 8px 15px;
        font-size: 0.95em;
    }
    
    .modal-rain-column {
        overflow: visible !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-end !important;
    }
    
    .rain-value-modal-above {
        position: relative;
        z-index: 5;
    }
    
    .modal-rain-chart {
        overflow: visible !important;
        padding-top: 20px;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    position: relative;
}

.modal-header {
    padding: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    background: rgba(102, 126, 234, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.modal-header h2 {
    margin: 0 0 5px 0;
    color: #fff;
}

.modal-header h3 {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1em;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: 1.5em;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px;
    display: flex;
    gap: 15px;
    overflow-x: auto;
}

.modal-legend {
    min-width: 120px;
    flex-shrink: 0;
}

.y-axis-labels-modal {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.y-section-modal {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 0;
}

.y-section-modal:last-child {
    border-bottom: none;
}

.y-section-modal.temp-axis {
    height: 120px;
}

.y-section-modal.rain-axis {
    height: 160px;
    justify-content: center;
    padding-bottom: 0;
}

.y-section-modal.wind-axis {
    height: 90px;
    justify-content: center;
    padding-bottom: 0;
}

.y-scale-modal {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    font-size: 0.75em;
    color: rgba(255, 255, 255, 0.7);
}

.y-scale-modal .scale-mark {
    text-align: right;
    padding-right: 8px;
    border-right: 2px solid rgba(255, 255, 255, 0.3);
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.y-scale-modal .scale-mark.zero {
    font-weight: 600;
    color: #fff;
    border-right: 3px solid rgba(255, 255, 255, 0.6);
}

.y-label-modal {
    font-weight: 600;
    font-size: 0.85em;
    color: #fff;
    text-align: right;
    padding-right: 8px;
    border-right: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}

.modal-weather-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: max-content;
    flex: 1;
}

.modal-temp-chart,
.modal-rain-chart,
.modal-wind-chart,
.modal-time-labels {
    display: flex;
    gap: 12px;
}

.modal-temp-chart {
    height: 120px;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

.modal-temp-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.modal-temp-column {
    min-width: 50px;
    height: 120px;
    position: relative;
    display: flex;
    justify-content: center;
}

.modal-rain-chart {
    height: 160px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 5px;
    padding-top: 5px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.modal-rain-column {
    min-width: 50px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    padding-bottom: 35px;
}

.rain-bar-modal {
    width: 35px;
    background: linear-gradient(180deg, #64B5F6 0%, #1976D2 100%);
    border-radius: 4px 4px 0 0;
    min-height: 2px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
}

.rain-bar-modal:hover {
    background: linear-gradient(180deg, #90CAF9 0%, #2196F3 100%);
    transform: scaleY(1.05);
}

.precip-info-modal-below {
    position: absolute;
    top: calc(100% - 33px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    pointer-events: none;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.rain-value-modal-above {
    font-size: 0.7em;
    font-weight: bold;
    color: #90CAF9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    margin-bottom: 2px;
    white-space: nowrap;
}

.modal-wind-chart {
    height: 70px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

.modal-wind-column {
    min-width: 50px;
    height: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.compass-rose-small {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.compass-rose-small:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.compass-rose-small .compass-arrow {
    font-size: 1em;
    color: #90CAF9;
    text-shadow: 0 0 4px rgba(144, 202, 249, 0.8);
}

.wind-direction-small {
    font-size: 0.7em;
    color: #90CAF9;
    font-weight: 600;
}

.wind-speed-small {
    font-size: 0.75em;
    color: #90CAF9;
    font-weight: 500;
}

.modal-time-labels {
    padding-top: 10px;
}

.modal-time-label {
    min-width: 50px;
    font-size: 0.75em;
    text-align: center;
    opacity: 0.9;
}

/* Help Modal */
.help-modal-content {
    max-width: 95%;
    max-height: 85vh;
    width: 1200px;
}

.help-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(85vh - 80px);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.help-section {
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border-top: 4px solid #FFD700;
    height: fit-content;
}

.help-section:last-child {
    margin-bottom: 0;
}

.help-section h3 {
    color: #FFD700;
    font-size: 1.15em;
    margin-bottom: 10px;
    font-weight: 600;
}

.help-section p {
    line-height: 1.6;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.95em;
}

.help-section ul {
    margin: 10px 0 10px 15px;
    line-height: 1.6;
}

.help-section li {
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9em;
}

.help-section strong {
    color: #90CAF9;
    font-weight: 600;
}

.help-section em {
    color: rgba(255, 255, 255, 0.75);
    font-style: italic;
}
