.demo-container {
  padding: 20px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  margin: 20px 0;
  background: #f9f9f9;
}

.hover-button {
  background: #007bff;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 10px;
}

/* Default state for touch devices */
.hover-button {
  background: #007bff;
}

/* Hover effects only for devices that can hover */
@media (hover: hover) {
  .hover-button:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  }
}

/* Focus styles for accessibility */
.hover-button:focus {
  outline: 2px solid #ffc107;
  outline-offset: 2px;
}

.navigation-menu {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  background: #333;
  border-radius: 8px;
  overflow: hidden;
}

.navigation-menu li {
  border-bottom: 1px solid #555;
}

.navigation-menu li:last-child {
  border-bottom: none;
}

.nav-link {
  display: block;
  color: white;
  text-decoration: none;
  padding: 15px 20px;
  transition: background-color 0.3s ease;
}

/* Touch-first approach - no hover styles by default */
@media (hover: hover) {
  .nav-link:hover {
    background: #555;
    padding-left: 30px;
  }
}

.nav-link:focus {
  background: #007bff;
  outline: none;
}

.card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  }
}

.card h3 {
  margin: 0 0 10px 0;
  color: #333;
}

.card p {
  margin: 0;
  color: #666;
  line-height: 1.5;
}

.tooltip-container {
  position: relative;
  display: inline-block;
  margin: 20px;
}

.tooltip-trigger {
  background: #28a745;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
}

.tooltip-content {
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
}

.tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #333;
}

/* Only show tooltip on hover for hover-capable devices */
@media (hover: hover) {
  .tooltip-container:hover .tooltip-content {
    opacity: 1;
    visibility: visible;
  }
}

/* Alternative for touch devices - show on focus */
.tooltip-container:focus-within .tooltip-content {
  opacity: 1;
  visibility: visible;
}

.advanced-demo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.feature-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px 20px;
  border-radius: 12px;
  text-align: center;
  transition: all 0.4s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.6s ease;
}

@media (hover: hover) {
  .feature-card:hover {
    transform: scale(1.05) rotate(1deg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  }
  
  .feature-card:hover::before {
    left: 100%;
  }
}

.feature-card h4 {
  margin: 0 0 15px 0;
  font-size: 1.2em;
}

.feature-card p {
  margin: 0;
  opacity: 0.9;
  line-height: 1.4;
}