/* Glassmorphism Weather App */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.5s ease;
}

.glass-container {
    width: 90%;
    max-width: 1200px;
    min-height: 60vh;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: all 0.5s ease;
    animation: containerFloat 6s ease-in-out infinite;
}

@keyframes containerFloat {
    0%, 100% { transform: translateY(0px) rotateX(0deg); }
    50% { transform: translateY(-10px) rotateX(1deg); }
}

.glass-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
    border-radius: 20px;
}

.glass-container:hover {
    transform: translateY(-5px) rotateX(2deg) rotateY(2deg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2),
                0 0 0 1px rgba(255, 255, 255, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.3),
                0 0 40px rgba(255, 255, 255, 0.1);
}

.app-header {
    text-align: center;
    position: relative;
    z-index: 1;
    transform: translateZ(50px);
}

.app-header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    0% { filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3)); }
    100% { filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.6)); }
}

.search-section {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.glass-input {
    flex: 1;
    min-width: 250px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1),
                0 0 20px rgba(255, 255, 255, 0.1);
}

.glass-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.glass-input:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1),
                0 0 30px rgba(255, 255, 255, 0.3),
                0 0 60px rgba(255, 255, 255, 0.2),
                0 0 100px rgba(255, 255, 255, 0.1);
    transform: scale(1.02) translateZ(10px);
}

.liquid-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.liquid-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.liquid-btn:hover::before {
    left: 100%;
}

.liquid-btn:hover {
    transform: translateY(-3px) rotateX(5deg) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3),
                0 0 60px rgba(255, 255, 255, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.4);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.3) 100%);
}

.settings-section {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

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

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: relative;
    cursor: pointer;
    width: 60px;
    height: 34px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: 0.4s;
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background: rgba(255, 255, 255, 0.8);
    transition: 0.4s;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background: rgba(255, 255, 255, 0.4);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.toggle-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-weight: 500;
}

.results-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    z-index: 1;
    width: 100%;
    animation: fadeIn 0.5s ease-out;
}

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

.weather-main-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 20px;
}

.welcome-state {
    text-align: center;
    padding: 40px 20px;
    animation: float 3s ease-in-out infinite;
}

.welcome-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
}

.welcome-state h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.95);
}

.welcome-state p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
}

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

.weather-card, .forecast-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.weather-card::before, .forecast-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s;
}

.weather-card:hover::before, .forecast-card:hover::before {
    left: 100%;
}

.weather-card:hover, .forecast-card:hover {
    transform: translateY(-5px) rotateX(5deg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2),
                0 0 60px rgba(255, 255, 255, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.loading {
    text-align: center;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    animation: pulse 1.5s infinite;
}

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

.sidebar-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    position: relative;
    z-index: 1;
}

.theme-section, .history-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.theme-section:hover, .history-section:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.theme-section h4, .history-section h4 {
    margin: 0 0 20px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Theme Selector - Improved */
.theme-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    justify-items: center;
}

.theme-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.theme-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.theme-option:hover {
    transform: translateY(-3px);
}

/* Theme Color Circle */
.theme-color {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.theme-color::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, transparent 50%);
    border-radius: 50%;
}

.theme-option:hover .theme-color {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25),
                0 0 30px rgba(255, 255, 255, 0.3);
}

/* Theme Name */
.theme-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
}

.theme-option:hover .theme-name {
    color: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

/* Check Mark */
.theme-check {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #333;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

/* Selected State */
.theme-item input[type="radio"]:checked + .theme-option {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

.theme-item input[type="radio"]:checked + .theme-option .theme-color {
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3),
                0 8px 25px rgba(0, 0, 0, 0.3),
                0 0 40px rgba(255, 255, 255, 0.4);
    animation: themeSelected 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.theme-item input[type="radio"]:checked + .theme-option .theme-name {
    color: white;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.theme-item input[type="radio"]:checked + .theme-option .theme-check {
    opacity: 1;
    transform: scale(1);
}

/* Animation for selection */
@keyframes themeSelected {
    0% { transform: scale(1); }
    40% { transform: scale(1.2); }
    70% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* Theme Gradients */
.theme-option[data-theme="blue"] .theme-color {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.theme-option[data-theme="pink"] .theme-color {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.theme-option[data-theme="green"] .theme-color {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.theme-option[data-theme="dark"] .theme-color {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

/* Ripple Effect */
.theme-option::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.theme-item input[type="radio"]:checked + .theme-option::before {
    width: 120px;
    height: 120px;
    opacity: 0;
}

/* Active state */
.theme-option:active {
    transform: scale(0.95);
}

.history {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.history button {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.history button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.toast.show {
    opacity: 1;
}

.toast.success {
    background: rgba(76, 175, 80, 0.9);
}

.toast.error {
    background: rgba(244, 67, 54, 0.9);
}

/* Theme classes */
body.default {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 50%, #f0f0f0 100%);
}

body.blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body.pink {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

body.green {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

body.purple {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 50%, #d299c2 100%);
}

body.orange {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
}

body.dark {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

body.light {
    background: linear-gradient(135deg, #e0f7fa 0%, #f3e5f5 50%, #fff3e0 100%);
}

/* Weather and Forecast Styles */
#weatherResult h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    text-align: center;
}

#weatherResult img {
    width: 80px;
    height: 80px;
    margin: 10px auto;
    display: block;
}

#weatherResult p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 8px 0;
    text-align: center;
}

#forecastResult h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
    text-align: center;
}

.forecast-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    /* justify-items: center; Removed to allow items to stretch */
}

.forecast-day {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px 15px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: all 0.3s ease;
    height: 100%; /* Ensure full height */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.forecast-day:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.15);
}

.forecast-day p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.forecast-day img {
    width: 50px;
    height: 50px;
    margin: 10px 0;
}

/* Extra Info Grid */
.extra-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: transform 0.3s ease;
    overflow: hidden; /* Prevent content from spilling out */
}

.info-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.15);
}

.info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
    margin-bottom: 5px;
}

.info-icon {
    font-size: 1.2rem;
}

.info-card h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.info-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.info-row .label {
    color: rgba(255, 255, 255, 0.7);
}

.info-row .value {
    color: rgba(255, 255, 255, 1);
    font-weight: 500;
}

/* AQI Badge */
.aqi-badge {
    padding: 4px 8px;
    border-radius: 12px;
    color: rgba(0, 0, 0, 0.8);
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 5px;
}

/* UV Display */
.uv-display {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 5px;
}

.uv-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.uv-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #ffeb3b, #f44336);
    border-radius: 3px;
    transition: width 1s ease-out;
}

/* Astronomy Styles */
.astro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 8px;
}

.astro-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: 10px;
}

.astro-icon {
    font-size: 1.5rem;
}

.astro-text {
    display: flex;
    flex-direction: column;
}

.astro-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.astro-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
}

.moon-phase-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

.moon-phase-row .label {
    color: rgba(255, 255, 255, 0.8);
}

.moon-phase-row .value {
    font-weight: 500;
    color: #e0e0e0;
}

/* Alerts */
.alerts-card {
    /* margin-top removed */
}

.alert-item {
    background: rgba(255, 87, 87, 0.2);
    border: 1px solid rgba(255, 87, 87, 0.4);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.alert-item h4 {
    color: #ffcccc;
    margin: 0 0 5px 0;
}

.alert-item p {
    color: #ffe6e6;
    font-size: 0.9rem;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        align-items: flex-start; /* Prevent top cut-off when content overflows */
        padding: 20px 0;
        height: auto;
    }

    .glass-container {
        width: 95%;
        padding: 20px;
        gap: 20px;
        min-height: auto;
        /* Disable 3D effects on mobile for better visibility and performance */
        transform: none !important;
        animation: none !important;
        perspective: none;
    }

    .glass-container:hover {
        transform: none !important;
    }

    .app-header {
        transform: none !important; /* Remove Z-translation */
        margin-top: 10px;
    }

    .app-header h1 {
        font-size: 1.8rem; /* Slightly smaller to fit better */
    }

    .search-section {
        flex-direction: column;
        align-items: stretch;
    }

    .glass-input {
        min-width: auto;
    }

    .weather-main-grid {
        grid-template-columns: 1fr;
    }

    .sidebar-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .theme-selector {
        gap: 8px;
    }

    .theme-option {
        padding: 6px;
    }

    .theme-color {
        width: 38px;
        height: 38px;
    }

    .theme-name {
        font-size: 0.7rem;
    }

    .theme-check {
        width: 16px;
        height: 16px;
        font-size: 9px;
    }

    .forecast-container {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }

    .weather-card, .forecast-card {
        padding: 20px;
    }
}

/* Mobile specific adjustments (~420px) */
@media (max-width: 480px) {
    .glass-container {
        width: 100%;
        border-radius: 0;
        border: none;
        padding: 15px;
    }

    .extra-info-grid {
        grid-template-columns: 1fr; /* Stack vertically on small screens for better readability */
        gap: 10px;
    }

    .info-card {
        flex-direction: row; /* Horizontal layout for stacked cards */
        align-items: center;
        justify-content: space-between;
        padding: 12px 15px;
    }

    .info-header {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
        width: 40%;
    }

    .info-body {
        width: 60%;
        align-items: flex-end;
    }

    .info-row {
        width: 100%;
        justify-content: flex-end;
        gap: 10px;
    }
    
    /* Special handling for UV card on mobile */
    .info-card:has(.uv-display) {
        flex-direction: column;
        align-items: stretch;
    }
    
    .info-card:has(.uv-display) .info-header {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .info-card:has(.uv-display) .info-body {
        width: 100%;
    }

    /* Special handling for AQI card on mobile */
    .info-card:has(.aqi-badge) {
        flex-direction: column;
        align-items: stretch;
    }

    .info-card:has(.aqi-badge) .info-header {
        width: 100%;
        margin-bottom: 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 5px;
    }

    .info-card:has(.aqi-badge) .info-body {
        width: 100%;
        align-items: stretch;
    }

    /* Special handling for Astronomy card on mobile */
    .info-card:has(.astro-grid) {
        flex-direction: column;
        align-items: stretch;
    }

    .info-card:has(.astro-grid) .info-header {
        width: 100%;
        margin-bottom: 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 5px;
    }

    .info-card:has(.astro-grid) .info-body {
        width: 100%;
    }
}