/* Enhanced 3D Perspective Effects and Engaging Animations */

/* Keyframe Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0px); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

/* Body and Global Styles */
body {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  overflow-x: hidden;
}

/* Header Styles */
.header-top-area {
  background: linear-gradient(to right, #ff9933, #ff8c1a);
  position: relative;
  overflow: hidden;
}

.header-top-area::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, #ffffff33, #ffffff66, #ffffff33);
  animation: shimmer 2s infinite;
}

.header-middle-area4 {
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.header-middle-area4:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Logo and Dice Animations */
.logo {
  transition: transform 0.5s;
  animation: float 6s ease-in-out infinite;
}

.logo:hover {
  transform: translateZ(50px) rotateY(10deg);
}

.rolldice img {
  transition: transform 0.5s;
  animation: pulse 2s infinite;
}

.rolldice img:hover {
  transform: translateZ(30px) rotate(360deg);
}

/* Result Display Enhancements */
.resultdiv {
  perspective: 1000px;
  border-radius: 15px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  overflow: hidden;
}

.resultdiv::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
  transform: rotate(45deg);
  transition: all 0.3s ease;
  opacity: 0;
}

.resultdiv:hover::before {
  opacity: 1;
  transform: rotate(45deg) translate(50%, 50%);
}

.resultdiv:hover {
  transform: translateY(-10px) rotateX(5deg);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.resultdiv .spinimage {
  transition: transform 0.5s;
}

.resultdiv:hover .spinimage {
  transform: translateZ(40px) rotateY(180deg);
}

.odometer {
  transition: transform 0.5s, color 0.3s;
}

.resultdiv:hover .odometer {
  transform: translateZ(20px) scale(1.1);
  color: #ff9933;
}

/* Table Styling */
.table {
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.table:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.table thead th {
  background-color: #ff9933;
  color: white;
  position: relative;
  overflow: hidden;
}

.table thead th::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  transition: 0.5s;
}

.table thead th:hover::after {
  transform: translateX(100%);
}

.table tbody tr {
  transition: all 0.3s ease;
}

.table tbody tr:hover {
  background-color: rgba(255, 153, 51, 0.1);
  transform: scale(1.02);
}

/* Footer and Return to Top Button */
.footer-section {
  background-color: #333;
  color: white;
  position: relative;
  overflow: hidden;
}

.footer-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(to right, #ff9933, #ff8c1a, #ff9933);
  animation: shimmer 2s infinite;
}

#return-to-top {
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

#return-to-top:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

/* Glitch Text Enhancement */
.glitch-text {
  position: relative;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch-text::before {
  left: 2px;
  text-shadow: -2px 0 #ff00c1;
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-text::after {
  left: -2px;
  text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1;
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% { clip: rect(31px, 9999px, 94px, 0); }
  4.166666667% { clip: rect(91px, 9999px, 43px, 0); }
  8.333333333% { clip: rect(65px, 9999px, 59px, 0); }
  12.5% { clip: rect(30px, 9999px, 67px, 0); }
  16.66666667% { clip: rect(75px, 9999px, 67px, 0); }
  20.83333333% { clip: rect(82px, 9999px, 54px, 0); }
  25% { clip: rect(67px, 9999px, 61px, 0); }
  29.16666667% { clip: rect(22px, 9999px, 40px, 0); }
  33.33333333% { clip: rect(39px, 9999px, 98px, 0); }
  37.5% { clip: rect(36px, 9999px, 26px, 0); }
  41.66666667% { clip: rect(33px, 9999px, 89px, 0); }
  45.83333333% { clip: rect(40px, 9999px, 88px, 0); }
  50% { clip: rect(56px, 9999px, 27px, 0); }
  54.16666667% { clip: rect(8px, 9999px, 41px, 0); }
  58.33333333% { clip: rect(50px, 9999px, 22px, 0); }
  62.5% { clip: rect(9px, 9999px, 94px, 0); }
  66.66666667% { clip: rect(31px, 9999px, 23px, 0); }
  70.83333333% { clip: rect(77px, 9999px, 61px, 0); }
  75% { clip: rect(85px, 9999px, 71px, 0); }
  79.16666667% { clip: rect(89px, 9999px, 9px, 0); }
  83.33333333% { clip: rect(33px, 9999px, 71px, 0); }
  87.5% { clip: rect(37px, 9999px, 97px, 0); }
  91.66666667% { clip: rect(12px, 9999px, 23px, 0); }
  95.83333333% { clip: rect(42px, 9999px, 53px, 0); }
  100% { clip: rect(59px, 9999px, 26px, 0); }
}

@keyframes glitch-anim2 {
  0% { clip: rect(65px, 9999px, 100px, 0); }
  4.166666667% { clip: rect(92px, 9999px, 74px, 0); }
  8.333333333% { clip: rect(42px, 9999px, 84px, 0); }
  12.5% { clip: rect(56px, 9999px, 24px, 0); }
  16.66666667% { clip: rect(34px, 9999px, 42px, 0); }
  20.83333333% { clip: rect(12px, 9999px, 67px, 0); }
  25% { clip: rect(95px, 9999px, 24px, 0); }
  29.16666667% { clip: rect(100px, 9999px, 58px, 0); }
  33.33333333% { clip: rect(83px, 9999px, 95px, 0); }
  37.5% { clip: rect(76px, 9999px, 34px, 0); }
  41.66666667% { clip: rect(77px, 9999px, 93px, 0); }
  45.83333333% { clip: rect(57px, 9999px, 72px, 0); }
  50% { clip: rect(28px, 9999px, 79px, 0); }
  54.16666667% { clip: rect(30px, 9999px, 82px, 0); }
  58.33333333% { clip: rect(36px, 9999px, 26px, 0); }
  62.5% { clip: rect(46px, 9999px, 66px, 0); }
  66.66666667% { clip: rect(93px, 9999px, 24px, 0); }
  70.83333333% { clip: rect(44px, 9999px, 39px, 0); }
  75% { clip: rect(23px, 9999px, 72px, 0); }
  79.16666667% { clip: rect(15px, 9999px, 54px, 0); }
  83.33333333% { clip: rect(19px, 9999px, 70px, 0); }
  87.5% { clip: rect(44px, 9999px, 68px, 0); }
  91.66666667% { clip: rect(62px, 9999px, 31px, 0); }
  95.83333333% { clip: rect(99px, 9999px, 61px, 0); }
  100% { clip: rect(48px, 9999px, 81px, 0); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .timefoursection h3 {
    font-size: 18px;
  }
  
  .resultdiv h2 {
    font-size: 20px;
  }

  .glitch-text {
    font-size: 24px;
  }
}
/* Existing CSS remains the same */

/* Floating Numbers Effect */
.floating-numbers {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.floating-number {
  position: absolute;
  display: block;
  list-style: none;
  width: 20px;
  height: 20px;
  background: rgba(255, 153, 51, 0.2);
  animation: animate 25s linear infinite;
  bottom: -150px;
  border-radius: 50%;
  font-size: 16px;
  color: #ff9933;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  text-shadow: 0 0 5px rgba(255, 153, 51, 0.5);
}

.floating-number:nth-child(1) {
  left: 25%;
  width: 80px;
  height: 80px;
  animation-delay: 0s;
}

.floating-number:nth-child(2) {
  left: 10%;
  width: 20px;
  height: 20px;
  animation-delay: 2s;
  animation-duration: 12s;
}

.floating-number:nth-child(3) {
  left: 70%;
  width: 20px;
  height: 20px;
  animation-delay: 4s;
}

.floating-number:nth-child(4) {
  left: 40%;
  width: 60px;
  height: 60px;
  animation-delay: 0s;
  animation-duration: 18s;
}

.floating-number:nth-child(5) {
  left: 65%;
  width: 20px;
  height: 20px;
  animation-delay: 0s;
}

.floating-number:nth-child(6) {
  left: 75%;
  width: 110px;
  height: 110px;
  animation-delay: 3s;
}

.floating-number:nth-child(7) {
  left: 35%;
  width: 150px;
  height: 150px;
  animation-delay: 7s;
}

.floating-number:nth-child(8) {
  left: 50%;
  width: 25px;
  height: 25px;
  animation-delay: 15s;
  animation-duration: 45s;
}

.floating-number:nth-child(9) {
  left: 20%;
  width: 15px;
  height: 15px;
  animation-delay: 2s;
  animation-duration: 35s;
}

.floating-number:nth-child(10) {
  left: 85%;
  width: 150px;
  height: 150px;
  animation-delay: 0s;
  animation-duration: 11s;
}

@keyframes animate {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
    border-radius: 0;
  }
  100% {
    transform: translateY(-1000px) rotate(720deg);
    opacity: 0;
    border-radius: 50%;
  }
}

/* Adjust the z-index of other elements to ensure they appear above the floating numbers */
.header-middle-area4,
.logo,
.rolldice {
  position: relative;
  z-index: 2;
}