.carousel {
  display: flex;
  overflow: hidden;
  width: 300px;
}

.carousel img {
  width: 300px;
  transition: transform 0.5s ease-in-out;
}

.animated-box-1 {
  width: 100px;
  height: 100px;
  background-color: red;
  position: relative;
}

.animated-box-2 {
  width: 100px;
  height: 100px;
  background-color: blue;
  position: relative;
}

.section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  background-color: #f9f9f9;
}

.demo-box {
  min-height: 100px;
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.paint-demo {
  width: 200px;
  height: 100px;
  background-color: #ff5555;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

.layout-shift-demo {
  width: 200px;
  height: 100px;
  background-color: #55aaff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: width 0.3s ease;
}

.layer-demo {
  height: 270px;
  position: relative;
  overflow: hidden;
  background-color: #f0f0f0;
}

.dynamic-content {
  width: 100%;
  height: 50px;
  background-color: lightcoral;
  margin: 10px 0;
}

.layer {
  width: 150px;
  height: 80px;
  margin: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  border-radius: 5px;
}

.layer1 {
  background-color: #5555ff;
  transform: translateZ(0);
  /* Promotes to a layer */
}

.layer2 {
  background-color: #55aa55;
  will-change: transform;
  /* Promotes to a layer */
}

.layer3 {
  background-color: #aa5555;
  /* Not promoted */
}

.animation-container {
  height: 100px;
  width: 100%;
  position: relative;
  overflow: hidden;
  background-color: #eee;
  margin-top: 10px;
}

.moving-element {
  width: 50px;
  height: 50px;
  background-color: #aa55aa;
  position: absolute;
  top: 25px;
  left: 0;
  border-radius: 50%;
}

.scroll-container {
  height: 150px;
  overflow-y: scroll;
  border: 1px solid #ddd;
  background-color: white;
}

.scroll-content {
  padding: 1rem;
}

.scroll-items {
  /* Will be populated by JavaScript */
}

.media-content {
  padding: 1rem;
  background-color: #fff;
  color: #333;
}

.print-only {
  display: none;
}

@media print {
  .screen-only {
    display: none;
  }

  .print-only {
    display: block;
    color: black;
    font-weight: bold;
  }
}

@media (prefers-color-scheme: dark) {
  .dark-mode-content {
    background-color: #333;
    color: #fff;
    padding: 10px;
  }
}

.dark-mode-content {
  background-color: #f5f5f5;
  color: #222;
  padding: 10px;
  margin-top: 10px;
  border-radius: 5px;
}

.color-boxes {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.color-box {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.red {
  background-color: #ff0000;
}

.green {
  background-color: #00ff00;
  color: #333;
}

.blue {
  background-color: #0000ff;
}

.yellow {
  background-color: #ffff00;
  color: #333;
}

.purple {
  background-color: #9900cc;
}

/* Font Demo Styles */
.font-samples {
  padding: 15px;
  background-color: white;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.font-samples p {
  margin: 15px 0;
  padding: 10px;
  border-radius: 3px;
  background-color: #f9f9f9;
}

.font-system {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
}

.font-serif {
  font-family: "Times New Roman", Times, serif;
  font-size: 16px;
}

.font-mono {
  font-family: "Courier New", Courier, monospace;
  font-size: 16px;
}

.font-custom {
  font-family: "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif;
  font-size: 16px;
  font-weight: 300;
}

/* Ad Frames Demo Styles */
.page-mockup {
  border: 1px solid #ddd;
  background-color: white;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mockup-header {
  background-color: #4a4a4a;
  color: white;
  padding: 15px;
  font-weight: bold;
  text-align: center;
}

.mockup-content {
  display: flex;
  min-height: 200px;
}

.mockup-text {
  flex: 1;
  padding: 15px;
}

.mockup-footer {
  padding: 15px;
  background-color: #f0f0f0;
  border-top: 1px solid #ddd;
}

.ad-frame {
  border: 2px dashed #999;
  background-color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #666;
}

.ad-frame-sidebar {
  width: 120px;
  margin: 15px 15px 15px 0;
}

.ad-frame-banner {
  height: 90px;
  width: 100%;
}

.ad-content {
  padding: 10px;
  text-align: center;
  font-weight: bold;
}

.tips {
  background-color: #f0f7ff;
  border-left: 4px solid #0066cc;
  padding: 1rem;
  margin-top: 1rem;
}

.instructions,
.best-practices,
.exercise {
  background-color: #f5f5f5;
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

kbd {
  background-color: #f1f1f1;
  border: 1px solid #ccc;
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
  color: #333;
  display: inline-block;
  font-size: 0.9em;
  padding: 2px 5px;
  margin: 0 2px;
}