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

html, body {
    height: 100%; /* Ensure the body takes the full height */
    overflow: hidden; /* Prevent scrolling */
    margin: 0; /* Remove default margins */
}

body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f0f0f0;
    touch-action: none; /* Prevent touch scrolling */
    user-select: none; /* For modern browsers */
    -webkit-user-select: none; /* For Safari */
    -moz-user-select: none; /* For Firefox */
    -ms-user-select: none; /* For Internet Explorer/Edge */
}

.allWrapper {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Space between rows */
    align-items: center;
    height: 100vh; /* Full viewport height */
    width: 100vw; /* Full viewport width */
    overflow: hidden;
    box-sizing: border-box;
}

.paceHelperRow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Space between carousels and separators */
}

.paceHelperRowPaddingBelow {
    padding-bottom: 15px;
}

.carousel-container {
    position: relative;
    width: 90px;
    height: 60px; /* Only show current number initially */
    overflow: hidden;
    border: 2px solid #ccc;
    border-radius: 10px;
    text-align: center;
    background-color: white;
    cursor: pointer;
    transition: height 0.3s ease; /* Smooth transition for height */
}

.carousel {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: top 0.2s ease-in-out;
}

.numberMinutes, .numberSeconds, .numberPaceType, .numberElapHours, .numberElapMinutes, .numberElapSeconds, .numberDistanceType {
    font-size: 36px;
    height: 60px;
    line-height: 60px;
    font-weight: bold;
    user-select: none;
    opacity: 0; /* Initially hidden (faded) */
    transition: opacity 0.3s ease;
}

#currMinutes, #currSeconds, #currPaceType, #currElapHours, #currElapMinutes,  #currElapSeconds, #currDistanceType {
    color: #000;
    font-size: 40px;
    font-weight: bold;
    opacity: 1; /* Current number is fully visible */
}

.carousel-container.active {
    height: 180px; /* Expand to show neighboring numbers */
}

.carousel-container.active .numberMinutes, .carousel-container.active .numberSeconds, .carousel-container.active .numberPaceType,
.carousel-container.active .numberElapHours, .carousel-container.active .numberElapMinutes, .carousel-container.active .numberElapSeconds,
.carousel-container.active .numberDistanceType {
    opacity: 0.3; /* Fade effect for neighboring numbers */
}

.carousel-container.active #currMinutes, .carousel-container.active #currSeconds, .carousel-container.active #currPaceType,
.carousel-container.active #currElapHours, .carousel-container.active #currElapMinutes, .carousel-container.active #currElapSeconds,
.carousel-container.active #currDistanceType {
    opacity: 1; /* Current number stays fully visible */
}

/* Style for colon separator */
.clock-separator {
    font-size: 40px;
    font-weight: bold;
    margin: 0 1px; /* Add spacing between carousels */
    color: #000;
}

.clock-separator-hidden {
    font-size: 40px;
    font-weight: bold;
    margin: 0 1px;
    color: #000;
    visibility: hidden;
}

#shareButton {
    padding: 10px 20px;
    font-size: 18px;
    font-weight: bold;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#shareButton:hover {
    background-color: #45a049;
}

#copyMessage {
    position: absolute;
    top: 175px;
    background-color: #333;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    opacity: 0;
    display: none;
    transition: opacity 0.3s ease;
    width: max-content;
}
