body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  margin: 0;
  padding: 0;
  align-items: center;
  font-family: Arial, sans-serif;
  font-size: 130%;
  overflow-x: hidden;
  position: relative;
}

a {
  color: black;
  text-decoration: none;

}

a:hover {
  text-decoration: underline;
}

h1 {
  margin-top: 33px;
  margin-bottom: 0.5rem;
  text-align: center;
}

h3 {
  text-align: center;
}

h4 {
  text-align: center;
  margin: 0.5rem 0;
}

footer {
  margin-top: auto;
  font-size: 0.8em;
  text-align: center;
  padding: 1rem;
  width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
  max-width: 100%;
  color: rgba(0, 0, 0, 0.56);
}

.buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 0.5rem 0;
  padding: 0 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.button:hover {
  background-color: #f0f0f0;
}

.button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button svg {
  vertical-align: middle;
}

.code-section {
  margin: 2rem 0 0.5rem 0;
  text-align: center;
  width: 80%;
  max-width: 600px;
}

.code-title {
  font-size: 0.9em;
  margin-bottom: 0.5rem;
  color: #666;
}

.code-block {
  display: block;
  background-color: #f5f5f5;
  padding: 1rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9em;
  overflow-x: auto;
  white-space: nowrap;
  border: 1px solid #ddd;
  cursor: pointer;
  position: relative;
  transition: background-color 0.2s ease;
}

.code-block:hover {
  background-color: #eaeaea;
}

.code-block.copied {
  background-color: #e0ffe0;
}

.code-block::after {
  content: 'Click to copy';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8em;
  color: #666;
  opacity: 0.7;
}

.code-block.copied::after {
  content: 'Copied!';
  color: #28a745;
}

.bottom-nav {
  text-align: center;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  padding: 0 1rem;
  font-size: 0.8em;
  box-sizing: border-box;
  max-width: 100%;
  color: rgba(0, 0, 0, 0.56);
}

.nav-link {
  color: inherit;
  text-decoration: none;
  opacity: 0.8;
}

.nav-link::before {
  content: '[';
}

.nav-link::after {
  content: ']';
}

.nav-link:hover {
  text-decoration: underline;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  flex: 1;
}

.footer-container {
  width: 100%;
  margin-top: auto;
  box-sizing: border-box;
  max-width: 100%;
}

.video-container {
  width: 80%;  /* Match code-section width */
  max-width: 600px;
  margin: 2rem auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

.demo-video {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  max-width: 100%;  /* Ensure video doesn't overflow container */
}

/* Add media query for mobile devices */
@media (max-width: 600px) {
  body {
    font-size: 110%;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  .buttons {
    flex-direction: column;
    width: 80%;
    max-width: 300px;
    align-items: center;
    margin: 2rem auto;
  }

  .button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .code-section {
    width: 90%;
    margin: 0.5rem auto;
  }

  .code-block {
    font-size: 0.85em;
    padding: 0.75rem 3.5rem 0.75rem 0.75rem;
    overflow-x: scroll;
    -webkit-overflow-scrolling: touch;
  }

  .code-title {
    font-size: 0.85em;
  }

  footer {
    font-size: 0.75em;
    margin-top: auto;
    padding: 0.5rem;
    word-wrap: break-word;
    max-width: 100%;
    line-height: 1.4;
  }

  .code-block::after {
    font-size: 0.75em;
    right: 5px;
    width: 3rem;
    text-align: center;
    white-space: normal;
    line-height: 1.2;
  }

  .bottom-nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
    padding: 0 0.5rem 0.5rem;
    font-size: 0.75em;
    box-sizing: border-box;
  }

  .video-container {
    width: 90%;  /* Match code-section width on mobile */
    padding: 0;
  }
}

/* Add scaling for larger screens */
@media (min-width: 1440px) {
  body {
    font-size: 150%;
  }

  .code-section {
    max-width: 800px;
  }

  .video-container {
    max-width: 800px;
  }
}

@media (min-width: 1920px) {
  body {
    font-size: 170%;
  }

  .code-section {
    max-width: 1000px;
  }

  .video-container {
    max-width: 1000px;
  }
}

@media (min-width: 2560px) {
  body {
    font-size: 200%;
  }

  .code-section {
    max-width: 1200px;
  }

  .video-container {
    max-width: 1200px;
  }

  .corner-ribbon {
    font-size: 18px;
    width: 250px;
    right: -60px;
    top: 40px;
  }
}

.corner-ribbon {
  position: fixed;
  top: 25px;
  right: -50px;
  width: 200px;
  background-color: #2c2c2c;
  color: #fff;
  text-align: center;
  transform: rotate(45deg);
  padding: 5px;
  font-size: 14px;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
}

.demo-video {
  cursor: pointer;
}