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

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(160deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    min-height: 100vh;
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Animated background shapes */
.bg-shapes {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: #667eea;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: #764ba2;
    bottom: 10%;
    left: -80px;
    animation-delay: -7s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: #f093fb;
    top: 50%;
    right: 20%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(15px, 35px) scale(1.02); }
}

/* Header */
header {
    text-align: center;
    padding: 48px 20px 16px;
    color: #fff;
    position: relative;
    z-index: 1;
}

.logo {
    font-size: 3rem;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.5));
}

header h1 {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.05rem;
    opacity: 0.6;
    margin-top: 6px;
    font-weight: 400;
}

/* Main */
main {
    flex: 1;
    max-width: 560px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Search */
.search-section {
    margin-bottom: 8px;
}

.search-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 6px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-wrapper:focus-within {
    border-color: rgba(167, 139, 250, 0.5);
    box-shadow: 0 0 24px rgba(167, 139, 250, 0.15);
}

.search-icon {
    font-size: 1.2rem;
    padding: 0 12px;
    opacity: 0.5;
}

#city-input {
    flex: 1;
    padding: 14px 4px;
    background: transparent;
    border: none;
    font-size: 1rem;
    color: #fff;
    outline: none;
    font-family: inherit;
}

#city-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

button {
    padding: 14px 28px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

button:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 20px rgba(118, 75, 162, 0.4);
}

button:active {
    transform: scale(0.98);
}

/* Weather card */
.weather-card {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 32px;
    margin-top: 24px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.4s ease-out;
}

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

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
}

.badge {
    background: rgba(167, 139, 250, 0.2);
    color: #a78bfa;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(167, 139, 250, 0.3);
}

.card-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.weather-icon {
    font-size: 5rem;
    line-height: 1;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.temp-block {
    text-align: left;
}

.temperature {
    font-size: 4rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    letter-spacing: -2px;
}

.description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: capitalize;
    margin-top: 4px;
}

.details {
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.detail-icon {
    font-size: 1.4rem;
    margin-bottom: 2px;
}

.label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.detail-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
}

/* Forecast card */
.forecast-card {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 28px;
    margin-top: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.4s ease-out;
}

.forecast-card h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
}

.forecast-days {
    display: flex;
    justify-content: space-between;
    gap: 4px;
}

.forecast-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    padding: 12px 4px;
    border-radius: 14px;
    transition: background 0.2s;
}

.forecast-day:hover {
    background: rgba(255, 255, 255, 0.06);
}

.forecast-day.today {
    background: rgba(167, 139, 250, 0.15);
    border: 1px solid rgba(167, 139, 250, 0.25);
}

.forecast-day-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.forecast-day.today .forecast-day-name {
    color: #a78bfa;
}

.forecast-day-icon {
    font-size: 1.5rem;
}

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

.forecast-day-temp-min {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.35);
}

.recommendation {
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.recommendation p {
    font-size: 0.92rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
}

.recommendation p + p {
    margin-top: 8px;
}

/* Error */
.error {
    background: rgba(239, 68, 68, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 16px;
    padding: 24px;
    margin-top: 24px;
    text-align: center;
    color: #fca5a5;
    animation: slideUp 0.4s ease-out;
}

.error-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

/* Info section */
.info-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 28px;
    margin-top: 32px;
    color: rgba(255, 255, 255, 0.8);
}

.info-section h2 {
    margin-bottom: 12px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
}

.info-section p {
    line-height: 1.7;
    font-size: 0.95rem;
    opacity: 0.7;
}

/* Footer */
footer {
    text-align: center;
    padding: 24px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    position: relative;
    z-index: 1;
}

footer a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: #a78bfa;
}

/* Mobile */
@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }

    .card-main {
        flex-direction: column;
        text-align: center;
    }

    .temp-block {
        text-align: center;
    }

    .temperature {
        font-size: 3.2rem;
    }

    .details {
        flex-direction: column;
        gap: 16px;
    }

    .weather-card {
        padding: 24px;
    }

    .forecast-days {
        flex-wrap: wrap;
        gap: 6px;
    }

    .forecast-day {
        min-width: calc(25% - 6px);
    }
}
