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

html,
body {
    height: 100%;
    width: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 40px;
    box-shadow:
        0 8px 32px 0 rgba(31, 38, 135, 0.37),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.18);
    animation: float 6s ease-in-out infinite;
}

.clock-title {
    font-size: 48px;
    font-weight: 300;
    color: #fff;
    text-shadow:
        0 0 20px rgba(255, 255, 255, 0.5),
        0 4px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
    text-align: center;
    letter-spacing: 2px;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.clock {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 0;
    margin: 0;
}

li {
    list-style: none;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px 30px;
    min-width: 150px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.time-unit span {
    font-size: 80px;
    font-weight: 300;
    color: #fff;
    text-shadow:
        0 0 20px rgba(255, 255, 255, 0.5),
        0 4px 8px rgba(0, 0, 0, 0.3);
}

.label {
    font-size: 14px !important;
    font-weight: 400 !important;
    color: rgba(255, 255, 255, 0.8) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: none !important;
}

li::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

li:hover::before {
    left: 100%;
}

li:hover {
    transform: translateY(-5px);
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.clock li:nth-child(1) {
    animation: pulse 2s ease-in-out infinite;
}

.clock li:nth-child(2) {
    animation: pulse 2s ease-in-out infinite 0.5s;
}

.clock li:nth-child(3) {
    animation: pulse 2s ease-in-out infinite 1s;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Add subtle separators */
.clock li:nth-child(1)::after,
.clock li:nth-child(2)::after {
    content: ':';
    position: absolute;
    right: -25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 60px;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0.3;
    }
}

/* Style for the AM/PM indicator */
.clock li:nth-child(4) {
    min-width: 80px; /* smaller width */
}

#ampm {
    font-size: 40px !important; /* smaller font size */
    font-weight: 400 !important;
}

/* Date container */
.date-container {
    margin-top: 30px;
    text-align: center;
}

#date {
    font-size: 20px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 20px;
    }

    li {
        font-size: 60px;
        padding: 15px 20px;
        min-width: 90px;
    }

    .clock li:not(:last-child)::after {
        font-size: 45px;
        right: -20px;
    }
}

@media (max-width: 480px) {
    .clock {
        flex-direction: column;
        gap: 15px;
    }

    .clock li:not(:last-child)::after {
        display: none;
    }

    li {
        font-size: 50px;
        padding: 10px 15px;
        min-width: 80px;
    }
}