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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: auto;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    transition: background 1s ease-in-out;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    color: white;
    font-size: 3rem;
    margin-bottom: 40px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    font-weight: 300;
    letter-spacing: 2px;
}

.clocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.clock-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 30px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.clock-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.city-name {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 10px;
    font-weight: 600;
}

.timezone {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.clock-container {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    position: relative;
    perspective: 1000px;
}

.clock {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    box-shadow: 
        inset 0 0 0 15px rgba(255, 255, 255, 0.1),
        inset 0 0 0 16px rgba(0, 0, 0, 0.1),
        0 10px 30px rgba(0, 0, 0, 0.4);
    transform-style: preserve-3d;
    animation: clockRotate 20s infinite linear;
}

@keyframes clockRotate {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    25% { transform: rotateX(5deg) rotateY(90deg); }
    50% { transform: rotateX(0deg) rotateY(180deg); }
    75% { transform: rotateX(-5deg) rotateY(270deg); }
    100% { transform: rotateX(0deg) rotateY(360deg); }
}

.clock::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #333;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.hour-marks {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.hour-mark {
    position: absolute;
    width: 2px;
    height: 20px;
    background: #333;
    top: 10px;
    left: 50%;
    transform-origin: 1px 90px;
    transform: translateX(-50%);
}

.hour-mark.major {
    width: 4px;
    height: 25px;
    background: #000;
    top: 7px;
}

.number {
    position: absolute;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    transform: translate(-50%, -50%);
}

.hand {
    position: absolute;
    background: #333;
    transform-origin: bottom center;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.hour-hand {
    width: 6px;
    height: 50px;
    left: 50%;
    bottom: 50%;
    margin-left: -3px;
    background: linear-gradient(to top, #333, #666);
    z-index: 6;
}

.minute-hand {
    width: 4px;
    height: 70px;
    left: 50%;
    bottom: 50%;
    margin-left: -2px;
    background: linear-gradient(to top, #333, #555);
    z-index: 7;
}

.second-hand {
    width: 2px;
    height: 80px;
    left: 50%;
    bottom: 50%;
    margin-left: -1px;
    background: linear-gradient(to top, #ff4444, #ff6666);
    z-index: 8;
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.digital-time {
    font-size: 1.2rem;
    color: white;
    font-weight: 600;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
}

.date-info {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin-top: 10px;
}

/* Background themes based on time */
.morning {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
}

.day {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.evening {
    background: linear-gradient(135deg, #ff8a80 0%, #ea80fc 100%);
}

.night {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.weather-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    opacity: 0.7;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .clocks-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .clock-container {
        width: 180px;
        height: 180px;
    }
}