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

body {
    font-family: 'Quicksand', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #fce4ec 0%, #e8eaf6 50%, #e0f7fa 100%);
    background-attachment: fixed;
    color: #37474f;
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

.container {
    max-width: 900px;
    width: 100%;
}

/* Header */

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

h1 {
    font-family: 'Pacifico', cursive;
    font-size: 2.8rem;
    color: #e91e63;
    text-shadow: 2px 2px 8px rgba(233, 30, 99, 0.15);
    margin-bottom: 0.25rem;
    animation: float 3s ease-in-out infinite;
}

.subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    color: #78909c;
    letter-spacing: 0.05em;
}

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

/* Cards */

main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.card {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

/* Weather Card */

.weather-card {
    text-align: center;
}

.weather-icon {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.weather-temp {
    font-size: 3rem;
    font-weight: 700;
    color: #ff7043;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.weather-desc {
    font-size: 1rem;
    color: #78909c;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.weather-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 1rem;
}

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

.detail-label {
    font-size: 0.85rem;
    color: #90a4ae;
    flex: 1;
}

.detail-value {
    font-weight: 700;
    font-size: 0.95rem;
}

/* Cat Card */

.cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
}

.cat-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 1.25rem;
    overflow: hidden;
    background: linear-gradient(135deg, #fce4ec, #f3e5f5);
}

.cat-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.cat-img.active {
    opacity: 1;
}

.cat-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ce93d8;
    animation: pulse 1.5s ease-in-out infinite;
}

.cat-loading.hidden {
    display: none;
}

.cat-timer {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

.cat-timer-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f48fb1, #ce93d8);
    border-radius: 2px;
    transition: width 0.3s linear;
}

.cat-btn {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 2rem;
    background: linear-gradient(135deg, #f48fb1, #ce93d8);
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(206, 147, 216, 0.3);
}

.cat-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(206, 147, 216, 0.45);
}

.cat-btn:active {
    transform: scale(0.97);
}

/* Footer */

footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.8rem;
    color: #b0bec5;
}

/* Responsive */

@media (max-width: 650px) {
    main {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2.2rem;
    }

    .weather-temp {
        font-size: 2.4rem;
    }
}
