/* Compact Mobile Layout - Fix the "longgggg" UI */

/* Compact Header */
.mobile-header {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #000033, #000066);
    border-bottom: 1px solid #00FFFF;
    z-index: 1000;
    box-shadow: 0 1px 5px rgba(0, 255, 255, 0.2);
}

.header-content {
    padding: 8px 15px;
    min-height: auto;
}

.header-content h1 {
    font-size: 1.1rem;
    margin: 0;
}

.menu-toggle {
    padding: 4px 8px;
    font-size: 1rem;
}

/* Compact Navigation */
.mobile-nav.open {
    max-height: 250px;
    padding: 5px 0;
}

.nav-item, .nav-button {
    padding: 8px 20px;
    font-size: 0.9rem;
}

/* Wider Main Content */
main {
    padding: 10px 20px;
    max-width: 100vw;
    width: 100%;
}

/* Make the weather content container much wider */
.weather-content {
    width: 100%;
    max-width: none;
}

#weather-display {
    width: 100%;
    max-width: none;
}

/* Hide saved locations by default on mobile */
@media (max-width: 768px) {
    #saved-locations-section {
        display: none !important;
    }
}

/* Remove pull-to-refresh space */
.pull-to-refresh {
    height: 40px;
    top: -40px;
}

/* Compact Search */
#search-section {
    margin: 5px 0;
}

.enhanced-search-container {
    padding: 8px;
}

/* Much Wider Weather Display */
.weather-content {
    margin: 0;
    width: 100%;
}

.touch-card {
    padding: 20px 25px;
    margin: 10px 0;
    border-radius: 12px;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

/* Better Proportioned Current Conditions */
.location-header {
    font-size: 1.2rem;
    margin-bottom: 15px;
    gap: 10px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.location-icon {
    font-size: 1.4rem;
}

.location-btn {
    padding: 6px 12px;
    font-size: 0.9rem;
    margin-left: auto;
}

/* Main Weather Display - Much Wider Container */
.main-conditions {
    padding: 25px 30px;
    margin: 15px 0;
    width: 100%;
    max-width: none;
    min-width: 0;
}

.current-weather-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
    align-items: center;
    margin: 15px 0;
    min-height: 80px;
}

.primary-temp {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.temp-display {
    font-size: 3.5rem;
    line-height: 0.9;
    margin-bottom: 8px;
    font-weight: bold;
}

.feels-like {
    font-size: 1rem;
    opacity: 0.9;
    white-space: nowrap;
}

.weather-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.weather-desc {
    font-size: 1.1rem;
    margin: 0 0 8px 0;
    font-weight: 500;
}

.last-updated {
    font-size: 0.8rem;
    opacity: 0.8;
    margin: 0;
}

/* Weather Icon - Bigger and Better */
.current-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.weather-emoji.animated {
    font-size: 4rem;
    text-shadow: 0 0 20px rgba(255, 255, 0, 0.5);
}

/* Full-Width Stats Layout */
.quick-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 12px;
    margin: 15px 0;
    width: 100%;
}

.stat-card {
    padding: 12px 8px;
    text-align: center;
    border-radius: 8px;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    transition: all 0.3s ease;
}

.stat-card:hover, .stat-card:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.4);
}

.stat-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: bold;
    display: block;
    margin-bottom: 4px;
    color: #FFFFFF;
}

.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

/* Full-Width Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 0 10px 0;
    width: 100%;
}

.touch-btn {
    padding: 12px 20px;
    font-size: 1rem;
    min-width: auto;
    margin: 0;
    width: 100%;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

/* Compact Forecast */
.forecast-section {
    margin: 10px 0;
}

.forecast-section h2 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.swipe-hint {
    font-size: 0.7rem;
}

.forecast-grid.swipeable {
    gap: 8px;
    padding: 5px;
}

.forecast-day {
    min-width: 60px;
    padding: 8px 6px;
    border-radius: 6px;
    text-align: center;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid #00FFFF;
}

.forecast-day h3 {
    font-size: 0.7rem;
    margin: 0 0 4px 0;
    text-transform: uppercase;
}

.forecast-day .forecast-temp {
    font-size: 0.8rem;
    margin: 4px 0;
}

.forecast-day .temp-high {
    font-weight: bold;
}

.forecast-day .temp-low {
    opacity: 0.7;
}

.forecast-day .forecast-precip {
    font-size: 0.7rem;
    color: #00FFFF;
    margin: 2px 0;
}

.forecast-day .forecast-short {
    font-size: 0.6rem;
    opacity: 0.8;
    margin-top: 4px;
}

/* Compact Forecast Controls */
.forecast-controls {
    margin-top: 8px;
    gap: 15px;
}

.forecast-nav {
    padding: 4px 10px;
    font-size: 1rem;
}

.dot {
    width: 6px;
    height: 6px;
}

/* Compact Map */
#map-container {
    margin: 10px 0;
}

#map-container h2 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

#weather-map {
    height: 250px !important;
    border-radius: 8px;
}

/* Compact Footer */
footer {
    padding: 15px;
    margin-top: 10px;
}

footer p {
    font-size: 0.8rem;
    margin: 4px 0;
}

.footer-links {
    gap: 10px;
}

.footer-link {
    padding: 4px 8px;
    font-size: 0.7rem;
}

/* Compact Floating Elements */
.floating-refresh {
    bottom: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
}

/* Loading Skeletons - Compact */
.loading-skeleton {
    padding: 10px;
    margin-bottom: 10px;
}

.skeleton-header { height: 16px; }
.skeleton-temp { height: 24px; }
.skeleton-desc { height: 14px; }
.skeleton-stat { height: 12px; }

.skeleton-stats {
    gap: 8px;
    margin-top: 8px;
}

.forecast-skeleton .skeleton-day {
    height: 80px;
    width: 60px;
    margin-right: 8px;
}

/* Mobile Specific Rules - Keep Main Area Wide */
@media (max-width: 768px) {
    .header-content h1 {
        font-size: 1rem;
    }
    
    /* Keep main weather area spacious and wide on mobile */
    .main-conditions {
        padding: 20px 25px;
        margin: 12px 0;
        width: 100%;
    }
    
    .current-weather-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
        min-height: 120px;
    }
    
    .temp-display {
        font-size: 3rem;
    }
    
    .weather-emoji.animated {
        font-size: 3.5rem;
    }
    
    .weather-info {
        text-align: center;
    }
    
    .weather-desc {
        font-size: 1.2rem;
    }
    
    .feels-like {
        font-size: 1.1rem;
    }
    
    /* Better mobile stats layout */
    .quick-stats {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 12px 8px;
        min-height: 65px;
    }
    
    .stat-icon {
        font-size: 1.4rem;
        margin-bottom: 5px;
    }
    
    .stat-value {
        font-size: 1rem;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
        gap: 12px;
        margin: 18px 0 10px 0;
    }
    
    .touch-btn {
        min-height: 42px;
        padding: 12px 18px;
        font-size: 0.95rem;
    }
    
    #weather-map {
        height: 200px !important;
    }
}

@media (max-width: 480px) {
    main {
        padding: 8px 12px;
    }
    
    .header-content {
        padding: 6px 12px;
    }
    
    /* Keep main weather card spacious and wide even on small screens */
    .main-conditions {
        padding: 18px 22px;
        margin: 10px 0;
        width: 100%;
    }
    
    main {
        padding: 8px 15px;
    }
    
    .current-weather-grid {
        min-height: 100px;
        gap: 12px;
    }
    
    .temp-display {
        font-size: 2.5rem;
    }
    
    .weather-emoji.animated {
        font-size: 3rem;
    }
    
    .weather-desc {
        font-size: 1.1rem;
    }
    
    .feels-like {
        font-size: 1rem;
    }
    
    .quick-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .stat-card {
        padding: 10px 6px;
        min-height: 60px;
    }
    
    .stat-icon {
        font-size: 1.3rem;
        margin-bottom: 4px;
    }
    
    .stat-value {
        font-size: 1rem;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .touch-btn {
        min-height: 40px;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .floating-refresh {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        bottom: 12px;
        right: 12px;
    }
    
    #weather-map {
        height: 180px !important;
    }
}

/* Ultra Compact Mode for Very Small Screens */
@media (max-width: 360px) {
    .header-content h1 {
        font-size: 0.9rem;
    }
    
    .temp-display {
        font-size: 1.6rem;
    }
    
    .quick-stats {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .stat-card {
        padding: 8px 4px;
        min-height: 55px;
    }
    
    .stat-icon {
        font-size: 1.2rem;
        margin-bottom: 3px;
    }
    
    .stat-value {
        font-size: 0.9rem;
    }
    
    .stat-label {
        font-size: 0.6rem;
    }
    
    .action-buttons {
        gap: 8px;
    }
    
    .touch-btn {
        min-height: 35px;
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .forecast-day {
        min-width: 55px;
        padding: 6px 4px;
    }
    
    #weather-map {
        height: 160px !important;
    }
}

/* Fix any existing long elements */
.weather-detail-trigger {
    cursor: pointer;
}

/* Ensure no elements cause horizontal scroll */
* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

