/* ========================================
   1. GLOBAL STYLES & RESET
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
    transition: all 0.8s ease;
}

/* Add overlay for better text readability */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
    pointer-events: none;
}

/* ========================================
   2. DYNAMIC BACKGROUND CLASSES
   ======================================== */
.weather-clear-day {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 50%, #6c5ce7 100%);
    background-image: url('sunny.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.weather-clear-night {
    background: linear-gradient(135deg, #2d3436 0%, #636e72 50%, #341f97 100%);
    background-image: url('night.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.weather-cloudy {
    background: linear-gradient(135deg, #636e72 0%, #2d3436 50%, #74b9ff 100%);
    background-image: url('cloudy.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.weather-rainy {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 50%, #2d3436 100%);
    background-image: url('rainy.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.weather-stormy {
    background: linear-gradient(135deg, #2d3436 0%, #636e72 50%, #6c5ce7 100%);
    background-image: url('storm.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.weather-snowy {
    background: linear-gradient(135deg, #ddd6fe 0%, #a5b4fc 50%, #6366f1 100%);
    background-image: url('snow.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* ========================================
   3. WEATHER EFFECTS ANIMATIONS
   ======================================== */
.rain-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.raindrop {
    position: absolute;
    background: linear-gradient(to bottom, rgba(255,255,255,0.6), rgba(255,255,255,0.1));
    width: 2px;
    height: 20px;
    border-radius: 0 0 2px 2px;
    animation: rain-fall linear infinite;
}

@keyframes rain-fall {
    0% {
        transform: translateY(-100vh);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* ========================================
   4. LAYOUT & CONTAINER
   ======================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

/* ========================================
   5. WEATHER WIDGET - MAIN STRUCTURE
   ======================================== */
.weather-widget {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2.5rem;
    padding: 3rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

/* Weather Widget Header Section */
.weather-header {
    margin-bottom: 2.5rem;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 2rem;
}

.app-title-section {
    flex: 1;
}

.app-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: white;
    letter-spacing: -0.02em;
    text-align: left;
}

.date-location {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.current-date {
    font-size: 1.25rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.01em;
}

.location-display {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

.header-controls {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.change-location-btn,
.refresh-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.change-location-btn:hover,
.refresh-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.last-updated {
    font-size: 0.85rem;
    opacity: 0.7;
    text-align: right;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
}

/* ========================================
   6. WEATHER SUMMARY SECTION
   ======================================== */
.weather-summary {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2rem;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Current Weather Conditions */
.current-conditions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.weather-primary {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.weather-icon-desc {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.weather-emoji {
    font-size: 3rem;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.weather-desc {
    font-size: 1.25rem;
    font-weight: 500;
    color: white;
    letter-spacing: -0.01em;
}

.temperature {
    font-size: 4rem;
    font-weight: 200;
    color: white;
    letter-spacing: -0.03em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.weather-secondary {
    display: flex;
    gap: 2rem;
    font-size: 1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
}

/* Air Quality Summary */
.aqi-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.aqi-header {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
}

.aqi-badge-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 1.5rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    min-width: 120px;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.aqi-badge-summary .aqi-emoji {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.aqi-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.aqi-badge-summary .aqi-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.aqi-badge-summary .aqi-status {
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.95;
    line-height: 1.2;
    color: white;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
/* Replace the AQI color override section in your CSS with this more comprehensive version: */

/* AQI Color Overrides for Glassmorphic Design */
/* Good - Green */
.aqi-badge-summary[style*="background-color: #059669"],
.aqi-badge-summary[style*="background-color: rgb(5, 150, 105)"],
.aqi-badge-summary[style*="#059669"] {
    border-color: #059669 !important;
    background: rgba(5, 150, 105, 0.15) !important;
}

/* Moderate - Orange/Yellow */
.aqi-badge-summary[style*="background-color: #d97706"],
.aqi-badge-summary[style*="background-color: rgb(217, 119, 6)"],
.aqi-badge-summary[style*="#d97706"],
.aqi-badge-summary[style*="background-color: #f59e0b"],
.aqi-badge-summary[style*="background-color: rgb(245, 158, 11)"],
.aqi-badge-summary[style*="#f59e0b"] {
    border-color: #d97706 !important;
    background: rgba(217, 119, 6, 0.15) !important;
}

/* Unhealthy for Sensitive Groups - Red */
.aqi-badge-summary[style*="background-color: #dc2626"],
.aqi-badge-summary[style*="background-color: rgb(220, 38, 38)"],
.aqi-badge-summary[style*="#dc2626"] {
    border-color: #dc2626 !important;
    background: rgba(220, 38, 38, 0.15) !important;
}

/* Unhealthy - Dark Red */
.aqi-badge-summary[style*="background-color: #b91c1c"],
.aqi-badge-summary[style*="background-color: rgb(185, 28, 28)"],
.aqi-badge-summary[style*="#b91c1c"] {
    border-color: #b91c1c !important;
    background: rgba(185, 28, 28, 0.15) !important;
}

/* Very Unhealthy - Dark Brown-Red */
.aqi-badge-summary[style*="background-color: #7c2d12"],
.aqi-badge-summary[style*="background-color: rgb(124, 45, 18)"],
.aqi-badge-summary[style*="#7c2d12"] {
    border-color: #7c2d12 !important;
    background: rgba(124, 45, 18, 0.15) !important;
}

/* Hazardous - Very Dark Red */
.aqi-badge-summary[style*="background-color: #450a0a"],
.aqi-badge-summary[style*="background-color: rgb(69, 10, 10)"],
.aqi-badge-summary[style*="#450a0a"] {
    border-color: #450a0a !important;
    background: rgba(69, 10, 10, 0.15) !important;
}

/* Moon Phase Summary */
.moon-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.moon-header {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
}

.moon-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.moon-content .moon-icon {
    font-size: 3rem;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.moon-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.moon-phase-name {
    font-size: 1rem;
    font-weight: 600;
    color: white;
}

.moon-illumination {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

/* ========================================
   7. DETAILED SECTIONS
   ======================================== */
.detailed-sections {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* Air Quality Details */
.air-quality-details {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2rem;
    padding: 2rem;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.air-quality-details h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: white;
}

.aqi-explanation {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.5;
    text-align: center;
}

.pollutants-breakdown h5 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    text-align: center;
    color: white;
}

.pollutants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.pollutant-item {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pollutant-name {
    font-weight: 600;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 0.5rem;
    color: white;
}

.pollutant-value {
    font-weight: 500;
    font-size: 1rem;
    display: block;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.95);
}

.pollutant-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    line-height: 1.4;
}

/* Hourly Weather */
.hourly-weather {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2rem;
    padding: 2rem;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hourly-weather h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    color: white;
}

.hourly-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.hourly-item {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 0.75rem 0.5rem;
    text-align: center;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    min-width: 80px;
}

.hourly-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.current-hour {
    background: rgba(116, 185, 255, 0.2) !important;
    border: 1px solid rgba(116, 185, 255, 0.4) !important;
    transform: scale(1.05);
}

.current-hour .hourly-time {
    color: #74b9ff !important;
    font-weight: 600;
}

.hourly-time {
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.hourly-icon {
    font-size: 1.25rem;
    margin: 0.25rem 0;
}

.hourly-temp {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0.25rem 0;
    color: white;
}

.hourly-rain {
    font-size: 0.7rem;
    color: #60a5fa;
    margin-top: 0.25rem;
    font-weight: 500;
}

.hourly-wind {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Forecast */
.forecast {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2rem;
    padding: 2rem;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.forecast h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    color: white;
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.forecast-day {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    padding: 1.5rem 1rem;
    text-align: center;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.forecast-day:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px);
}

.day-name {
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    opacity: 0.8;
    color: white;
}

.day-weather {
    font-size: 2rem;
    margin: 0.75rem 0;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
}

.day-temp {
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: white;
}

.precipitation {
    font-size: 0.8rem;
    opacity: 0.7;
    font-weight: 300;
}

/* Upcoming Moon Phases */
.upcoming-phases {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2rem;
    padding: 2rem;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.upcoming-phases h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    color: white;
}

.phases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.phase-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 1rem 1.5rem;
    border-radius: 1.5rem;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.phase-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.phase-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.phase-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: white;
}

.phase-date {
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 400;
}

/* Gardening Tips */
.gardening-tips {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2rem;
    padding: 2rem;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gardening-tips h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    color: white;
}

.tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.tip {
    padding: 1rem 1.5rem;
    border-radius: 1.5rem;
    font-size: 0.9rem;
    font-weight: 400;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    color: white;
}

.tip:hover {
    transform: translateY(-2px);
}

.tip.warning {
    background: rgba(255, 107, 107, 0.15);
    border-color: rgba(255, 107, 107, 0.3);
}

.tip.info {
    background: rgba(116, 185, 255, 0.15);
    border-color: rgba(116, 185, 255, 0.3);
}

/* ========================================
   8. FORM ELEMENTS
   ======================================== */
.location-form {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.zip-input {
    flex: 1;
    min-width: 200px;
    padding: 0.875rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    backdrop-filter: blur(10px);
}

.zip-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.zip-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

.location-buttons {
    display: flex;
    gap: 0.75rem;
}

.location-btn,
.cancel-btn {
    padding: 0.875rem 1.5rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.location-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.cancel-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.location-btn:hover,
.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* ========================================
   9. GARDEN DATA COMPONENTS
   ======================================== */
.controls {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2rem;
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.search-input,
.filter-select,
.sort-select {
    padding: 1rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-input:focus,
.filter-select:focus,
.sort-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

.results-info {
    margin-bottom: 2rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    font-weight: 400;
    text-align: center;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Category Sections */
.category-section {
    margin-bottom: 2.5rem;
}

.category-title {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 700;
    color: white;
    margin-bottom: 1.25rem;
    padding-bottom: 0.625rem;
    border-bottom: 3px solid rgba(255, 255, 255, 0.3);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.family-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(350px, 100%), 1fr));
    gap: 1.25rem;
}

.family-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    color: white;
}

.family-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}

.family-name {
    font-size: clamp(1rem, 2.5vw, 1.125rem);
    font-weight: 600;
    color: white;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.family-guidance {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    font-style: italic;
    font-size: 0.875rem;
    line-height: 1.5;
    font-weight: 300;
}

.preferences {
    margin-bottom: 1rem;
}

.preference-item {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
}

.preference-label {
    font-weight: 500;
    color: white;
    display: inline-block;
    min-width: 4rem;
}

.preference-value {
    color: rgba(255, 255, 255, 0.8);
    margin-left: 0.5rem;
    font-weight: 300;
}

.plants-section {
    margin-top: 1rem;
}

.plants-title {
    font-weight: 500;
    color: white;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.plants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
    gap: 0.75rem;
}

.plant-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem;
    border-radius: 1rem;
    font-size: 0.8125rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    color: white;
}

.plant-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.plant-common {
    font-weight: 600;
    color: white;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.plant-botanical {
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    font-size: 0.75rem;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.plant-season {
    color: rgba(116, 185, 255, 0.9);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: rgba(116, 185, 255, 0.15);
    border-radius: 0.5rem;
    border: 1px solid rgba(116, 185, 255, 0.3);
    display: inline-block;
    line-height: 1.2;
    font-weight: 400;
}

.plant-sun {
    color: rgba(255, 193, 7, 0.9);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 193, 7, 0.15);
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 193, 7, 0.3);
    display: inline-block;
    line-height: 1.2;
    font-weight: 400;
}

.notes {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 1rem;
    border: 1px solid rgba(255, 193, 7, 0.3);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    backdrop-filter: blur(10px);
}

.notes strong {
    color: white;
    font-weight: 600;
}

.highlight {
    background-color: rgba(255, 193, 7, 0.3);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    color: white;
    font-weight: 500;
}

/* ========================================
   10. LOADING & ERROR STATES
   ======================================== */
.loading-container,
.error-container {
    padding: 2rem;
    border-radius: 1.5rem;
    text-align: center;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.error-container {
    background: rgba(255, 107, 107, 0.15);
    border-color: rgba(255, 107, 107, 0.3);
}

/* ========================================
   11. RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .weather-widget {
        padding: 2rem;
    }
    
    .header-top {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .app-title {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .current-date {
        font-size: 1.1rem;
        text-align: center;
    }
    
    .location-display {
        text-align: center;
    }
    
    .header-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .last-updated {
        text-align: center;
    }
    
    .weather-summary {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .weather-primary {
        justify-content: center;
        text-align: center;
    }
    
    .weather-secondary {
        justify-content: center;
    }
    
    .temperature {
        font-size: 3rem;
    }
    
    .location-form {
        flex-direction: column;
    }
    
    .location-buttons {
        justify-content: center;
    }
    
    .hourly-grid {
        grid-template-columns: repeat(6, 1fr);
        overflow-x: scroll;
    }
    
    .forecast-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .phases-grid {
        grid-template-columns: 1fr;
    }
    
    .tips {
        grid-template-columns: 1fr;
    }
    
    .family-grid {
        grid-template-columns: 1fr;
    }
    
    .plants-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .pollutants-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .temperature {
        font-size: 3rem;
    }
    
    .forecast-grid {
        grid-template-columns: 1fr;
    }
    
    .location-form {
        flex-direction: column;
    }
    
    .plants-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   DYNAMIC GARDENING TIPS SECTION
   ======================================== */

.dynamic-gardening-tips {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2rem;
    padding: 2rem;
    margin-bottom: 2.5rem;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.dynamic-gardening-tips h4 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}

.dynamic-tip {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 1.25rem;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dynamic-tip:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.tip-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.tip-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    flex-shrink: 0;
}

.tip-title {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    line-height: 1.3;
}

.tip-message {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.tip-source {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    font-weight: 300;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

/* Priority-based styling */
.dynamic-tip-critical {
    border: 2px solid rgba(255, 82, 82, 0.6);
    background: rgba(255, 82, 82, 0.15);
    box-shadow: 0 0 20px rgba(255, 82, 82, 0.3);
}

.dynamic-tip-critical::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff5252, #ff1744);
    border-radius: 1.5rem 1.5rem 0 0;
}

.dynamic-tip-high {
    border: 2px solid rgba(255, 167, 38, 0.5);
    background: rgba(255, 167, 38, 0.12);
}

.dynamic-tip-high::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ffa726, #ff9800);
    border-radius: 1.5rem 1.5rem 0 0;
}

.dynamic-tip-medium {
    border: 2px solid rgba(116, 185, 255, 0.4);
    background: rgba(116, 185, 255, 0.1);
}

.dynamic-tip-medium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #74b9ff, #0984e3);
    border-radius: 1.5rem 1.5rem 0 0;
}

.dynamic-tip-low {
    border: 2px solid rgba(129, 236, 236, 0.3);
    background: rgba(129, 236, 236, 0.08);
}

.dynamic-tip-low::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #81ecec, #00cec9);
    border-radius: 1.5rem 1.5rem 0 0;
}

/* Type-based styling variations */
.dynamic-tip-lunar {
    background: rgba(116, 185, 255, 0.12);
}

.dynamic-tip-lunar .tip-icon {
    color: #74b9ff;
    text-shadow: 0 0 10px rgba(116, 185, 255, 0.5);
}

.dynamic-tip-regional {
    background: rgba(85, 239, 196, 0.12);
}

.dynamic-tip-regional .tip-icon {
    color: #55efc4;
    text-shadow: 0 0 10px rgba(85, 239, 196, 0.5);
}

.dynamic-tip-weather {
    background: rgba(255, 206, 84, 0.12);
}

.dynamic-tip-weather .tip-icon {
    color: #fdcb6e;
    text-shadow: 0 0 10px rgba(255, 206, 84, 0.5);
}

.dynamic-tip-air_quality {
    background: rgba(162, 155, 254, 0.12);
}

.dynamic-tip-air_quality .tip-icon {
    color: #a29bfe;
    text-shadow: 0 0 10px rgba(162, 155, 254, 0.5);
}

.dynamic-tip-seasonal {
    background: rgba(255, 159, 67, 0.12);
}

.dynamic-tip-seasonal .tip-icon {
    color: #ff9f43;
    text-shadow: 0 0 10px rgba(255, 159, 67, 0.5);
}

/* Mobile responsiveness for tips */
@media (max-width: 768px) {
    .dynamic-gardening-tips {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .dynamic-tip {
        padding: 1rem;
    }
    
    .tip-header {
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .tip-icon {
        font-size: 1.25rem;
    }
    
    .tip-title {
        font-size: 0.9rem;
    }
    
    .tip-message {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .tips-grid {
        gap: 0.75rem;
    }
    
    .dynamic-tip {
        padding: 0.875rem;
    }
    
    .tip-title {
        font-size: 0.85rem;
    }
    
    .tip-message {
        font-size: 0.8rem;
    }
}

/* ========================================
   MOBILE WEATHER SUMMARY IMPROVEMENTS
   ======================================== */

/* Enhanced mobile responsiveness for weather summary */
@media (max-width: 768px) {
    .weather-summary {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    /* Current conditions mobile layout */
    .current-conditions {
        gap: 1rem;
    }
    
    .weather-primary {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .weather-icon-desc {
        justify-content: center;
        gap: 0.75rem;
    }
    
    .weather-emoji {
        font-size: 2.5rem;
    }
    
    .weather-desc {
        font-size: 1.1rem;
    }
    
    .temperature {
        font-size: 3.5rem;
        margin: 0.5rem 0;
    }
    
    .weather-secondary {
        justify-content: center;
        gap: 1.5rem;
        font-size: 0.9rem;
        flex-wrap: wrap;
    }
    
    /* Air Quality mobile improvements */
    .aqi-summary {
        margin: 1rem 0;
    }
    
    .aqi-header {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .aqi-badge-summary {
        padding: 1.25rem;
        min-width: 140px;
        gap: 0.75rem;
    }
    
    .aqi-badge-summary .aqi-emoji {
        font-size: 2.25rem;
    }
    
    .aqi-badge-summary .aqi-value {
        font-size: 1.75rem;
    }
    
    .aqi-badge-summary .aqi-status {
        font-size: 0.85rem;
    }
    
    /* Moon phase mobile improvements */
    .moon-summary {
        margin: 1rem 0;
    }
    
    .moon-header {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .moon-content {
        gap: 0.75rem;
    }
    
    .moon-content .moon-icon {
        font-size: 2.5rem;
    }
    
    .moon-phase-name {
        font-size: 1.1rem;
    }
    
    .moon-illumination {
        font-size: 0.9rem;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .weather-summary {
        padding: 1.25rem;
        gap: 1.25rem;
        border-radius: 1.5rem;
    }
    
    .temperature {
        font-size: 3rem;
    }
    
    .weather-emoji {
        font-size: 2.25rem;
    }
    
    .weather-secondary {
        gap: 1rem;
        font-size: 0.85rem;
    }
    
    .aqi-badge-summary,
    .moon-content {
        padding: 1rem;
        min-width: 120px;
    }
    
    .aqi-badge-summary .aqi-emoji,
    .moon-content .moon-icon {
        font-size: 2rem;
    }
    
    .aqi-badge-summary .aqi-value {
        font-size: 1.5rem;
    }
    
    .moon-phase-name {
        font-size: 1rem;
    }
}

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .weather-summary {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 1rem;
        padding: 1rem 1.5rem;
    }
    
    .weather-primary {
        flex-direction: row;
        gap: 1rem;
        text-align: left;
    }
    
    .temperature {
        font-size: 2.5rem;
    }
    
    .weather-secondary {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ========================================
   MOBILE HOURLY & FORECAST UX IMPROVEMENTS
   ======================================== */

/* Enhanced Hourly Weather Section */
@media (max-width: 768px) {
    .hourly-weather {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .hourly-weather h4 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }
    
    /* Mobile-optimized hourly grid */
    .hourly-grid {
        display: flex;
        gap: 0.75rem;
        overflow-x: auto;
        padding: 0.5rem 0 1rem 0;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .hourly-grid::-webkit-scrollbar {
        display: none;
    }
    
    .hourly-item {
        flex: 0 0 auto;
        width: 85px;
        padding: 1rem 0.75rem;
        border-radius: 1.25rem;
        scroll-snap-align: start;
        transition: all 0.3s ease;
    }
    
    .hourly-item:hover {
        transform: scale(1.05);
        background: rgba(255, 255, 255, 0.15);
    }
    
    .current-hour {
        transform: scale(1.08) !important;
        box-shadow: 0 4px 20px rgba(116, 185, 255, 0.4);
    }
    
    .hourly-time {
        font-size: 0.85rem;
        font-weight: 600;
        margin-bottom: 0.75rem;
        color: rgba(255, 255, 255, 0.9);
    }
    
    .hourly-icon {
        font-size: 1.5rem;
        margin: 0.5rem 0;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    }
    
    .hourly-temp {
        font-size: 1rem;
        font-weight: 700;
        margin: 0.5rem 0;
        color: white;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }
    
    .hourly-rain {
        font-size: 0.75rem;
        color: #60a5fa;
        margin-top: 0.5rem;
        font-weight: 600;
        background: rgba(96, 165, 250, 0.2);
        padding: 0.25rem 0.5rem;
        border-radius: 0.5rem;
        border: 1px solid rgba(96, 165, 250, 0.3);
    }
    
    .hourly-wind {
        font-size: 0.75rem;
        color: #9ca3af;
        margin-top: 0.25rem;
        font-weight: 500;
    }
}

/* Enhanced Forecast Section */
@media (max-width: 768px) {
    .forecast {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .forecast h4 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .forecast-grid {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .forecast-day {
        display: grid;
        grid-template-columns: 1fr auto auto auto;
        align-items: center;
        padding: 1rem 1.25rem;
        border-radius: 1.25rem;
        text-align: left;
        gap: 1rem;
        min-height: 70px;
    }
    
    .forecast-day:hover {
        transform: translateX(5px);
        background: rgba(255, 255, 255, 0.15);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }
    
    .day-name {
        font-size: 1rem;
        font-weight: 600;
        color: white;
        margin: 0;
        text-align: left;
        min-width: 60px;
    }
    
    .day-weather {
        font-size: 1.75rem;
        margin: 0;
        justify-self: center;
    }
    
    .day-temp {
        font-size: 1rem;
        font-weight: 600;
        margin: 0;
        color: white;
        text-align: right;
        min-width: 80px;
    }
    
    .precipitation {
        font-size: 0.8rem;
        color: #60a5fa;
        font-weight: 600;
        margin: 0;
        text-align: right;
        background: rgba(96, 165, 250, 0.2);
        padding: 0.25rem 0.5rem;
        border-radius: 0.5rem;
        border: 1px solid rgba(96, 165, 250, 0.3);
        min-width: 50px;
    }
    
    /* Today's forecast highlight */
    .forecast-day:first-child {
        background: rgba(116, 185, 255, 0.15) !important;
        border: 1px solid rgba(116, 185, 255, 0.3) !important;
        box-shadow: 0 4px 16px rgba(116, 185, 255, 0.3);
    }
    
    .forecast-day:first-child .day-name {
        color: #74b9ff;
        font-weight: 700;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .hourly-item {
        width: 75px;
        padding: 0.875rem 0.5rem;
    }
    
    .hourly-icon {
        font-size: 1.25rem;
    }
    
    .hourly-temp {
        font-size: 0.9rem;
    }
    
    .forecast-day {
        padding: 0.875rem 1rem;
        gap: 0.75rem;
    }
    
    .day-weather {
        font-size: 1.5rem;
    }
    
    .day-temp {
        font-size: 0.9rem;
        min-width: 70px;
    }
    
    .precipitation {
        font-size: 0.75rem;
        min-width: 45px;
    }
}

/* Scroll indicator for hourly section */
.hourly-weather::after {
    content: '→ Scroll for more';
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.5rem;
    font-style: italic;
}

@media (max-width: 768px) {
    .hourly-weather::after {
        display: block;
    }
}

@media (min-width: 769px) {
    .hourly-weather::after {
        display: none;
    }
}

/* Smooth animations for mobile interactions */
@media (max-width: 768px) {
    .hourly-item,
    .forecast-day {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .hourly-grid {
        scroll-behavior: smooth;
    }
}

/* Better touch targets */
@media (max-width: 768px) and (pointer: coarse) {
    .hourly-item {
        min-height: 120px;
        padding: 1rem 0.75rem;
    }
    
    .forecast-day {
        min-height: 80px;
        padding: 1.25rem;
    }
}