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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
    background: linear-gradient(180deg, #1c1c1e 0%, #000000 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    overflow-x: hidden;
}

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

.title {
    font-size: 48px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 40px;
    letter-spacing: -0.5px;
}

.cards-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.weather-card {
    position: relative;
    height: 380px;
    border-radius: 32px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.weather-card:hover {
    transform: scale(1.02) translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.card-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.sunny .card-bg {
    background: linear-gradient(180deg, #4a90d9 0%, #74b9ff 50%, #fdcb6e 100%);
}

.windy .card-bg {
    background: linear-gradient(180deg, #636e72 0%, #b2bec3 50%, #dfe6e9 100%);
}

.rainy .card-bg {
    background: linear-gradient(180deg, #2d3436 0%, #636e72 50%, #74b9ff 100%);
}

.snowy .card-bg {
    background: linear-gradient(180deg, #2d3436 0%, #b2bec3 50%, #dfe6e9 100%);
}

.card-content {
    position: relative;
    z-index: 2;
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    color: #ffffff;
}

.location {
    font-size: 22px;
    font-weight: 500;
    opacity: 0.95;
    letter-spacing: 0.3px;
}

.temperature {
    font-size: 72px;
    font-weight: 200;
    margin-top: auto;
    letter-spacing: -3px;
    line-height: 1;
}

.condition {
    font-size: 20px;
    font-weight: 500;
    margin-top: 8px;
    opacity: 0.9;
}

.high-low {
    font-size: 16px;
    font-weight: 400;
    margin-top: 4px;
    opacity: 0.7;
}

.weather-animation {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.sun {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 180px;
    height: 180px;
}

.sun-core {
    position: absolute;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, #fff9c4 0%, #ffeb3b 50%, #ff9800 100%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 60px rgba(255, 235, 59, 0.8),
                0 0 100px rgba(255, 152, 0, 0.5);
    animation: sunPulse 3s ease-in-out infinite;
}

.sun-rays {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: sunRaysRotate 20s linear infinite;
}

.sun-rays::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, transparent 30%, rgba(255, 235, 59, 0.15) 50%, transparent 70%);
    animation: sunRaysPulse 4s ease-in-out infinite;
}

@keyframes sunPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.9; }
}

@keyframes sunRaysRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes sunRaysPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.wind-lines {
    position: absolute;
    inset: 0;
}

.wind-lines span {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    border-radius: 2px;
    animation: windBlow 2s ease-in-out infinite;
}

.wind-lines span:nth-child(1) { width: 80px; top: 20%; left: -80px; animation-delay: 0s; }
.wind-lines span:nth-child(2) { width: 120px; top: 35%; left: -120px; animation-delay: 0.3s; }
.wind-lines span:nth-child(3) { width: 60px; top: 50%; left: -60px; animation-delay: 0.6s; }
.wind-lines span:nth-child(4) { width: 100px; top: 65%; left: -100px; animation-delay: 0.9s; }
.wind-lines span:nth-child(5) { width: 70px; top: 80%; left: -70px; animation-delay: 1.2s; }
.wind-lines span:nth-child(6) { width: 90px; top: 25%; left: -90px; animation-delay: 1.5s; }

@keyframes windBlow {
    0% { transform: translateX(0); opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateX(400px); opacity: 0; }
}

.rain-drops {
    position: absolute;
    inset: 0;
}

.rain-drops .drop {
    position: absolute;
    width: 2px;
    height: 20px;
    background: linear-gradient(180deg, transparent, rgba(174, 194, 224, 0.8));
    border-radius: 2px;
    animation: rainFall 1s linear infinite;
}

.rain-drops .drop:nth-child(1) { left: 10%; animation-delay: 0s; }
.rain-drops .drop:nth-child(2) { left: 20%; animation-delay: 0.1s; }
.rain-drops .drop:nth-child(3) { left: 30%; animation-delay: 0.2s; }
.rain-drops .drop:nth-child(4) { left: 40%; animation-delay: 0.3s; }
.rain-drops .drop:nth-child(5) { left: 50%; animation-delay: 0.4s; }
.rain-drops .drop:nth-child(6) { left: 60%; animation-delay: 0.5s; }
.rain-drops .drop:nth-child(7) { left: 70%; animation-delay: 0.6s; }
.rain-drops .drop:nth-child(8) { left: 80%; animation-delay: 0.7s; }
.rain-drops .drop:nth-child(9) { left: 90%; animation-delay: 0.8s; }
.rain-drops .drop:nth-child(10) { left: 15%; animation-delay: 0.15s; }
.rain-drops .drop:nth-child(11) { left: 45%; animation-delay: 0.45s; }
.rain-drops .drop:nth-child(12) { left: 75%; animation-delay: 0.75s; }

@keyframes rainFall {
    0% { transform: translateY(-20px); opacity: 0; }
    10% { opacity: 1; }
    100% { transform: translateY(400px); opacity: 0.3; }
}

.snowflakes {
    position: absolute;
    inset: 0;
}

.snowflakes .flake {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #ffffff 0%, rgba(255,255,255,0.5) 100%);
    border-radius: 50%;
    animation: snowFall 4s linear infinite;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

.snowflakes .flake:nth-child(1) { left: 5%; animation-delay: 0s; width: 10px; height: 10px; }
.snowflakes .flake:nth-child(2) { left: 15%; animation-delay: 0.5s; width: 6px; height: 6px; }
.snowflakes .flake:nth-child(3) { left: 25%; animation-delay: 1s; width: 8px; height: 8px; }
.snowflakes .flake:nth-child(4) { left: 35%; animation-delay: 1.5s; width: 7px; height: 7px; }
.snowflakes .flake:nth-child(5) { left: 45%; animation-delay: 2s; width: 9px; height: 9px; }
.snowflakes .flake:nth-child(6) { left: 55%; animation-delay: 2.5s; width: 6px; height: 6px; }
.snowflakes .flake:nth-child(7) { left: 65%; animation-delay: 3s; width: 8px; height: 8px; }
.snowflakes .flake:nth-child(8) { left: 75%; animation-delay: 3.5s; width: 7px; height: 7px; }
.snowflakes .flake:nth-child(9) { left: 85%; animation-delay: 0.3s; width: 10px; height: 10px; }
.snowflakes .flake:nth-child(10) { left: 95%; animation-delay: 0.8s; width: 6px; height: 6px; }
.snowflakes .flake:nth-child(11) { left: 12%; animation-delay: 1.3s; width: 8px; height: 8px; }
.snowflakes .flake:nth-child(12) { left: 62%; animation-delay: 1.8s; width: 9px; height: 9px; }

@keyframes snowFall {
    0% { transform: translateY(-20px) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    100% { transform: translateY(400px) rotate(360deg); opacity: 0.5; }
}

.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    filter: blur(20px);
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: inherit;
}

.cloud-1 {
    width: 100px;
    height: 40px;
    top: 30px;
    right: 20px;
    animation: cloudFloat 8s ease-in-out infinite;
}

.cloud-1::before {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 15px;
}

.cloud-1::after {
    width: 40px;
    height: 40px;
    top: -15px;
    left: 50px;
}

.cloud-2 {
    width: 70px;
    height: 30px;
    top: 80px;
    right: 60px;
    animation: cloudFloat 10s ease-in-out infinite reverse;
    opacity: 0.6;
}

.cloud-2::before {
    width: 35px;
    height: 35px;
    top: -18px;
    left: 10px;
}

.cloud-2::after {
    width: 28px;
    height: 28px;
    top: -10px;
    left: 35px;
}

@keyframes cloudFloat {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(20px); }
}

.card-detail {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 16px 24px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.weather-card:hover .card-detail {
    transform: translateY(0);
}

.card-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.card-detail-label {
    opacity: 0.6;
}

.card-detail-value {
    font-weight: 500;
}

@media (max-width: 768px) {
    .title { font-size: 36px; }
    .cards-wrapper { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
    .weather-card { height: 320px; }
    .temperature { font-size: 56px; }
    .location { font-size: 18px; }
}
