/* Mobile-First PWA Improvements */

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

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

.header-content h1 {
    font-size: 1.5rem;
    margin: 0;
    color: #00FFFF;
    text-shadow: 0 0 10px #00FFFF;
}

.menu-toggle {
    background: none;
    border: 2px solid #00FFFF;
    color: #00FFFF;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.menu-toggle:hover, .menu-toggle:focus {
    background: #00FFFF;
    color: #000033;
    box-shadow: 0 0 15px #00FFFF;
}

.admin-badge {
    position: absolute;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
    background: #FF00FF;
    color: white;
    padding: 6px 10px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 0.9rem;
    border: 2px solid #FF00FF;
    transition: all 0.3s ease;
}

.admin-badge:hover {
    background: white;
    color: #FF00FF;
}

/* Mobile Navigation */
.mobile-nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: linear-gradient(135deg, #000066, #000099);
    border-bottom: 1px solid #00FFFF;
}

.mobile-nav.open {
    max-height: 400px;
    padding: 10px 0;
}

.nav-item, .nav-button {
    display: block;
    padding: 15px 25px;
    color: #FFFFFF;
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.nav-item:hover, .nav-item:focus, .nav-button:hover, .nav-button:focus {
    background: rgba(0, 255, 255, 0.1);
    border-left-color: #00FFFF;
    color: #00FFFF;
}

.nav-item.logout {
    border-top: 1px solid #333;
    color: #FF6666;
}

.user-welcome {
    padding: 10px 25px;
    color: #00FF00;
    font-size: 0.9rem;
    border-bottom: 1px solid #333;
}

/* Floating Refresh Button */
.floating-refresh {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF00FF, #FF6600);
    border: 3px solid #FFFFFF;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(255, 0, 255, 0.4);
    transition: all 0.3s ease;
}

.floating-refresh:hover, .floating-refresh:active {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 25px rgba(255, 0, 255, 0.6);
}

.refresh-icon {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Pull to Refresh */
.pull-to-refresh {
    position: absolute;
    top: -60px;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #000033, #000066);
    color: #00FFFF;
    transition: all 0.3s ease;
    z-index: 10;
}

.pull-to-refresh.active {
    top: 0;
}

.pull-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.pull-icon {
    font-size: 1.2rem;
    animation: bounce 1s infinite;
}

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

/* Loading Skeletons */
.loading-skeleton {
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin-bottom: 20px;
}

.skeleton-header, .skeleton-temp, .skeleton-desc, .skeleton-stat, .skeleton-day {
    background: linear-gradient(90deg, #333 25%, #555 50%, #333 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 10px;
}

.skeleton-header { height: 24px; width: 60%; }
.skeleton-temp { height: 48px; width: 40%; }
.skeleton-desc { height: 20px; width: 80%; }
.skeleton-stat { height: 16px; width: 100%; }
.skeleton-day { height: 120px; width: 80px; margin-right: 10px; display: inline-block; }

.skeleton-stats {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.forecast-skeleton {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Touch-Friendly Cards */
.touch-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    background: linear-gradient(135deg, rgba(0, 0, 51, 0.8), rgba(0, 0, 102, 0.8));
    border: 2px solid #00FFFF;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.2);
}

.touch-card:hover, .touch-card:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 255, 0.3);
    border-color: #FFFF00;
}

/* Enhanced Location Header */
.location-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.location-icon {
    font-size: 1.5rem;
    color: #00FFFF;
}

.location-btn {
    background: #FF00FF;
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-left: auto;
}

.location-btn:hover, .location-btn:focus {
    background: #FF6600;
    transform: scale(1.1);
}

/* Enhanced Temperature Display */
.temp-display {
    font-size: 3.5rem;
    font-weight: bold;
    color: #FFFF00;
    text-shadow: 0 0 20px #FFFF00;
    display: block;
    line-height: 1;
}

/* Touch-Friendly Stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.stat-card {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid #00FFFF;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-height: 80px;
    justify-content: center;
}

.stat-card:hover, .stat-card:active {
    background: rgba(0, 255, 255, 0.2);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
}

.stat-icon {
    font-size: 1.5rem;
    display: block;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: #FFFFFF;
}

.stat-label {
    font-size: 0.8rem;
    color: #CCCCCC;
    text-transform: uppercase;
}

/* Touch Buttons */
.touch-btn {
    padding: 15px 25px;
    border: 2px solid;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 120px;
    margin: 5px;
}

.touch-btn.primary {
    background: #00FFFF;
    color: #000033;
    border-color: #00FFFF;
}

.touch-btn.primary:hover, .touch-btn.primary:focus {
    background: #FFFF00;
    border-color: #FFFF00;
    box-shadow: 0 4px 15px rgba(255, 255, 0, 0.4);
}

.touch-btn.secondary {
    background: transparent;
    color: #00FFFF;
    border-color: #00FFFF;
}

.touch-btn.secondary:hover, .touch-btn.secondary:focus {
    background: #00FFFF;
    color: #000033;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.4);
}

/* Enhanced Forecast */
.forecast-section {
    margin: 20px 0;
}

.forecast-section h2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.swipe-hint {
    font-size: 0.8rem;
    color: #00FFFF;
    opacity: 0.8;
}

.touch-scroll {
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.touch-scroll::-webkit-scrollbar {
    display: none;
}

.forecast-grid.swipeable {
    display: flex;
    gap: 15px;
    padding: 10px 5px;
    min-width: max-content;
}

.forecast-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.forecast-nav {
    background: rgba(0, 255, 255, 0.2);
    border: 2px solid #00FFFF;
    color: #00FFFF;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.forecast-nav:hover, .forecast-nav:focus {
    background: #00FFFF;
    color: #000033;
}

.forecast-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.dot.active {
    background: #00FFFF;
    box-shadow: 0 0 10px #00FFFF;
}

/* Weather Icon Animation */
.weather-emoji.animated {
    font-size: 4rem;
    animation: weatherFloat 3s ease-in-out infinite;
}

@keyframes weatherFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .header-content h1 {
        font-size: 1.2rem;
    }
    
    .current-weather-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .temp-display {
        font-size: 3rem;
    }
    
    .quick-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .touch-btn {
        width: 100%;
        margin: 0;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 10px 15px;
    }
    
    .header-content h1 {
        font-size: 1rem;
    }
    
    .temp-display {
        font-size: 2.5rem;
    }
    
    .touch-card {
        margin: 10px 0;
        padding: 15px;
    }
    
    .floating-refresh {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .touch-card {
        border-width: 3px;
    }
    
    .stat-card {
        border-width: 2px;
    }
    
    .touch-btn {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .weather-emoji.animated {
        animation: none;
    }
}