* { box-sizing: border-box; } .countdown { margin: auto; margin-top: 10px; margin-bottom: 0; display: flex; width: fit-content; gap: 30px; font-family: sans-serif; } .time-section { text-align: center; font-size: 3rem; } .time-group { display: flex; gap: 10px; } .time-segment { display: block; font-size: 100px; font-weight: 900; width: 100px; } .segment-display { position: relative; height: 100%; } .segment-display__top, .segment-display__bottom { overflow: hidden; text-align: center; width: 100%; height: 50%; position: relative; } .segment-display__top { border-radius: 10px 10px 0 0; line-height: 1.5; color: #FFB341; background-color: #111; } .segment-display__bottom { border-radius: 0 0 10px 10px; line-height: 0; color: #FFB341; background-color: #222; } .segment-overlay { position: absolute; top: 0; perspective: 400px; height: 100%; width: 100%; } .segment-overlay__top, .segment-overlay__bottom { position: absolute; overflow: hidden; text-align: center; width: 100%; height: 50%; } .segment-overlay__top { border-radius: 10px 10px 0 0; top: 0; line-height: 1.5; color: #FFB341; background-color: #111; transform-origin: bottom; } .segment-overlay__bottom { border-radius: 0 0 10px 10px; bottom: 0; line-height: 0; color: #FFB341; background-color: #222; border-top: 2px solid black; transform-origin: top; } .segment-overlay.flip .segment-overlay__top { animation: flip-top 0.75s linear; } .segment-overlay.flip .segment-overlay__bottom { animation: flip-bottom 0.75s linear; } @keyframes flip-top { 0% { transform: rotateX(0deg); } 50%, 100% { transform: rotateX(-90deg); } } @keyframes flip-bottom { 0%, 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0deg); } } .countdown .time-section p{ color: white; font-family: "Agrandir-Bold"; margin: 10px; position: relative; z-index: 10; } #days2{width: 140px;} @media only screen and (max-width: 950px) {.countdown { gap: 20px;}} @media only screen and (max-width: 910px) { #days2{width: 125px;} .countdown { gap: 25px;} .time-segment {font-size: 90px; width: 90px;} .time-section {font-size: 2.8rem;}} @media only screen and (max-width: 850px) { #days2{width: 105px;} .countdown { gap: 20px;} .time-segment {font-size: 75px; width: 75px;} .time-section {font-size: 2.65rem;}} @media only screen and (max-width: 725px) { #days2{width: 82.5px;} .countdown { gap: 20px;} .time-group {gap: 8px;} .time-segment {font-size: 60px; width: 60px;} .time-section {font-size: 2.5rem;} .countdown .time-section p{margin: 8px;}} @media only screen and (max-width: 590px) { #days2{width: 67.5px;} .countdown { gap: 16px;} .time-group {gap: 7.5px;} .time-segment {font-size: 50px; width: 50px;} .time-section {font-size: 2rem;} .countdown .time-section p{margin: 7px;}} @media only screen and (max-width: 515px) { #days2{width: 55px;} .countdown { gap: 13px;} .time-group {gap: 6px;} .time-segment {font-size: 40px; width: 40px;} .time-section {font-size: 1.7rem;} .countdown .time-section p{margin: 6px;}} @media only screen and (max-width: 400px) { #days2{width: 47.5px;} .countdown { gap: 10px;} .time-group {gap: 5px;} .time-segment {font-size: 35px; width: 35px;} .time-section {font-size: 1.5rem;} .countdown .time-section p{margin: 5px;}} @media only screen and (max-width: 340px) { #days2{width: 45px;} .countdown { gap: 8px;} .time-group {gap: 5px;} .time-segment {font-size: 32px; width: 32px;} .time-section {font-size: 1.35rem;} .countdown .time-section p{margin: 4px;}}