/* Global Styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #e6f0e9, #e9e6f0);
  color: #333;
  margin: 0;
  padding: 0;
}

.page-title {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  text-align: center;
  padding: 2rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
}

h1.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.demo-nav ul {
  display: flex;
  justify-content: center;
  gap: 1rem;
  list-style: none;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(6px);
  margin: 0;
  padding: 1rem;
}

.demo-nav a {
  text-decoration: none;
  color: #6b4fa3;
  font-weight: bold;
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
}

.demo {
  background: rgba(255, 255, 255, 0.5);
  padding: 1rem;
  border-radius: 1rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(8px);
}

.box {
  width: 100px;
  height: 100px;
  background-color: #b4d3c4;
  margin: 1rem auto;
  transition: all 1s ease;
  border-radius: 0.5rem;
}

/* Unique Hover Effects */
.delay .box:hover {
  background-color: #6b4fa3;
  transform: translateX(50px);
  border-radius: 25%;
}
.duration .box:hover {
  background-color: #c8b3ee;
  transform: rotate(360deg);
  border-radius: 0;
}
.property .box:hover {
  background-color: #6b4fa3;
}
.linear .box:hover {
  background-color: #c8b3ee;
  transform: scale(1.4);
}
.ease-in .box:hover {
  background-color: #6b4fa3;
  transform: scaleX(1.4);
}
.ease-out .box:hover {
  background-color: #b4d3c4;
  transform: scaleY(1.4);
}
.ease-in-out .box:hover {
  background-color: #6b4fa3;
  transform: rotate(-20deg) scale(1.2);
}
.cubic .box:hover {
  background-color: #c8b3ee;
  transform: skew(15deg, 15deg);
}

/* Transition Variants */
.delay .box {
  transition-delay: 1.2s;
}
.duration .box {
  transition-duration: 3s;
}
.property .box {
  transition-property: background-color;
  transition-duration: 1.5s;
}
.linear .box {
  transition-timing-function: linear;
  transition-duration: 2s;
}
.ease-in .box {
  transition-timing-function: ease-in;
  transition-duration: 2.5s;
}
.ease-out .box {
  transition-timing-function: ease-out;
  transition-duration: 2.5s;
}
.ease-in-out .box {
  transition-timing-function: ease-in-out;
  transition-duration: 2.5s;
}
.cubic .box {
  transition-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55);
  transition-duration: 2.5s;
}

/* Real-world style card */
.card {
  max-width: 300px;
  margin: 2rem auto;
  padding: 1.5rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.4);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(6px);
  transition: transform 0.6s ease, box-shadow 0.6s ease;
}

.card:hover {
  transform: translateY(-15px) scale(1.08);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25);
}

.timing-legend {
  background: rgba(255, 255, 255, 0.6);
  padding: 1rem 2rem;
  margin: 1rem auto;
  max-width: 800px;
  border-left: 4px solid #6b4fa3;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-radius: 0.5rem;
}

@media screen and (max-width: 600px) {
  .demo-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
  .demo-nav ul {
    flex-direction: column;
    align-items: center;
  }
}

