<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Premium Weather Cards</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 100%);
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 20px;
overflow-x: auto;
}
.container {
display: flex;
gap: 24px;
flex-wrap: wrap;
justify-content: center;
max-width: 1400px;
width: 100%;
}
.weather-card {
width: 280px;
height: 380px;
border-radius: 24px;
position: relative;
overflow: hidden;
backdrop-filter: blur(20px);
border: 1px solid rgba(255, 255, 255, 0.1);
transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
cursor: pointer;
}
.weather-card:hover {
transform: translateY(-8px);
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
border-color: rgba(255, 255, 255, 0.2);
}
.card-content {
position: relative;
z-index: 10;
padding: 32px 24px;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
color: white;
}
.weather-icon {
width: 80px;
height: 80px;
margin: 0 auto 20px;
position: relative;
}
.temperature {
font-size: 48px;
font-weight: 200;
text-align: center;
margin-bottom: 8px;
letter-spacing: -2px;
}
.condition {
font-size: 18px;
font-weight: 500;
text-align: center;
opacity: 0.9;
margin-bottom: 24px;
}
.details {
display: flex;
justify-content: space-between;
font-size: 14px;
opacity: 0.8;
}
.detail-item {
text-align: center;
}
.detail-label {
display: block;
font-size: 12px;
opacity: 0.6;
margin-bottom: 4px;
}
/* Sun Card */
.sun-card {
background: linear-gradient(135deg, #ff9a56 0%, #ff6b35 50%, #f12711 100%);
}
.sun-icon {
width: 60px;
height: 60px;
background: radial-gradient(circle, #fff 30%, #ffeb3b 70%);
border-radius: 50%;
position: relative;
margin: 10px auto;
animation: sunPulse 3s ease-in-out infinite;
}
.sun-icon::before {
content: '';
position: absolute;
top: -20px;
left: -20px;
right: -20px;
bottom: -20px;
background: conic-gradient(from 0deg, transparent, #fff, transparent, #fff, transparent, #fff, transparent, #fff, transparent);
border-radius: 50%;
animation: sunRotate 8s linear infinite;
opacity: 0.6;
}
.sun-rays {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: radial-gradient(circle at center, transparent 40%, rgba(255, 255, 255, 0.1) 41%, rgba(255, 255, 255, 0.1) 42%, transparent 43%);
animation: sunRays 4s ease-in-out infinite;
}
@keyframes sunPulse {
0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(255, 235, 59, 0.5); }
50% { transform: scale(1.1); box-shadow: 0 0 40px rgba(255, 235, 59, 0.8); }
}
@keyframes sunRotate {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
@keyframes sunRays {
0%, 100% { opacity: 0.3; }
50% { opacity: 0.7; }
}
/* Rain Card */
.rain-card {
background: linear-gradient(135deg, #4a90e2 0%, #357abd 50%, #1e3c72 100%);
}
.rain-icon {
width: 70px;
height: 50px;
background: linear-gradient(135deg, #87ceeb 0%, #4682b4 100%);
border-radius: 25px 25px 25px 5px;
position: relative;
margin: 15px auto;
}
.rain-icon::before {
content: '';
position: absolute;
top: -15px;
left: 10px;
width: 30px;
height: 30px;
background: linear-gradient(135deg, #b0e0e6 0%, #87ceeb 100%);
border-radius: 50%;
}
.rain-icon::after {
content: '';
position: absolute;
top: -10px;
right: 5px;
width: 25px;
height: 25px;
background: linear-gradient(135deg, #add8e6 0%, #87ceeb 100%);
border-radius: 50%;
}
.rain-drops {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
pointer-events: none;
}
.rain-drop {
position: absolute;
width: 2px;
height: 12px;
background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), rgba(173, 216, 230, 0.6));
border-radius: 0 0 2px 2px;
animation: rainFall 1s linear infinite;
}
.rain-drop:nth-child(1) { left: 10%; animation-delay: 0s; }
.rain-drop:nth-child(2) { left: 20%; animation-delay: 0.1s; }
.rain-drop:nth-child(3) { left: 30%; animation-delay: 0.2s; }
.rain-drop:nth-child(4) { left: 40%; animation-delay: 0.3s; }
.rain-drop:nth-child(5) { left: 50%; animation-delay: 0.4s; }
.rain-drop:nth-child(6) { left: 60%; animation-delay: 0.5s; }
.rain-drop:nth-child(7) { left: 70%; animation-delay: 0.6s; }
.rain-drop:nth-child(8) { left: 80%; animation-delay: 0.7s; }
.rain-drop:nth-child(9) { left: 90%; animation-delay: 0.8s; }
@keyframes rainFall {
0% { top: -10px; opacity: 1; }
100% { top: 100%; opacity: 0; }
}
/* Snow Card */
.snow-card {
background: linear-gradient(135deg, #e6f3ff 0%, #b3d9ff 50%, #7fb8d4 100%);
color: #2c3e50;
}
.snow-icon {
width: 60px;
height: 60px;
position: relative;
margin: 10px auto;
}
.snowflake-icon {
width: 100%;
height: 100%;
background: radial-gradient(circle, #fff 20%, transparent 21%);
position: relative;
animation: snowflakeRotate 6s linear infinite;
}
.snowflake-icon::before,
.snowflake-icon::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 60px;
height: 2px;
background: #fff;
transform: translate(-50%, -50%);
}
.snowflake-icon::before {
transform: translate(-50%, -50%) rotate(45deg);
}
.snowflake-icon::after {
transform: translate(-50%, -50%) rotate(-45deg);
}
.snow-particles {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
pointer-events: none;
}
.snowflake {
position: absolute;
color: rgba(255, 255, 255, 0.8);
font-size: 14px;
animation: snowFall 3s linear infinite;
}
.snowflake:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 3s; }
.snowflake:nth-child(2) { left: 20%; animation-delay: 0.5s; animation-duration: 3.5s; }
.snowflake:nth-child(3) { left: 30%; animation-delay: 1s; animation-duration: 2.8s; }
.snowflake:nth-child(4) { left: 40%; animation-delay: 1.5s; animation-duration: 3.2s; }
.snowflake:nth-child(5) { left: 50%; animation-delay: 2s; animation-duration: 2.9s; }
.snowflake:nth-child(6) { left: 60%; animation-delay: 2.5s; animation-duration: 3.1s; }
.snowflake:nth-child(7) { left: 70%; animation-delay: 3s; animation-duration: 3.3s; }
.snowflake:nth-child(8) { left: 80%; animation-delay: 3.5s; animation-duration: 2.7s; }
.snowflake:nth-child(9) { left: 90%; animation-delay: 4s; animation-duration: 3.4s; }
@keyframes snowFall {
0% { top: -10px; opacity: 1; transform: translateX(0px) rotate(0deg); }
100% { top: 100%; opacity: 0; transform: translateX(20px) rotate(360deg); }
}
@keyframes snowflakeRotate {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
/* Wind Card */
.wind-card {
background: linear-gradient(135deg, #74b9ff 0%, #0984e3 50%, #2d3436 100%);
}
.wind-icon {
width: 70px;
height: 50px;
position: relative;
margin: 15px auto;
}
.wind-line {
position: absolute;
height: 3px;
background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
border-radius: 2px;
animation: windFlow 2s ease-in-out infinite;
}
.wind-line:nth-child(1) {
top: 10px;
width: 50px;
left: 0;
animation-delay: 0s;
}
.wind-line:nth-child(2) {
top: 25px;
width: 60px;
left: 10px;
animation-delay: 0.3s;
}
.wind-line:nth-child(3) {
top: 40px;
width: 45px;
left: 5px;
animation-delay: 0.6s;
}
.wind-particles {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
pointer-events: none;
}
.wind-particle {
position: absolute;
width: 20px;
height: 2px;
background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.6), transparent);
border-radius: 1px;
animation: windParticle 1.5s linear infinite;
}
.wind-particle:nth-child(1) { top: 20%; animation-delay: 0s; }
.wind-particle:nth-child(2) { top: 35%; animation-delay: 0.2s; }
.wind-particle:nth-child(3) { top: 50%; animation-delay: 0.4s; }
.wind-particle:nth-child(4) { top: 65%; animation-delay: 0.6s; }
.wind-particle:nth-child(5) { top: 80%; animation-delay: 0.8s; }
@keyframes windFlow {
0%, 100% { transform: translateX(0px); opacity: 0.5; }
50% { transform: translateX(10px); opacity: 1; }
}
@keyframes windParticle {
0% { left: -20px; opacity: 0; }
20% { opacity: 1; }
80% { opacity: 1; }
100% { left: 100%; opacity: 0; }
}
.title {
color: rgba(255, 255, 255, 0.9);
font-size: 32px;
font-weight: 300;
text-align: center;
margin-bottom: 40px;
letter-spacing: -1px;
}
@media (max-width: 768px) {
.container {
flex-direction: column;
align-items: center;
}
.weather-card {
width: 100%;
max-width: 320px;
}
}
</style>
</head>
<body>
<h1 class="title">Premium Weather</h1>
<div class="container">
<!-- Sun Card -->
<div class="weather-card sun-card">
<div class="sun-rays"></div>
<div class="card-content">
<div class="weather-icon">
<div class="sun-icon"></div>
</div>
<div class="temperature">28°</div>
<div class="condition">Sunny</div>
<div class="details">