/* Base styles */
body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #0a0a0a; /* Dark background for AMOLED effect */
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: white;
    overflow: hidden;
}

.clock-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.clock {
    font-size: 8vw;
    font-weight: 300;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    background: radial-gradient(circle, #1e1e1e, #111);
    padding: 2vw 4vw;
    border-radius: 2vw;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 255, 255, 0.2) inset;
    color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease-in-out;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 25px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 255, 255, 0.2) inset;
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.7), 0 0 25px rgba(255, 255, 255, 0.4) inset;
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 25px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 255, 255, 0.2) inset;
    }
}

.clock:before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 2vw;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.2);
    animation: glow 2s infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.2);
    }
    to {
        box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.7), 0 0 25px rgba(255, 255, 255, 0.4);
    }
}

/* Beats animation */
.beats-container {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    position: absolute;
    bottom: 20px;
}

.beat {
    width: 10px;
    height: 30px;
    background: linear-gradient(180deg, #f44848, #ff7f00, #d07ba0, #ced6e0, #50d287, #e4a25b, #eb913c);
    background-size: 200% 200%;
    animation: beat 1s infinite ease-in-out, gradientShift 3s infinite ease-in-out;
    border-radius: 5px;
}

.beat:nth-child(1) {
    animation-delay: 0s;
}

.beat:nth-child(2) {
    animation-delay: 0.2s;
}

.beat:nth-child(3) {
    animation-delay: 0.4s;
}

.beat:nth-child(4) {
    animation-delay: 0.6s;
}

.beat:nth-child(5) {
    animation-delay: 0.8s;
}

@keyframes beat {
    0%, 100% {
        transform: scaleY(1);
    }
    50% {
        transform: scaleY(2.5);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@media (max-width: 600px) {
    .clock {
        font-size: 12vw;
        padding: 3vw 6vw;
    }

    .clock:before {
        border-radius: 5vw;
    }

    .beats-container {
        margin-top: 10px;
    }

    .beat {
        width: 8px;
        height: 20px;
    }
}
