* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #333;
    overflow-x: hidden;
    position: relative;
    padding: 2rem 0;
    /* space constraint for footer */
    /* Smooth transitions for theme changes */
    transition: background 0.8s ease-in-out;
}

/* Base Themes based on Weather */
.theme-default {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.theme-sunny {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
}

.theme-rainy {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.theme-cloudy {
    background: linear-gradient(135deg, #8e9eab 0%, #eef2f3 100%);
}

.theme-snowy {
    background: linear-gradient(135deg, #E0EAFC 0%, #CFDEF3 100%);
}

.weather-card {
    /* Enhanced Glassmorphism effect */
    background: rgba(255, 255, 255, 0.90);
    width: 100%;
    /* Mobile-first dimension constraints */
    max-width: 90%;
    padding: 2.2rem 1.8rem;
    border-radius: 28px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
    margin: 1.5rem auto;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1);
}

/* Scaling up on tablet/desktop */
@media (min-width: 480px) {
    .weather-card {
        max-width: 420px;
        padding: 2.8rem 2.5rem;
        border-radius: 32px;
    }
}

header {
    text-align: center;
    margin-bottom: 2.2rem;
}

header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.8px;
    margin-bottom: 0.4rem;
}

/* Hackathon Polish: App Logo/Text Gradient */
header h1 {
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.current-date-time {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f8fafc;
    padding: 0.5rem;
    border-radius: 9999px;
    margin-bottom: 1.5rem;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease, background 0.3s ease;
    border: 2px solid transparent;
}

.search-box:focus-within {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.15);
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.8rem 1.2rem;
    font-size: 1.05rem;
    color: #1e293b;
    outline: none;
    font-family: inherit;
    font-weight: 500;
}

.search-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.search-btn {
    background: #1e293b;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.25);
    flex-shrink: 0;
}

.search-btn:hover {
    transform: translateY(-2px) scale(1.05);
    background: #334155;
    box-shadow: 0 6px 16px rgba(30, 41, 59, 0.3);
}

.search-btn:active {
    transform: translateY(0) scale(0.95);
}

.location-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.5);
    color: #334155;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    margin-bottom: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.location-btn:hover {
    background: white;
    color: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Base UI Animations */
.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.slide-up {
    animation: slideUp 0.6s cubic-bezier(0.175, 0.885, 0.32, 1) forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Spinner UX */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
    color: #64748b;
    animation: fadeIn 0.3s ease forwards;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(100, 116, 139, 0.2);
    border-top-color: #1e293b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error Container UI */
.error-container {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #ef4444;
    padding: 1rem 1.2rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.1);
    animation: slideUp 0.4s ease forwards;
}

.error-container svg {
    flex-shrink: 0;
}

.error-container p {
    font-size: 0.95rem;
    font-weight: 500;
}

/* Weather Display */
.weather-display {
    text-align: center;
}

.weather-icon-placeholder {
    color: #64748b;
    margin-bottom: 0.5rem;
    min-height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }

    100% {
        transform: translateY(0px);
    }
}

.temperature {
    font-size: 5rem;
    font-weight: 700;
    line-height: 1;
    color: #0f172a;
    margin-bottom: 0.4rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    letter-spacing: -3px;
}

@media (min-width: 480px) {
    .temperature {
        font-size: 5.5rem;
    }
}

.temperature span {
    font-size: 2.5rem;
    margin-top: 0.6rem;
    color: #64748b;
    font-weight: 500;
    letter-spacing: normal;
}

.city-name {
    font-size: 1.6rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.4rem;
    letter-spacing: -0.5px;
}

.weather-condition {
    font-size: 1.25rem;
    color: #475569;
    margin-bottom: 1.2rem;
    text-transform: capitalize;
    font-weight: 500;
}

.weather-details {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(203, 213, 225, 0.6);
    padding-top: 1.8rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.detail-item:first-child {
    border-right: 1px solid rgba(203, 213, 225, 0.6);
}

.detail-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748b;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.detail-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
}

/* 5-Day Forecast Section */
.forecast-container {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(203, 213, 225, 0.6);
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.forecast-container::-webkit-scrollbar {
    display: none;
}

.forecast-card {
    min-width: 75px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.35);
    padding: 1rem 0.5rem;
    border-radius: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, background 0.2s ease;
}

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

.forecast-day {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.forecast-icon {
    width: 45px;
    height: 45px;
    margin-bottom: 0.2rem;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
}

.forecast-temp {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}

/* Footer Built by Pranav */
.app-footer {
    position: absolute;
    bottom: 1.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

/* Unique Hackathon Feature: Smart Suggestion Badge */
.smart-suggestion {
    background: rgba(255, 255, 255, 0.5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.6);
    text-wrap: balance;
    backdrop-filter: blur(4px);
    transition: transform 0.2s ease;
}

.smart-suggestion:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.7);
}

@media (min-width: 480px) {
    .smart-suggestion {
        font-size: 0.95rem;
    }
}


