/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #2d3748;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: manipulation;
    overflow-x: hidden;
}

/* Touch-friendly improvements */
button, .nav-tab, .hourly-item, .daily-item {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Prevent zoom on input focus for iOS */
input[type="text"], input[type="search"] {
    font-size: 16px;
}

@media screen and (max-width: 480px) {
    input[type="text"], input[type="search"] {
        font-size: 16px;
    }
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.logo i {
    font-size: 2rem;
    color: #ffd700;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Premium Button */
.premium-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ff6b35, #ff9a56);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.premium-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.6);
    background: linear-gradient(135deg, #ff9a56, #ff6b35);
    border-color: rgba(255, 255, 255, 0.5);
}

.premium-btn i {
    font-size: 1.1rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
    color: #ffd700;
    background-clip: text;
}

/* Install App Button */
.install-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    font-family: 'Inter', sans-serif;
    margin-right: 15px;
}

.install-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.6);
    background: linear-gradient(135deg, #45a049, #4CAF50);
    border-color: rgba(255, 255, 255, 0.5);
}

.install-btn i {
    font-size: 1.1rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-3px); }
    60% { transform: translateY(-1px); }
}

.search-container {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    min-width: 300px;
}

.search-box:focus-within {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.search-box i {
    color: rgba(255, 255, 255, 0.7);
    margin-right: 12px;
}

.search-box input {
    background: none;
    border: none;
    outline: none;
    color: white;
    font-size: 1rem;
    flex: 1;
    font-family: inherit;
}

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

.search-btn, .location-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.search-btn:hover, .location-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Weather Cards */
.weather-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.weather-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.main-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
}

/* Mobile Main Card Override */
@media (max-width: 480px) {
    .main-card {
        background: linear-gradient(135deg, rgba(45, 55, 72, 0.95) 0%, rgba(45, 55, 72, 0.85) 100%);
        color: #e2e8f0;
    }
}

/* Current Weather */
.current-weather {
    margin-bottom: 30px;
}

.current-info {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 30px;
    margin-bottom: 30px;
}

.location-info h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
}

.location-info p {
    color: #718096;
    font-size: 1rem;
}

.temperature-display {
    display: flex;
    align-items: center;
    gap: 20px;
}

.temp-main {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

#currentTemp {
    font-size: 4rem;
    font-weight: 300;
    color: #2d3748;
    line-height: 1;
}

.temp-unit {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 10px;
}

.unit-btn {
    background: rgba(103, 126, 234, 0.1);
    border: 1px solid rgba(103, 126, 234, 0.2);
    border-radius: 8px;
    padding: 5px 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #667eea;
}

.unit-btn.active {
    background: #667eea;
    color: white;
}

.weather-icon i {
    font-size: 3rem;
    color: #ffd700;
    filter: drop-shadow(0 4px 8px rgba(255, 215, 0, 0.3));
}

.weather-description {
    grid-column: 1 / -1;
    margin-top: 10px;
}

.weather-description p:first-child {
    font-size: 1.2rem;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 5px;
}

.weather-description p:last-child {
    color: #718096;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: rgba(103, 126, 234, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.detail-item:hover {
    background: rgba(103, 126, 234, 0.1);
    transform: translateY(-2px);
}

.detail-item i {
    color: #667eea;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.detail-item span:nth-child(2) {
    color: #718096;
    font-size: 0.9rem;
    flex: 1;
}

.detail-item span:last-child {
    font-weight: 600;
    color: #2d3748;
}

/* Navigation */
.weather-nav {
    display: flex;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    padding: 8px;
    margin-bottom: 20px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow-x: auto;
    gap: 5px;
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.9rem;
    color: #718096;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-tab:hover {
    background: rgba(103, 126, 234, 0.1);
    color: #667eea;
}

.nav-tab.active {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(103, 126, 234, 0.3);
}

.nav-tab i {
    font-size: 1rem;
}

/* Tab Content */
.tab-content {
    min-height: 400px;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-panel.active {
    display: block;
}

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

/* Hourly Forecast */
.hourly-forecast {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 0;
}

.hourly-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 15px;
    background: rgba(103, 126, 234, 0.05);
    border-radius: 16px;
    min-width: 100px;
    text-align: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.hourly-item:hover {
    background: rgba(103, 126, 234, 0.1);
    transform: translateY(-5px);
}

.hourly-time {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
}

.hourly-icon i {
    font-size: 1.5rem;
    color: #ffd700;
}

.hourly-temp {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
}

.hourly-desc {
    font-size: 0.8rem;
    color: #718096;
}

/* Daily Forecast */
.daily-forecast {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.daily-item {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(103, 126, 234, 0.05);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.daily-item:hover {
    background: rgba(103, 126, 234, 0.1);
    transform: translateX(10px);
}

.daily-date {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.daily-day {
    font-weight: 600;
    color: #2d3748;
}

.daily-date-num {
    font-size: 0.9rem;
    color: #718096;
}

.daily-weather {
    display: flex;
    align-items: center;
    gap: 15px;
}

.daily-icon i {
    font-size: 1.5rem;
    color: #ffd700;
}

.daily-desc {
    color: #718096;
}

.daily-temps {
    display: flex;
    align-items: center;
    gap: 10px;
}

.daily-high {
    font-weight: 600;
    color: #2d3748;
}

.daily-low {
    color: #718096;
}

.daily-precip {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #667eea;
    font-size: 0.9rem;
}

/* Radar */
.radar-container {
    text-align: center;
}

.radar-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.radar-btn {
    padding: 10px 20px;
    background: rgba(103, 126, 234, 0.1);
    border: 1px solid rgba(103, 126, 234, 0.2);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    color: #667eea;
}

.radar-btn:hover {
    background: rgba(103, 126, 234, 0.2);
}

.radar-btn.active {
    background: #667eea;
    color: white;
}

.radar-map {
    height: 400px;
    background: rgba(103, 126, 234, 0.05);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(103, 126, 234, 0.2);
}

.radar-placeholder {
    text-align: center;
    color: #718096;
}

.radar-placeholder i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 15px;
}

.radar-placeholder p {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.radar-placeholder small {
    font-size: 0.9rem;
    opacity: 0.7;
}

.radar-error {
    text-align: center;
    color: #718096;
    padding: 40px 20px;
}

.radar-error i {
    font-size: 3rem;
    color: #e53e3e;
    margin-bottom: 15px;
}

.radar-error p {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #2d3748;
}

.radar-error small {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Air Quality */
.air-quality-content {
    text-align: center;
}

.aqi-main {
    margin-bottom: 30px;
}

.aqi-value {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

#aqiNumber {
    font-size: 4rem;
    font-weight: 300;
    color: #2d3748;
}

.aqi-label {
    font-size: 1.2rem;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 25px;
    background: #10b981;
    color: white;
}

.aqi-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto;
    max-width: 300px;
}

.aqi-progress {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #f59e0b, #ef4444);
    border-radius: 4px;
    width: 42%;
    transition: width 0.5s ease;
}

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

.pollutant-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(103, 126, 234, 0.05);
    border-radius: 12px;
}

.pollutant-item span:first-child {
    font-weight: 600;
    color: #2d3748;
}

.pollutant-item span:last-child {
    color: #718096;
}

/* Alerts */
.alerts-container {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-alerts {
    text-align: center;
    color: #718096;
}

.no-alerts i {
    font-size: 3rem;
    color: #10b981;
    margin-bottom: 15px;
}

.alert-item {
    background: linear-gradient(45deg, #fed7d7, #feb2b2);
    border: 1px solid #fc8181;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}

.alert-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.alert-header i {
    color: #e53e3e;
    font-size: 1.2rem;
}

.alert-title {
    font-weight: 600;
    color: #742a2a;
}

.alert-description {
    color: #742a2a;
    line-height: 1.5;
    margin-bottom: 10px;
}

.alert-instructions {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #742a2a;
    border-left: 3px solid #e53e3e;
}

.alert-item.moderate {
    background: linear-gradient(45deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
}

.alert-item.moderate .alert-title,
.alert-item.moderate .alert-description,
.alert-item.moderate .alert-instructions {
    color: #92400e;
}

.alert-item.moderate .alert-header i {
    color: #f59e0b;
}

.alert-item.moderate .alert-instructions {
    background: rgba(255, 255, 255, 0.3);
    border-left-color: #f59e0b;
}

.alert-item.severe {
    background: linear-gradient(45deg, #fed7d7, #feb2b2);
    border: 1px solid #fc8181;
}

.alert-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.alert-time {
    margin-left: auto;
    font-size: 0.8rem;
    opacity: 0.8;
    font-weight: 500;
}

.alert-error {
    text-align: center;
    color: #718096;
    padding: 40px 20px;
}

.alert-error i {
    font-size: 2rem;
    color: #e53e3e;
    margin-bottom: 15px;
}

.alert-error p {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #2d3748;
}

.alert-error small {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Weather Comparison Styles */
.comparison-controls {
    margin-bottom: 20px;
}

.compare-search {
    display: flex;
    gap: 10px;
    align-items: center;
}

.compare-search input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid rgba(103, 126, 234, 0.2);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
}

.compare-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.compare-btn:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

.comparison-placeholder {
    text-align: center;
    color: #718096;
    padding: 40px 20px;
}

.comparison-placeholder i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 15px;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.compare-item {
    background: rgba(103, 126, 234, 0.05);
    border-radius: 12px;
    padding: 20px;
    position: relative;
}

.compare-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 0.8rem;
}

.compare-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-right: 30px;
}

.compare-header h4 {
    margin: 0;
    color: #2d3748;
    font-size: 1.1rem;
}

.compare-temp {
    font-size: 2rem;
    font-weight: 300;
    color: #667eea;
}

.compare-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.compare-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #718096;
}

.compare-detail i {
    width: 16px;
    text-align: center;
    color: #667eea;
}

/* Weather Trends Styles */
.trends-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.trend-btn {
    padding: 8px 16px;
    background: rgba(103, 126, 234, 0.1);
    border: 1px solid rgba(103, 126, 234, 0.2);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    color: #667eea;
}

.trend-btn:hover {
    background: rgba(103, 126, 234, 0.2);
}

.trend-btn.active {
    background: #667eea;
    color: white;
}

.trends-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.trend-chart {
    background: rgba(103, 126, 234, 0.05);
    border-radius: 12px;
    padding: 20px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-placeholder {
    text-align: center;
    color: #718096;
}

.chart-placeholder i {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 10px;
}

.trend-insights {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.insight-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(103, 126, 234, 0.05);
    border-radius: 8px;
}

.insight-label {
    color: #718096;
    font-size: 0.9rem;
}

.insight-value {
    font-weight: 600;
    color: #2d3748;
}

.trend-up {
    color: #10b981;
}

.trend-down {
    color: #e53e3e;
}

/* Smart Recommendations */
.recommendations {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recommendation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: rgba(103, 126, 234, 0.05);
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.recommendation-item i {
    color: #667eea;
    font-size: 1.1rem;
}

/* Export Options */
.export-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(103, 126, 234, 0.3);
}

/* Additional Features */
.additional-features {
    margin-top: 30px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.feature-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.feature-header i {
    font-size: 1.5rem;
    color: #667eea;
}

.feature-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
}

.sun-moon-info, .pollen-info, .activity-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sun-info, .pollen-level, .activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(103, 126, 234, 0.05);
    border-radius: 10px;
}

.level {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.level.low {
    background: #d1fae5;
    color: #065f46;
}

.level.moderate {
    background: #fef3c7;
    color: #92400e;
}

.level.high {
    background: #fecaca;
    color: #991b1b;
}

.activity-rating {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.activity-rating.good {
    background: #d1fae5;
    color: #065f46;
}

.activity-item i {
    color: #667eea;
    margin-right: 8px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(103, 126, 234, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #ffd700;
}

.loading-spinner p {
    font-size: 1.2rem;
    font-weight: 500;
}

/* Enhanced Responsive Design */

/* Large Tablets and Small Desktops */
@media (max-width: 1024px) {
    .app-container {
        padding: 18px;
    }
    
    .trends-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .comparison-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* Tablets */
@media (max-width: 768px) {
    .app-container {
        padding: 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .search-container {
        width: 100%;
        justify-content: center;
    }
    
    .search-box {
        min-width: 100%;
        max-width: 400px;
    }
    
    .current-info {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }
    
    .temperature-display {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    #currentTemp {
        font-size: 3.5rem;
    }
    
    .weather-details {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .weather-nav {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 8px 4px;
    }
    
    .weather-nav::-webkit-scrollbar {
        display: none;
    }
    
    .nav-tab {
        flex-shrink: 0;
        min-width: 100px;
        font-size: 0.85rem;
    }
    
    .daily-item {
        grid-template-columns: 1fr auto;
        gap: 15px;
        text-align: left;
    }
    
    .daily-weather {
        grid-column: 1 / -1;
        justify-self: start;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .trends-container {
        grid-template-columns: 1fr;
    }
    
    .trends-controls {
        justify-content: center;
    }
    
    .trend-btn {
        flex: 1;
        min-width: 80px;
        text-align: center;
    }
    
    .radar-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .radar-btn {
        flex: 1;
        min-width: 100px;
    }
}

/* Enhanced Mobile Design */
@media (max-width: 480px) {
    .app-container {
        padding: 8px;
        gap: 12px;
    }
    
    .weather-card {
        padding: 25px 20px;
        margin-bottom: 15px;
        border-radius: 20px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }
    
    .header {
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .header-content {
        gap: 10px;
        align-items: center;
        padding: 0 5px;
    }
    
    .logo h1 {
        font-size: 1.4rem;
        margin: 0;
    }
    
    .logo i {
        font-size: 1.4rem;
    }
    
    .search-container {
        width: 100%;
        max-width: none;
        display: flex;
        gap: 10px;
        align-items: center;
    }
    
    .search-box {
        padding: 12px 15px;
        font-size: 1rem;
        border-radius: 25px;
        flex: 1;
        min-width: 0;
    }
    
    .search-btn, .location-btn {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.2);
        border: 2px solid rgba(255, 255, 255, 0.3);
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    
    .search-btn:hover, .location-btn:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    }
    
    .search-btn i, .location-btn i {
        font-size: 1.2rem;
        color: #ffffff;
    }
    
    /* Current Weather Section - Improved Mobile Layout */
    .current-info {
        display: flex;
        flex-direction: column;
        gap: 25px;
        text-align: center;
        padding: 25px 20px;
    }
    
    .location-info {
        order: 1;
        margin-bottom: 10px;
    }
    
    .location-info h2 {
        font-size: 1.5rem;
        margin-bottom: 8px;
        color: #ffffff;
        font-weight: 600;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
    
    .location-info p {
        font-size: 1rem;
        margin-bottom: 0;
        color: rgba(255, 255, 255, 0.8);
    }
    
    .temperature-display {
        order: 2;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 25px;
        margin: 25px 0;
    }
    
    .temp-main {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 15px;
    }
    
    #currentTemp {
        font-size: 5rem;
        font-weight: 200;
        line-height: 1;
        color: #ffffff;
        text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    }
    
    .temp-unit {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-left: 10px;
    }
    
    .unit-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.15);
        border: 2px solid rgba(255, 255, 255, 0.3);
        color: white;
        cursor: pointer;
        transition: all 0.3s ease;
        min-width: 40px;
    }
    
    .unit-btn.active {
        background: rgba(255, 255, 255, 0.95);
        color: #667eea;
        font-weight: 700;
        border-color: rgba(255, 255, 255, 0.9);
    }
    
    .weather-icon {
        order: 1;
        margin: 0;
    }
    
    .weather-icon i {
        font-size: 4rem;
        color: #ffd700;
        text-shadow: 0 4px 15px rgba(255, 215, 0, 0.6);
        display: block;
        filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.4));
    }
    
    .weather-description {
        order: 3;
        margin-bottom: 20px;
        margin-top: 15px;
    }
    
    .weather-description p:first-child {
        font-size: 1.4rem;
        margin-bottom: 10px;
        color: #ffffff;
        font-weight: 600;
        text-transform: capitalize;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
    
    .weather-description p:last-child {
        font-size: 1.1rem;
        color: rgba(255, 255, 255, 0.85);
        margin: 0;
    }
    
    /* Weather Details Grid - Enhanced Mobile */
    .weather-details {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 25px;
        padding-top: 25px;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .detail-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 18px 20px;
        font-size: 1rem;
        border-radius: 15px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: #ffffff;
        backdrop-filter: blur(10px);
        transition: all 0.3s ease;
    }
    
    .detail-item:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    
    .detail-item i {
        font-size: 1.4rem;
        color: #ffd700;
        margin-right: 15px;
        flex-shrink: 0;
    }
    
    .detail-item span:first-child {
        flex: 1;
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.9);
        font-weight: 500;
    }
    
    .detail-item span:last-child {
        font-size: 1.1rem;
        font-weight: 700;
        color: #ffffff;
        text-align: right;
    }
    
    /* Navigation Tabs - Fixed Mobile */
    .weather-nav {
        padding: 15px 10px;
        margin-bottom: 20px;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        white-space: nowrap;
    }
    
    .weather-nav::-webkit-scrollbar {
        display: none;
    }
    
    .nav-tab {
        padding: 15px 20px;
        font-size: 0.9rem;
        min-width: 120px;
        text-align: center;
        border-radius: 25px;
        flex-shrink: 0;
        white-space: nowrap;
        margin-right: 10px;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }
    
    .nav-tab i {
        font-size: 1.1rem;
        margin-bottom: 2px;
        display: block;
    }
    
    /* Hourly Forecast */
    .hourly-forecast {
        gap: 10px;
        padding: 10px 5px;
        overflow-x: auto;
    }
    
    .hourly-item {
        min-width: 80px;
        padding: 15px 10px;
        text-align: center;
        border-radius: 12px;
        flex-shrink: 0;
    }
    
    .hourly-time {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }
    
    .hourly-icon {
        font-size: 1.5rem;
        margin: 8px 0;
    }
    
    .hourly-temp {
        font-size: 1.1rem;
        font-weight: 600;
        margin-bottom: 5px;
    }
    
    .hourly-desc {
        font-size: 0.7rem;
        opacity: 0.8;
    }
    
    /* Daily Forecast */
    .daily-item {
        display: grid;
        grid-template-columns: 1fr auto auto;
        gap: 15px;
        align-items: center;
        padding: 18px 15px;
        border-radius: 12px;
    }
    
    .daily-date {
        font-size: 0.9rem;
        font-weight: 600;
    }
    
    .daily-weather {
        display: flex;
        align-items: center;
        gap: 8px;
        justify-self: center;
    }
    
    .daily-weather i {
        font-size: 1.3rem;
    }
    
    .daily-weather span {
        font-size: 0.8rem;
    }
    
    .daily-temps {
        text-align: right;
        font-size: 0.9rem;
    }
    
    .daily-temps .high {
        font-weight: 600;
        margin-right: 8px;
    }
    
    .daily-temps .low {
        opacity: 0.7;
    }
    
    /* Air Quality */
    .aqi-value {
        text-align: center;
        margin-bottom: 20px;
    }
    
    #aqiNumber {
        font-size: 3.5rem;
        font-weight: 300;
        line-height: 1;
    }
    
    #aqiStatus {
        font-size: 1.1rem;
        margin-top: 5px;
    }
    
    .pollutants {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .pollutant-item {
        padding: 12px;
        text-align: center;
        border-radius: 10px;
    }
    
    /* Feature Cards */
    .feature-card {
        padding: 20px 15px;
        border-radius: 15px;
    }
    
    .feature-header h4 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    /* Weather Comparison */
    .compare-search {
        flex-direction: row;
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .compare-search input {
        flex: 1;
        padding: 12px 15px;
        border-radius: 20px;
        font-size: 1rem;
    }
    
    .compare-btn {
        width: 45px;
        height: 45px;
        border-radius: 50%;
        flex-shrink: 0;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .compare-item {
        padding: 20px 15px;
        border-radius: 12px;
    }
    
    .compare-header {
        margin-bottom: 15px;
        padding-right: 35px;
    }
    
    .compare-header h4 {
        font-size: 1rem;
    }
    
    .compare-temp {
        font-size: 2.2rem;
        margin-bottom: 15px;
    }
    
    .compare-details {
        gap: 10px;
    }
    
    .compare-detail {
        font-size: 0.9rem;
        gap: 8px;
    }
    
    /* Trends */
    .trends-controls {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .trend-btn {
        padding: 12px 15px;
        font-size: 0.9rem;
        border-radius: 20px;
    }
    
    .trends-insights {
        gap: 15px;
    }
    
    .insight-item {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        padding: 15px;
        border-radius: 10px;
    }
    
    .insight-item i {
        font-size: 1.3rem;
        flex-shrink: 0;
    }
    
    .insight-item div {
        flex: 1;
    }
    
    .insight-item h5 {
        font-size: 0.9rem;
        margin-bottom: 3px;
    }
    
    .insight-item p {
        font-size: 0.8rem;
        margin: 0;
    }
    
    /* Export Options */
    .export-options {
        flex-direction: row;
        gap: 10px;
    }
    
    .export-btn {
        flex: 1;
        padding: 15px;
        border-radius: 20px;
        font-size: 0.9rem;
    }
    
    /* Radar Controls */
    .radar-controls {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .radar-btn {
        padding: 12px 15px;
        font-size: 0.85rem;
        border-radius: 20px;
    }
    
    #radarMap {
        height: 250px;
        border-radius: 12px;
    }
    
    /* Alerts */
    .alert-item {
        padding: 15px;
        border-radius: 12px;
        margin-bottom: 10px;
    }
    
    .alert-header {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        margin-bottom: 10px;
    }
    
    .alert-header i {
        font-size: 1.2rem;
    }
    
    .alert-header h4 {
        flex: 1;
        font-size: 1rem;
        margin: 0;
    }
    
    .alert-time {
        font-size: 0.8rem;
        opacity: 0.8;
    }
    
    .alert-description {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 10px;
    }
    
    .alert-instructions {
        font-size: 0.85rem;
        padding: 10px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.1);
    }
}

/* Visual Scroll Hint Arrow Above Navigation - Centered & More Visual */
.nav-scroll-hint {
    text-align: center;
    padding: 10px 0;
    margin-bottom: 5px;
    position: relative;
    background: rgba(255, 154, 86, 0.1);
    border-radius: 20px;
    margin: 0 15px 10px 15px;
    border: 1px solid rgba(255, 154, 86, 0.3);
}

.nav-scroll-hint::before {
    content: 'Swipe to see more features';
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    margin-bottom: 5px;
    font-weight: 500;
}

.nav-scroll-hint i {
    color: #ff9a56;
    font-size: 1.8rem;
    font-weight: 900;
    animation: slideArrow 2s infinite;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    filter: drop-shadow(0 0 8px rgba(255, 154, 86, 0.6));
}

.nav-scroll-hint::after {
    content: '→ → →';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 154, 86, 0.5);
    font-size: 1rem;
    animation: fadeArrows 2s infinite;
}

@keyframes slideArrow {
    0%, 100% {
        transform: translateX(-10px);
        opacity: 0.7;
    }
    50% {
        transform: translateX(10px);
        opacity: 1;
        filter: drop-shadow(0 0 12px rgba(255, 154, 86, 0.8));
    }
}

@keyframes fadeArrows {
    0%, 100% {
        opacity: 0.3;
        transform: translateY(-50%) translateX(0);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-50%) translateX(5px);
    }
}

/* ===== MOBILE TEXT CONTRAST & READABILITY FIXES ===== */
@media (max-width: 768px) {
    /* Improve overall text contrast */
    .weather-card {
        background: rgba(255, 255, 255, 0.18) !important;
        backdrop-filter: blur(20px) !important;
        border: 1px solid rgba(255, 255, 255, 0.25) !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
    }
    
    /* Card titles */
    .weather-card h3 {
        color: #ffffff !important;
        font-weight: 600 !important;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4) !important;
        font-size: 1.3rem !important;
    }
    
    /* Fix search input styling */
    .search-container {
        background: rgba(255, 255, 255, 0.15) !important;
        border: 1px solid rgba(255, 255, 255, 0.25) !important;
        border-radius: 25px !important;
        overflow: hidden !important;
    }
    
    .search-box {
        background: transparent !important;
        border: none !important;
        outline: none !important;
        color: #ffffff !important;
        font-weight: 500 !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
    }
    
    .search-box::placeholder {
        color: rgba(255, 255, 255, 0.7) !important;
        font-weight: 400 !important;
    }
    
    .search-btn {
        background: rgba(255, 255, 255, 0.2) !important;
        border: none !important;
        color: #ffffff !important;
        border-radius: 50% !important;
    }
    
    .location-btn {
        background: rgba(255, 255, 255, 0.2) !important;
        border: 1px solid rgba(255, 255, 255, 0.25) !important;
        color: #ffffff !important;
        border-radius: 50% !important;
    }
    
    /* Fix navigation tabs background and styling */
    .weather-nav {
        background: rgba(255, 255, 255, 0.1) !important;
        border-radius: 25px !important;
        padding: 8px !important;
        margin: 15px 10px !important;
        backdrop-filter: blur(15px) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
    }
    
    .nav-tab {
        color: rgba(255, 255, 255, 0.8) !important;
        font-weight: 500 !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
        background: transparent !important;
        border: none !important;
        border-radius: 18px !important;
        padding: 12px 16px !important;
        margin: 0 2px !important;
        transition: all 0.3s ease !important;
    }
    
    .install-btn {
        padding: 10px 16px !important;
        font-size: 0.9rem !important;
        border-radius: 25px !important;
        background: linear-gradient(135deg, #4CAF50, #45a049) !important;
        border: 2px solid rgba(255, 255, 255, 0.4) !important;
        box-shadow: 0 4px 15px rgba(76, 175, 80, 0.6) !important;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4) !important;
        font-weight: 700 !important;
        backdrop-filter: blur(10px) !important;
        margin-right: 10px !important;
    }
    
    #weatherDescription {
        color: #ffffff !important;
        font-weight: 500 !important;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4) !important;
        font-size: 1.2rem !important;
    }
    
    #feelsLike {
        color: rgba(255, 255, 255, 0.95) !important;
        font-weight: 500 !important;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
    }
    
    /* Weather details */
    .detail-item {
        background: rgba(255, 255, 255, 0.15) !important;
        border: 1px solid rgba(255, 255, 255, 0.25) !important;
        color: #ffffff !important;
    }
    
    .detail-item span {
        color: #ffffff !important;
        font-weight: 500 !important;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
    }
    
    .detail-item span:last-child {
        font-weight: 600 !important;
        color: #ffffff !important;
    }
    
    /* Hourly forecast */
    .hourly-item {
        background: rgba(255, 255, 255, 0.15) !important;
        border: 1px solid rgba(255, 255, 255, 0.25) !important;
        color: #ffffff !important;
    }
    
    .hourly-time {
        color: rgba(255, 255, 255, 0.9) !important;
        font-weight: 500 !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    }
    
    .hourly-temp {
        color: #ffffff !important;
        font-weight: 600 !important;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
    }
    
    /* Daily forecast */
    .daily-item {
        background: rgba(255, 255, 255, 0.15) !important;
        border: 1px solid rgba(255, 255, 255, 0.25) !important;
        color: #ffffff !important;
    }
    
    .daily-date {
        color: #ffffff !important;
        font-weight: 500 !important;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
    }
    
    .daily-temps {
        color: #ffffff !important;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
    }
    
    /* TRENDS & ANALYTICS TEXT FIXES */
    .analytics-card, .trends-card {
        background: rgba(255, 255, 255, 0.2) !important;
        backdrop-filter: blur(25px) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
    }
    
    .analytics-card h3, .trends-card h3 {
        color: #ffffff !important;
        font-weight: 700 !important;
        text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5) !important;
        font-size: 1.4rem !important;
    }
    
    .analytics-card p, .trends-card p {
        color: #ffffff !important;
        font-weight: 500 !important;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4) !important;
        font-size: 1rem !important;
    }
    
    .analytics-value, .trend-value {
        color: #ffffff !important;
        font-weight: 700 !important;
        text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5) !important;
        font-size: 1.8rem !important;
    }
    
    .trend-direction {
        color: #ffffff !important;
        font-weight: 600 !important;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4) !important;
    }
    
    .daily-high {
        color: #ffffff !important;
        font-weight: 600 !important;
    }
    
    .daily-low {
        color: rgba(255, 255, 255, 0.85) !important;
        font-weight: 500 !important;
    }
    
    /* Air Quality */
    .aqi-display {
        background: rgba(255, 255, 255, 0.15) !important;
        border: 1px solid rgba(255, 255, 255, 0.25) !important;
    }
    
    .aqi-value {
        color: #ffffff !important;
        font-weight: 700 !important;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4) !important;
    }
    
    .aqi-label, #aqiStatus {
        color: #ffffff !important;
        font-weight: 500 !important;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
    }
    
    .pollutant-item {
        background: rgba(255, 255, 255, 0.12) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        color: #ffffff !important;
    }
    
    .pollutant-item span {
        color: #ffffff !important;
        font-weight: 500 !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    }
    
    /* Trends */
    .trend-item {
        background: rgba(255, 255, 255, 0.15) !important;
        border: 1px solid rgba(255, 255, 255, 0.25) !important;
        color: #ffffff !important;
    }
    
    .trend-value {
        color: #ffffff !important;
        font-weight: 600 !important;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4) !important;
    }
    
    .trend-label {
        color: rgba(255, 255, 255, 0.9) !important;
        font-weight: 500 !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    }
    
    /* Sun & Moon */
    .sun-moon-card {
        background: rgba(255, 255, 255, 0.15) !important;
        border: 1px solid rgba(255, 255, 255, 0.25) !important;
    }
    
    .sun-moon-item {
        color: #ffffff !important;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 0;
    }
    
    .sun-moon-item span:first-child {
        color: rgba(255, 255, 255, 0.9) !important;
        font-weight: 500 !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    }
    
    .sun-moon-item span:last-child {
        color: #ffffff !important;
        font-weight: 600 !important;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
    }
    
    /* General text improvements */
    p, span, div {
        text-rendering: optimizeLegibility;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Fix any remaining low contrast text */
    .weather-card p,
    .weather-card span,
    .weather-card div {
        color: #ffffff !important;
        opacity: 1 !important;
    }
    
    /* Ensure all weather data is visible */
    #humidity, #windSpeed, #pressure, #uvIndex, #visibility, #precipitation {
        color: #ffffff !important;
        font-weight: 600 !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    }
}

/* Mobile Navigation & Search Fixes */
@media (max-width: 480px) {
    /* Mobile-specific navigation fixes */
    .weather-nav {
        overflow-x: auto !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        white-space: nowrap !important;
        display: flex !important;
        gap: 4px !important;
        padding: 8px 12px !important;
        position: relative !important;
    }
    
    /* Remove conflicting arrow - using centered arrow above instead */
    
    .weather-nav::-webkit-scrollbar {
        display: none !important;
    }
    
    .nav-tab {
        flex-shrink: 0 !important;
        min-width: 85px !important;
        white-space: nowrap !important;
        font-size: 0.8rem !important;
        padding: 10px 14px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 4px !important;
        height: 60px !important;
        justify-content: center !important;
    }
    
    .nav-tab i {
        font-size: 1rem !important;
        display: block !important;
        margin-bottom: 2px !important;
    }
    
    /* Search container mobile fixes */
    .header-content {
        padding: 0 10px !important;
        gap: 10px !important;
    }
    
    .search-container {
        flex: 1 !important;
        min-width: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 0 !important;
    }
    
    .search-box {
        flex: 1 !important;
        padding: 12px 16px !important;
        font-size: 16px !important;
        min-width: 0 !important;
    }
    
    .search-btn {
        width: 44px !important;
        height: 44px !important;
        margin-left: 8px !important;
        flex-shrink: 0 !important;
    }
    
    .location-btn {
        width: 44px !important;
        height: 44px !important;
        flex-shrink: 0 !important;
        margin-left: 8px !important;
    }
    
    /* Pulse animation for scroll arrow */
    @keyframes pulseArrow {
        0%, 100% {
            transform: translateY(-50%) scale(1) !important;
            opacity: 0.8 !important;
        }
        50% {
            transform: translateY(-50%) scale(1.1) !important;
            opacity: 1 !important;
        }
    }
    
    /* Conflicting arrow rules removed - using centered indicator above */
    
    /* Additional user guidance */
    .nav-hint {
        position: absolute !important;
        bottom: -25px !important;
        right: 10px !important;
        font-size: 0.7rem !important;
        color: rgba(255, 255, 255, 0.6) !important;
        text-align: center !important;
        animation: fadeInOut 3s infinite !important;
        pointer-events: none !important;
    }
    
    @keyframes fadeInOut {
        0%, 100% { opacity: 0 !important; }
        50% { opacity: 1 !important; }
    }
    
    /* Visible Scroll Indicator Arrow */
    .scroll-indicator {
        position: fixed !important;
        right: 15px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        background: linear-gradient(135deg, #ff9a56, #ff6b35) !important;
        color: white !important;
        width: 40px !important;
        height: 40px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1.2rem !important;
        box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6) !important;
        animation: pulseArrow 1.5s infinite !important;
        z-index: 1000 !important;
        cursor: pointer !important;
        border: 2px solid rgba(255, 255, 255, 0.3) !important;
        transition: all 0.3s ease !important;
    }
    
    .scroll-indicator:hover {
        transform: translateY(-50%) scale(1.1) !important;
        box-shadow: 0 8px 25px rgba(255, 107, 53, 0.8) !important;
    }
    
    .scroll-indicator.hidden {
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

/* Extra Small Phones */
@media (max-width: 360px) {
    .app-container {
        padding: 3px;
    }
    
    .weather-card {
        padding: 12px 10px;
        margin-bottom: 8px;
    }
    
    .header {
        padding: 10px;
    }
    
    .logo h1 {
        font-size: 1.3rem;
    }
    
    .search-box {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .search-btn, .location-btn {
        width: 40px;
        height: 40px;
    }
    
    #currentTemp {
        font-size: 3.2rem;
    }
    
    .weather-details {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .detail-item {
        padding: 12px 10px;
        font-size: 0.85rem;
    }
    
    .nav-tab {
        padding: 10px 12px;
        font-size: 0.75rem;
        min-width: 75px;
    }
    
    .hourly-item {
        min-width: 65px;
        padding: 12px 8px;
    }
    
    .daily-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 10px;
        padding: 15px 10px;
    }
    
    .compare-search {
        flex-direction: column;
        gap: 10px;
    }
    
    .compare-search input {
        width: 100%;
    }
    
    .compare-btn {
        width: 100%;
        height: 40px;
        border-radius: 20px;
    }
    
    .trends-controls {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .radar-controls {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .export-options {
        flex-direction: column;
        gap: 8px;
    }
    
    #radarMap {
        height: 200px;
    }
}

/* Landscape Orientation for Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .current-info {
        grid-template-columns: 1fr 1fr;
        text-align: left;
    }
    
    .temperature-display {
        justify-content: flex-end;
    }
    
    #currentTemp {
        font-size: 2.5rem;
    }
    
    .weather-details {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .weather-icon i {
        filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.4));
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .weather-card {
        background: rgba(45, 55, 72, 0.95);
        color: #e2e8f0;
    }
    
    .detail-item {
        background: rgba(103, 126, 234, 0.1);
    }
    
    .location-info h2 {
        color: #e2e8f0;
    }
    
    .detail-item span:last-child {
        color: #e2e8f0;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(103, 126, 234, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(103, 126, 234, 0.7);
}


