body {
  font-family: serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  margin: 0;
  background-color: #f0f0f0;
  overflow: hidden;
}

header,
main,
footer {
  position: relative;
  bottom: 0;
  z-index: 1;
}

main {
  text-align: left;
  width: 100%;
  max-width: 1100px;
  padding: 10px;
  box-sizing: border-box;
  flex: 1 0 auto;
}

.content-container {
  width: 100%;
  max-width: 1100px;
  padding: 10px;
  box-sizing: border-box;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1060px;
  padding: 10px;
  background-color: #c1e2fa;
  position: -webkit-sticky; /* For Safari */
  position: sticky;
  top: 0;
  z-index: 1000;
  border-radius: 10px;
  box-shadow: 1px 1px rgb(10, 10, 70);
}

.button-container {
  display: flex;
  gap: 10px;
  margin-right: 20px;
}

#random-word-button,
#toggle-effect-button {
  padding: 8px 16px;
  cursor: pointer;
  background-color: #040345d1;
  border-radius: 10px;
  color: white;
  font-weight: semi-bold;
  font-family: sans-serif;
  font-size: 14px;
}

#random-word-button:hover,
#toggle-effect-button:hover {
  background-color: #3060c7;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #a62b2b;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-family: sans-serif;
  font-weight: 500;
  color: #610505;
}

h1 {
  font-style: italic;
  font-weight: lighter;
  font-size: 1.25em;
  color: gray;
  margin-left: 1em;
}

h1[contenteditable="true"]:empty:before {
  content: attr(placeholder);
  color: #ccc;
}

form {
  margin-top: 35px;
  display: flex;
  justify-content: center;
  position: absolute;
  bottom: 10px;
  width: 100%;
  max-width: 1100px;
  box-sizing: border-box;
  position: -webkit-sticky; /* For Safari */
  position: sticky;
}

#new-word {
  padding: 10px;
  font-size: 12px;
  flex: 1;
  max-width: 280px;
  margin-right: 10px;
}

button {
  padding: 10px;
  font-size: 14px;
  cursor: pointer;
  background-color: #610505;
  border-radius: 10px;
  color: white;
  font-weight: semi-bold;
  font-family: sans-serif;
}

button:hover {
  background-color: #a62b2b;
}

#canvas-wrapper {
  width: 1080px;
  /* max-width: 1200px; */
  padding: 10px;
  height: 65vh;
  overflow-y: auto; /* Infinite scroll in height */
  overflow-x: hidden;
  box-sizing: border-box;
  border: 1px solid #ccc;
  background-color: white;
  margin-bottom: 0; /* No margin to avoid space between canvas and form */
  border-radius: 10px;
}

#canvas-container {
  width: 100%;
  height: auto;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  padding-left: 25px;
}

.form-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100%;
  font-size: 1em;
  z-index: 1;
  padding: 10px;
  box-sizing: border-box;
  display: flex;
  margin-top: -10px;
}

.form-container input {
  font-size: 1em;
  font-family: sans-serif;
  border-radius: 10px;
}

form {
  display: flex;
  justify-content: center;
  width: 100%;
  gap: 10px;
}

.grab-cursor {
  cursor: grab;
}

@page {
  size: auto; /* auto is the initial value */
  margin: 0; /* this affects the margin in the printer settings */
}

@media print {
  body {
    -webkit-print-color-adjust: exact; /* Chrome, Safari */
    print-color-adjust: exact; /* Firefox */
  }

  .header-container button,
  .form-container,
  .no-print {
    display: none; /* Hide elements that should not appear in the print */
  }

  .header-container {
    border: none; /* Hide the border of the header container */
    background-color: white;
/*     box-shadow: none; */
  }

  @page {
    margin: 0; /* Remove default page margin */
  }

  body {
    margin: 0; /* Remove body margin */
  }

  .header-container::after {
    content: none !important; /* Prevent header from printing */
  }

  #canvas-wrapper {
    border: none; /* Hide the border of the canvas wrapper */
  }
  
/*   svg {
    display: none !important;
  } */
}

svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: block;
  background-color: #0e4166;
  background-image: linear-gradient(
    to bottom,
    rgba(14, 65, 102, 0.86),
    #0e4166
  );
}

footer {
    width: 100vw; 
    padding: 1px;
    box-sizing: border-box;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.7); 
    color: white; 
    margin-top: 5px; 
    border-radius: 0; 
    position: fixed; 
    bottom: 0;
    left: 0; 
}

footer p {
  font-size: 0.8em;
  font-family: sans-serif;
}

footer a {
    color: #add8e6; 
    text-decoration: none; 
}

footer a:hover {
    color: #ffb6c1; 
    text-decoration: underline; 
}
