/* Reset and base styles - explicit overflow control */
* {
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow: hidden;
  font-size: 16px;
}

body {
  height: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
  font-family: "Gudea", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 1em;
  line-height: 1.38;
  -webkit-user-select: none;
  user-select: none;
}

.app-container {
  height: 100vh;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Step Header */
.step-header {
  flex-shrink: 0;
  padding: 1.5em 2em;
  text-align: center;
  z-index: 10;
}

.step-header h2 {
  margin: 0;
  font-size: 2.3em;
  font-weight: 300;
  line-height: 1.58;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Steps Container */
.steps-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.step {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.step.active {
  display: block;
  opacity: 1;
  z-index: 1;
}

.step-content {
  height: 100%;
  overflow: hidden;
  padding: 2em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 900px;
  margin: 0 auto;
}

.step-content p {
  font-size: 1.1em;
  line-height: 1.6;
  margin: 0 0 1.5em 0;
  color: rgba(255, 255, 255, 0.95);
  text-align: left;
  max-width: 800px;
}

.step-content strong {
  font-weight: 700;
  color: rgba(255, 255, 255, 1);
}

.step-content figure {
  margin: 2em 0;
  text-align: center;
  width: 100%;
  background: rgba(0, 0, 0, 0.08);
  padding: 1em 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
}

.step-content figure.video {
  background: black;
}

.step-content img,
.step-content video {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.step-content img {
  max-height: 50vh;
}

.step-content video {
  max-height: 350px;
}

.button-container {
  margin-top: 2em;
  text-align: center;
}

.button-primary {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.9);
  padding: 12px 30px;
  font-size: 1.1em;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.button-primary:hover {
  background: rgba(255, 255, 255, 0.3);
  color: white;
}

/* Footer Navigation */
.step-footer {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2em;
  padding: 1.5em 2em;
  z-index: 10;
}

.nav-button {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.85);
  padding: 10px 20px;
  font-size: 1.1em;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 150px;
}

.nav-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

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

.nav-button#prevBtn,
.nav-button#nextBtn {
  min-width: 60px;
  font-size: 1.5em;
  padding: 10px 15px;
}

/* Color themes */
body.color.blue,
body.color-blue {
  background-color: #50c4ef;
}

body.color.green,
body.color-green {
  background-color: #a0df43;
}

body.color.darkgreen,
body.color-darkgreen {
  background-color: #bbe027;
}

body.color.darkblue,
body.color-darkblue {
  background-color: #39bced;
}

body.color.red,
body.color-red {
  background-color: #e03360;
}

body.color.yellow,
body.color-yellow {
  background-color: #f3d953;
}

/* Text colors for light backgrounds */
body.color.green .step-content p,
body.color-green .step-content p,
body.color.darkgreen .step-content p,
body.color-darkgreen .step-content p,
body.color.yellow .step-content p,
body.color-yellow .step-content p {
  color: rgba(0, 0, 0, 0.8);
}

body.color.green .step-content strong,
body.color-green .step-content strong,
body.color.darkgreen .step-content strong,
body.color-darkgreen .step-content strong,
body.color.yellow .step-content strong,
body.color-yellow .step-content strong {
  color: rgba(0, 0, 0, 0.95);
}

body.color.green .step-header h2,
body.color-green .step-header h2,
body.color.darkgreen .step-header h2,
body.color-darkgreen .step-header h2,
body.color.yellow .step-header h2,
body.color-yellow .step-header h2 {
  color: rgba(0, 0, 0, 0.85);
}

body.color.green .step-content figure,
body.color-green .step-content figure,
body.color.darkgreen .step-content figure,
body.color-darkgreen .step-content figure,
body.color.yellow .step-content figure,
body.color-yellow .step-content figure {
  border-color: rgba(0, 0, 0, 0.2);
}

/* Ensure no scrollbars anywhere */
html,
body,
.app-container,
.steps-container,
.step {
  overflow: hidden;
}

.step-content {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar but allow scrolling on step-content */
.step-content::-webkit-scrollbar {
  width: 8px;
}

.step-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

.step-content::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

.step-content::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.5);
}

/* Config Steps */
.config-step {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.config-step.active {
  display: block;
  opacity: 1;
  z-index: 2;
}

.config-content {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2em;
  max-width: 900px;
  margin: 0 auto;
}

.config-header {
  text-align: right;
  margin-bottom: 1em;
}

.config-header a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.9em;
  padding: 0.5em 1em;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.config-header a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 1);
}

.subtitle {
  display: block;
  width: 100%;
  margin: 0.25em auto 1.5em;
  font-size: 1.1em;
  font-weight: 400;
  line-height: 1.38;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

.config-buttons {
  display: flex;
  gap: 2em;
  margin-top: 2em;
  width: 100%;
}

.config-button-left,
.config-button-right {
  flex: 1;
  cursor: pointer;
  transition: all 0.1s linear;
}

.config-option {
  display: block;
  font-family: "Lato", sans-serif;
  outline: none;
  margin: 0 auto 1em;
  border: 1px solid rgba(255, 255, 255, 0.73);
  border-radius: 15px;
  background: none;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 300;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
  font-size: 2em;
  padding: 0.5em 1.5em;
  transition: all 0.2s linear;
}

.config-option:hover {
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 1);
}

.config-button-left .description,
.config-button-right .description {
  opacity: 0.5;
  min-height: 7em;
  margin: 0 0 1em 0;
  border-bottom: dashed 1px rgba(0, 0, 0, 0.3);
  font-size: 1em;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
}

.config-button-left:hover .description,
.config-button-right:hover .description {
  opacity: 0.8;
}

.config-content .details {
  position: relative;
  font-size: 1em;
  color: rgba(255, 255, 255, 0.7);
  float: left;
  width: 100%;
  list-style: disc;
  list-style-position: inside;
  font-weight: 400;
  margin: 0;
  padding: 1em 0 0 0;
  transition: color 0.1s linear;
}

.config-content .details > li {
  transition: color 0.2s linear;
  display: block;
  padding: 0.4em 0 0 2.25em;
  margin: 0.15em 0;
  border-radius: 0.3em;
  cursor: pointer;
  position: relative;
  text-indent: 0;
}

.config-content .details > li:before {
  content: "";
  position: absolute;
  left: 15px;
  top: 0.65em;
  background: rgba(255, 255, 255, 0.3);
  height: 0.65em;
  width: 0.65em;
  line-height: 2em;
  border: 0.1em solid rgba(255, 255, 255, 0.5);
  text-align: center;
  font-weight: bold;
  border-radius: 2em;
  transition: all 0.2s linear;
}

.config-button-left:hover .details > li,
.config-button-right:hover .details > li {
  color: rgba(255, 255, 255, 0.95);
}

.config-button-left:hover .details > li:before,
.config-button-right:hover .details > li:before {
  background: rgba(255, 255, 255, 0.5);
}

.config-content .details ul {
  margin-top: 0.2em;
  margin-left: 0;
  font-size: 1em;
  padding-left: 1.5em;
}

.config-content .details li li {
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.6);
}

.config-confirm-container {
  text-align: center;
  width: 100%;
  margin-top: 2em;
}

#configconfirm,
#configresults {
  margin: 2em 0;
  text-align: left;
  width: 100%;
}

#configconfirm h2,
#configresults h2 {
  font-family: "Lato", sans-serif;
  display: block;
  float: left;
  margin: 1em 0 0.2em;
  width: 100%;
  height: auto;
  border-radius: 3px;
  font-size: 1.5em;
  line-height: 1.5em;
  font-weight: 400;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.08);
  padding: 0.5em;
}

#configconfirm .details li,
#configresults .details li {
  font-size: 1.3em;
}

#configconfirm #config-disabled li,
#configresults #config-disabled li {
  opacity: 0.8;
}

/* Text colors for light backgrounds in config */
body.color.green .config-content .details,
body.color-green .config-content .details,
body.color.darkgreen .config-content .details,
body.color-darkgreen .config-content .details,
body.color.yellow .config-content .details,
body.color-yellow .config-content .details {
  color: rgba(0, 0, 0, 0.7);
}

body.color.green .config-option,
body.color-green .config-option,
body.color.darkgreen .config-option,
body.color-darkgreen .config-option,
body.color.yellow .config-option,
body.color-yellow .config-option {
  color: rgba(0, 0, 0, 0.9);
  border-color: rgba(0, 0, 0, 0.3);
}

body.color.green .config-option:hover,
body.color-green .config-option:hover,
body.color.darkgreen .config-option:hover,
body.color-darkgreen .config-option:hover,
body.color.yellow .config-option:hover,
body.color-yellow .config-option:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

body.color.green .subtitle,
body.color-green .subtitle,
body.color.darkgreen .subtitle,
body.color-darkgreen .subtitle,
body.color.yellow .subtitle,
body.color-yellow .subtitle {
  color: rgba(0, 0, 0, 0.7);
}
