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

body {
    display: flex;
    margin: 0;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: radial-gradient(circle at center, #1a1a2e, #16213e, #0f3460, black);
    /* animation: shimmer 10s infinite alternate; */
    color: white;
    font-family: 'Poppins', sans-serif;
    position: relative;
    overflow: hidden;
}


  /* Wavy Background Layer */
body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05), transparent);
    opacity: 0.3;
    animation: wavyEffect 6s infinite alternate ease-in-out;
}

/* Keyframe Animation for Waves */
@keyframes wavyEffect {
    0% {
        transform: scale(1.02) translateY(-10px);
    }
    50% {
        transform: scale(1.05) translateY(10px);
    }
    100% {
        transform: scale(1.02) translateY(-10px);
    }
}

      

/* Title */
.title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffcc00;
    text-shadow: 0 0 20px rgba(255, 204, 0, 1), 0 0 40px rgba(255, 204, 0, 0.8);
}

/* Clock Container */
.clock-container {
    text-align: center;
}

/* Clock Base */
.clock {
    width: 90vmin;
    height: 90vmin;
    max-width: 400px;
    max-height: 400px;
    background: radial-gradient(circle, #2b2b2b, black);
    border-radius: 50%;
    border: 10px solid rgba(255, 255, 255, 0.3);
    position: relative;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.2), 
                0 0 50px rgba(255, 255, 255, 0.1),
                0 0 80px rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease-in-out;
    animation: clockGlow 5s infinite alternate;
}

/* Outer Glow Animation */
@keyframes clockGlow {
    0% { box-shadow: 0 0 50px rgba(255, 255, 255, 0.3); }
    100% { box-shadow: 0 0 100px rgba(255, 255, 255, 0.6); }
}

/* Clock Hands */
.hand {
    position: absolute;
    transform-origin: 50% 100%;
    bottom: 50%;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 5px;
    transition: all 0.2s ease-in-out;
}

/* Hour Hand - Glowing Gold */
.hour-hand {
    width: 10px;
    height: 90px;
    background: linear-gradient(to bottom, #ffcc00, #cc9900);
    box-shadow: 0 0 20px rgba(255, 204, 0, 1);
}

/* Minute Hand - Electric Blue */
.minute-hand {
    width: 6px;
    height: 130px;
    background: linear-gradient(to bottom, #00ccff, #0099cc);
    box-shadow: 0 0 20px rgba(0, 204, 255, 1);
}

/* Second Hand - Neon Red with Pulsating Glow */
.second-hand {
    width: 3px;
    height: 150px;
    background: red;
    box-shadow: 0 0 30px rgba(255, 0, 0, 1);
    animation: glowFlicker 1s infinite alternate, smoothSwing 0.5s ease-in-out;
    transition: none;
}

/* Glowing Flicker Animation */
@keyframes glowFlicker {
    0% { box-shadow: 0 0 25px rgba(255, 0, 0, 0.8); }
    100% { box-shadow: 0 0 40px rgba(255, 0, 0, 1); }
}

/* Smooth Swing Effect for Second Hand */
@keyframes smoothSwing {
    0% { transform: translateX(-50%) rotate(-2deg); }
    100% { transform: translateX(-50%) rotate(2deg); }
}

/* Date Display */
.date-display {
    font-size: 18px;
    color: #f1c40f;
    text-align: center;
    margin-top: 15px;
    text-shadow: 0 0 10px rgba(255, 204, 0, 1);
}

/* 3D Glowing Numbers */
.num {
    position: absolute;
    font-size: 28px;
    font-weight: bold;
    transform: translate(-50%, -50%);
    color: #ffffff;
    text-shadow: 2px 2px 15px rgb(255, 255, 255);
}

/* Center Circle */
.center-circle {
    width: 20px;
    height: 20px;
    background: black;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px rgba(0, 0, 0, 1), 
                inset 0 0 10px rgba(255, 255, 255, 0.6);
}

/* 📱 Fully Responsive */
@media (max-width: 500px) {
    .clock {
        width: 80vmin;
        height: 80vmin;
        border-width: 8px;
    }

    .num {
        font-size: 22px;
    }

    .hour-hand {
        height: 70px;
        width: 8px;
    }

    .minute-hand {
        height: 100px;
        width: 5px;
    }

    .second-hand {
        height: 120px;
        width: 2px;
    }

    .center-circle {
        width: 14px;
        height: 14px;
    }
}
