body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #e6e6fa, #f0f8ff); /* Light purple to light blue gradient */
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite; /* Slower and smoother animation */
    color: #333; /* Default text color for the page */
}

@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.navbar {
    width: 100%;
    background-color: transparent; /* Transparent navbar */
    padding: 15px 0;
    box-shadow: none; /* No shadow for the navbar */
    z-index: 30;
    position: sticky;
    top: 0;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 40px;
}

.nav-item a {
    text-decoration: none;
    color: #333; /* Dark text for navbar links */
    font-size: 1.2em;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.nav-item a:hover {
    background-color: rgba(0, 0, 0, 0.05); /* Very light hover effect */
    transform: translateY(-2px);
}

.time-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column; /* Stack date and flip clock vertically */
    justify-content: center;
    align-items: center;
    width: 100%;
    height: calc(100vh - 60px);
    gap: 20px; /* Space between date and flip clock */
}

#currentDateDisplay {
    font-size: 1.8em; /* Size as in the image */
    color: #333; /* Dark text for the date, matching navbar */
    font-weight: normal; /* Not bold */
    letter-spacing: 1px;
    margin-bottom: 20px; /* Space between date and clock */
}

.flip-clock {
    display: flex;
    gap: 20px; /* Gap between flip cards, as in the image */
    perspective: 800px;
    flex-wrap: nowrap; /* Do not wrap, keep on one line */
    justify-content: center;
}

.flip-card {
    position: relative;
    width: 100px; /* Width of each digit card, as in the image */
    height: 140px; /* Height of each digit card, as in the image */
    border-radius: 8px; /* Slightly less rounded corners */
    font-size: 6.5em; /* Larger font size for digits */
    font-weight: normal; /* Lighter font weight for digits */
    color: white; /* White digits */
    background-color: #2b2b2b; /* Dark grey background for cards */
    display: flex;
    justify-content: center;
    align-items: center; /* Center the entire card content */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Softer shadow */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle light border */
    line-height: 1; /* Essential for precise text positioning */
}

.flip-card .top,
.flip-card .bottom,
.flip-card .back .top,
.flip-card .back .bottom {
    position: absolute;
    width: 100%;
    height: 50%;
    overflow: hidden;
    border-radius: 8px; /* Match flip card border-radius */
}

.flip-card .top,
.flip-card .back .top {
    top: 0;
    background-color: #2b2b2b; /* Dark grey background */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* Very subtle separator */
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Align text to the bottom of the top half */
    padding-bottom: 0; /* No padding */
}

.flip-card .top span,
.flip-card .back .top span {
    display: block;
    transform: translateY(50%); /* Move text up to show only top half */
}

.flip-card .bottom,
.flip-card .back .bottom {
    bottom: 0;
    background-color: #2b2b2b; /* Dark grey background */
    border-top: 1px solid rgba(255, 255, 255, 0.05); /* Very subtle separator */
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align text to the top of the bottom half */
    padding-top: 0; /* No padding */
}

.flip-card .bottom span,
.flip-card .back .bottom span {
    display: block;
    transform: translateY(-50%); /* Move text down to show only bottom half */
}

.flip-card .back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-origin: center top;
    transform: rotateX(180deg);
    backface-visibility: hidden;
    transition: transform 0.6s ease-in-out;
    border-radius: 8px; /* Match flip card border-radius */
}

.flip-card.flip .back {
    transform: rotateX(0deg);
}

.separator-dots {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px; /* Space between the two dots */
    width: 20px; /* Width for the dots separator */
}

.separator-dots::before,
.separator-dots::after {
    content: '';
    display: block;
    width: 10px; /* Size of the dot */
    height: 10px; /* Size of the dot */
    background-color: #333; /* Changed to black dots */
    border-radius: 50%;
}

.fullscreen-button {
    position: fixed; /* Fixed position relative to viewport */
    bottom: 20px; /* 20px from bottom */
    right: 20px; /* 20px from right */
    background-color: #333; /* Dark background */
    color: white;
    border: none;
    border-radius: 50%; /* Circular button */
    width: 50px;
    height: 50px;
    font-size: 1.5em;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000; /* Ensure it's on top of everything */
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.fullscreen-button:hover {
    background-color: #555;
    transform: scale(1.05);
}

/* Hide button on larger screens if only for mobile */
@media (min-width: 768px) {
    .fullscreen-button {
        display: none; 
    }
}

/* Responsive adjustments for smaller screens (e.g., mobile) */
@media (max-width: 767px) {
    #currentDateDisplay {
        font-size: 1.2em; /* Smaller date font size */
        margin-bottom: 15px;
    }

    .flip-clock {
        gap: 10px; /* Reduced gap between flip cards */
    }

    .flip-card {
        width: 60px; /* Smaller width for digits */
        height: 90px; /* Smaller height for digits */
        font-size: 3.5em; /* Smaller font size for digits */
        border-radius: 6px; /* Slightly smaller border-radius */
    }

    .flip-card .top span,
    .flip-card .back .top span,
    .flip-card .bottom span,
    .flip-card .back .bottom span {
        transform: translateY(50%); /* Adjust transform for new height */
    }

    .flip-card .bottom span,
    .flip-card .back .bottom span {
        transform: translateY(-50%); /* Adjust transform for new height */
    }

    .separator-dots {
        gap: 6px; /* Smaller gap between dots */
        width: 15px; /* Smaller width for separator */
    }

    .separator-dots::before,
    .separator-dots::after {
        width: 6px; /* Smaller dot size */
        height: 6px; /* Smaller dot size */
    }

    .nav-list {
        gap: 20px; /* Reduce gap in navbar for mobile */
    }

    .nav-item a {
        font-size: 1em; /* Smaller font size for nav links */
        padding: 6px 10px;
    }

    .fullscreen-button {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
        bottom: 15px;
        right: 15px;
    }
}
