:root {
    --soft-pink: #fff0f3;
    --sky-blue: #e0f2fe;
    --creamy-white: rgba(255, 255, 255, 0.7);
    --text-main: #5f6368;
    --accent-blue: #bae6fd;
    --accent-pink: #ffdae0;
    --shadow-soft: 0 10px 30px -5px rgba(255, 182, 193, 0.2);
}

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

body {
    font-family: 'Quicksand', sans-serif;
    background: linear-gradient(135deg, var(--soft-pink) 0%, var(--sky-blue) 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-main);
    overflow-x: hidden;
}

.app-container {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding: 1rem;
}

h1,
h2,
h3 {
    font-family: 'ZCOOL KuaiLe', 'Fredoka', cursive;
    font-weight: 400;
    /* ZCOOL KuaiLe is already bold-ish */
}

/* Glassmorphism Effect */
.glass {
    background: var(--creamy-white);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 2.5rem;
    /* Even rounder */
    box-shadow: var(--shadow-soft);
}

/* Main Card */
.main-card {
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.main-card header h1 {
    font-size: 2rem;
    margin-bottom: 0.2rem;
}

.main-card header p {
    font-size: 0.9rem;
    opacity: 0.7;
}

.weather-info {
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.icon-container {
    width: 140px;
    height: 140px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    position: relative;
}

.refresh-pill {
    position: absolute;
    top: 2rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.8);
    padding: 4px 10px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 0.7rem;
    color: var(--text-color);
    transition: all 0.3s ease;
    height: fit-content;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    z-index: 10;
}

.refresh-pill:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.refresh-pill i,
.refresh-pill svg {
    width: 12px;
    height: 12px;
}

.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

#weather-icon {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 15px 15px rgba(0, 0, 0, 0.1));
}

.temp-container #temperature {
    font-size: 4.5rem;
    font-weight: 700;
    font-family: 'Fredoka', sans-serif;
    line-height: 1;
}

.temp-container #feels-like {
    font-size: 1rem;
    opacity: 0.8;
}

.details-row {
    display: flex;
    justify-content: space-around;
    margin-top: 1.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.detail-item i {
    width: 20px;
    color: #0ea5e9;
}

/* Sub Cards */
.sub-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card {
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hanger-bg {
    background-color: #fce7f3;
    color: #db2777;
}

.suncream-bg {
    background-color: #fef3c7;
    color: #d97706;
}

.reminder-bg {
    background-color: #e0f2fe;
    color: #0284c7;
}

.card-content h3 {
    font-size: 1rem;
    margin-bottom: 0.1rem;
}

.card-content p {
    font-size: 0.85rem;
    opacity: 0.8;
}


/* Forecast Section */
.forecast-container {
    padding: 1.5rem;
}

.forecast-container h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}

.forecast-list {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 0.5rem;
    scrollbar-width: none;
    /* Firefox */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.forecast-list::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.forecast-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
    /* Increased for better touch target */
    gap: 0.5rem;
    scroll-snap-align: center;
    transition: transform 0.2s;
}

.forecast-item:active {
    transform: scale(0.95);
}

.forecast-item span:first-child {
    font-size: 0.85rem;
    opacity: 0.8;
}

.forecast-item img {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.05));
}

.forecast-item span:last-child {
    font-weight: 700;
    font-size: 1rem;
}

/* Search Bar */
.search-container {
    display: flex;
    padding: 0.5rem 1.2rem;
    align-items: center;
}

#city-search {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.8rem;
    font-family: inherit;
    font-size: 1rem;
    color: inherit;
}

#city-search:focus {
    outline: none;
}

#search-btn {
    background: var(--accent-blue);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}

#search-btn:hover {
    background: #7dd3fc;
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(2deg);
    }

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

.floating {
    animation: float 4s ease-in-out infinite;
}

@media (max-width: 480px) {
    body {
        align-items: flex-start;
        padding-top: 1rem;
    }

    .main-card header h1 {
        font-size: 1.8rem;
    }

    .temp-container #temperature {
        font-size: 4rem;
    }
}