:root {
  --background: 0 0% 8%;
  --foreground: 0 0% 90%;
  --card: 0 0% 12%;
  --card-foreground: 0 0% 90%;
  --primary: 0 70% 45%;
  --primary-foreground: 0 0% 100%;
  --secondary: 0 0% 18%;
  --secondary-foreground: 0 0% 90%;
  --muted: 0 0% 15%;
  --muted-foreground: 0 0% 55%;
  --accent: 0 70% 35%;
  --accent-foreground: 0 0% 100%;
  --destructive: 0 85% 50%;
  --destructive-foreground: 0 0% 100%;
  --success: 145 65% 50%;
  --success-foreground: 0 0% 100%;
  --border: 0 0% 25%;
  --input: 0 0% 25%;
  --ring: 0 70% 45%;
  --radius: 0.5rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* iphone safe area */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  /* prevent iOS bounce scrolling */
  overscroll-behavior: none;
  /* prevent the text size adjustment on iOS */
  -webkit-text-size-adjust: 100%;
}

#root {
  min-height: 100vh;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: hsl(var(--background));
  border-bottom: 1px solid hsl(var(--border));
  z-index: 50;
  /* iPhone Safe Area Support */
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.875rem 1.25rem; /* Smaller padding */
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  border: 2px solid hsl(var(--foreground));
  padding: 0.75rem 2rem; /* Smaller padding */
}

.nav-title {
  font-size: 1.25rem; /* Smaller font */
  font-weight: 600;
}

.nav-items {
  display: flex;
  gap: 0.75rem; /* Smaller gap */
}

.nav-button {
  border: 2px solid hsl(var(--foreground));
  padding: 0.625rem 1.5rem; /* Smaller padding */
  font-size: 1rem; /* Smaller font */
  font-weight: 500;
  background: transparent;
  color: hsl(var(--foreground));
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-button.default {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.nav-button.outline {
  background: transparent;
  color: hsl(var(--foreground));
}

.nav-button:hover {
  opacity: 0.8;
}

/* Page Container */
.page-container {
  min-height: 100vh;
  background-color: hsl(var(--background));
}

/* Index Page when fullscreen */
.index-page-fullscreen {
  position: fixed;
  inset: 0;
  min-height: 100vh;
  min-height: -webkit-fill-available; /* iOS Safari fix */
  overflow: hidden;
  background: radial-gradient(ellipse at center, hsl(var(--secondary)) 0%, hsl(var(--background)) 100%);
  /* iPhone Safe Area Support */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Floating Text */
.floating-text {
  position: absolute;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, hsl(var(--destructive)), hsl(var(--primary)));
  color: hsl(var(--destructive-foreground));
  border: 2px solid hsl(var(--foreground));
  border-radius: 0.5rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  white-space: nowrap;
  z-index: 20;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.4),
    0 0 20px hsla(var(--destructive), 0.5),
    inset 0 1px 2px rgba(255, 255, 255, 0.1);
  /* animation to fade in and out */
  animation: fadeInOut 3s ease-in-out forwards;
  transform-origin: center;
}

/* animation for fading in and out */
@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  16.67% {
    opacity: 1;
    transform: translateY(0);
  }
  83.33% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* laundry machine background */
.laundry-background {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 50%, hsla(var(--primary), 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, hsla(var(--accent), 0.1) 0%, transparent 50%),
    linear-gradient(to bottom, hsla(var(--secondary), 0.2), hsl(var(--background)));
  background-image: 
    linear-gradient(45deg, hsla(var(--muted), 0.3) 1px, transparent 1px),
    linear-gradient(-45deg, hsla(var(--muted), 0.3) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
  animation: backgroundShift 20s ease-in-out infinite;
}

/* animation for background shift */
@keyframes backgroundShift {
  0%, 100% {
    background-position: 0 0, 20px 20px;
  }
  50% {
    background-position: 20px 20px, 0 0;
  }
}

.washing-machine-container-fullscreen {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
}

/* larger version of the washing machine */
.washing-machine-large {
  position: relative;
  width: min(90vw, 90vh);
  height: min(90vw, 90vh);
  max-width: 800px;
  max-height: 800px;
  border: 6px solid hsl(var(--foreground));
  background-color: hsl(var(--card));
  border-radius: 1rem;
  overflow: visible;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px hsla(var(--foreground), 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* animation when hovering over  */
.washing-machine-large:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px hsla(var(--foreground), 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 0.15);
}

.washing-machine-container {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 5rem);
}

/* regular size of washing machine */
.washing-machine {
  position: relative;
  width: 600px;
  height: 600px;
  border: 4px solid hsl(var(--foreground));
  background-color: hsl(var(--card));
  border-radius: 0.5rem;
  overflow: hidden;
}

/* define the inside texture and shading of the machine */
.washing-machine-body {
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  background: 
    linear-gradient(135deg, hsl(var(--secondary)) 0%, hsl(var(--card)) 50%, hsl(var(--background)) 100%),
    radial-gradient(circle at 30% 30%, hsla(var(--primary), 0.1) 0%, transparent 50%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      hsla(var(--foreground), 0.03) 2px,
      hsla(var(--foreground), 0.03) 4px
    );
  box-shadow: 
    inset 0 4px 20px rgba(0, 0, 0, 0.3),
    inset 0 -4px 20px rgba(0, 0, 0, 0.2);
}

/* top lighting highlight */
.washing-machine-body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 20%;
  background: linear-gradient(to bottom, hsla(var(--foreground), 0.1), transparent);
  border-radius: 1rem 1rem 0 0;
}

/* bottom shadow highlight */
.washing-machine-body::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 15%;
  background: linear-gradient(to top, hsla(var(--foreground), 0.15), transparent);
  border-radius: 0 0 1rem 1rem;
}

/* control panel of the washing machine */
.control-panel {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  height: 5rem;
  border: 2px solid hsl(var(--foreground));
  background: linear-gradient(to bottom, hsl(var(--muted)), hsl(var(--secondary)));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  box-shadow: 
    inset 0 2px 8px rgba(0, 0, 0, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.2);
  border-radius: 0.5rem;
}

.washing-machine-large .control-panel {
  top: 2rem;
  left: 2rem;
  right: 2rem;
  height: 6rem;
  border: 3px solid hsl(var(--foreground));
  gap: 1rem;
  border-radius: 0.75rem;
  box-shadow: 
    inset 0 3px 12px rgba(0, 0, 0, 0.4),
    0 3px 6px rgba(0, 0, 0, 0.3);
}

/* control buttons of the machine */
.control-button {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 2px solid hsl(var(--foreground));
  background: radial-gradient(circle at 30% 30%, hsla(var(--foreground), 0.3), transparent);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  position: relative;
}

.control-button::before {
  content: '';
  position: absolute;
  top: 20%;
  left: 20%;
  width: 30%;
  height: 30%;
  border-radius: 50%;
  background: hsla(var(--foreground), 0.5);
  box-shadow: 0 0 8px hsla(var(--foreground), 0.8);
}

/* effects on buttons when hovering */
.control-button:hover {
  transform: scale(1.1);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 4px 8px rgba(0, 0, 0, 0.3),
    0 0 12px hsla(var(--primary), 0.5);
}

.washing-machine-large .control-button {
  width: 3.5rem;
  height: 3.5rem;
  border: 3px solid hsl(var(--foreground));
  box-shadow: 
    inset 0 3px 6px rgba(0, 0, 0, 0.4),
    0 3px 6px rgba(0, 0, 0, 0.3);
}

.washing-machine-large .control-button::before {
  top: 25%;
  left: 25%;
  width: 25%;
  height: 25%;
  box-shadow: 0 0 12px hsla(var(--foreground), 0.8);
}

/* door frame of the machine */
.door-frame {
  position: absolute;
  top: 8rem;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 400px;
  border: 4px solid hsl(var(--foreground));
  border-radius: 50%;
  background-color: hsl(var(--background));
  display: flex;
  align-items: center;
  justify-content: center;
}

.door-frame-large {
  position: absolute;
  top: 58%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(70vw, 70vh);
  height: min(70vw, 70vh);
  max-width: 550px;
  max-height: 550px;
  border: 5px solid hsl(var(--foreground));
  border-radius: 50%;
  background: 
    radial-gradient(circle at center, hsl(var(--background)) 0%, hsl(var(--card)) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    inset 0 4px 20px rgba(0, 0, 0, 0.4),
    0 8px 24px rgba(0, 0, 0, 0.3);
}

/* small door for the laundry machine */
.door-glass {
  width: 360px;
  height: 360px;
  border-radius: 50%;
  border: 4px solid hsl(var(--primary));
  background: linear-gradient(to bottom right, hsla(var(--primary), 0.2), hsla(var(--accent), 0.3));
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  transform-style: preserve-3d;
}

/* large door for machine */
.door-glass-large {
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  border-radius: 50%;
  border: 5px solid hsl(var(--primary));
  background: hsl(var(--primary));
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  transform-style: preserve-3d;
  box-shadow: 
    inset 0 4px 20px rgba(0, 0, 0, 0.3),
    0 0 30px hsla(var(--primary), 0.3),
    inset 0 0 60px hsla(var(--primary), 0.1);
  /* apply an filter to whatever is behind  */
  backdrop-filter: blur(2px); 
}

/* style change when hovering the door */
.door-glass:hover,
.door-glass-large:hover {
  background: hsl(var(--primary));
  box-shadow: 
    inset 0 4px 20px rgba(0, 0, 0, 0.3),
    0 0 40px hsla(var(--primary), 0.5),
    inset 0 0 80px hsla(var(--primary), 0.2);
  transform: scale(1.02);
}

.door-border-outer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 8px solid hsla(var(--primary), 0.2);
  box-shadow: 
    inset 0 0 20px hsla(var(--primary), 0.1),
    0 0 20px hsla(var(--primary), 0.2);
  animation: borderGlow 3s ease-in-out infinite;
}

/* animation for glowing the border of the machine */
@keyframes borderGlow {
  0%, 100% {
    border-color: hsla(var(--primary), 0.2);
    box-shadow: 
      inset 0 0 20px hsla(var(--primary), 0.1),
      0 0 20px hsla(var(--primary), 0.2);
  }
  50% {
    border-color: hsla(var(--primary), 0.4);
    box-shadow: 
      inset 0 0 30px hsla(var(--primary), 0.2),
      0 0 30px hsla(var(--primary), 0.4);
  }
}

.door-border-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  border: 4px solid hsla(var(--primary), 0.3);
  background-color: hsl(var(--primary));
  box-shadow: 
    inset 0 0 15px hsla(var(--primary), 0.2),
    0 0 15px hsla(var(--primary), 0.3);
}

.door-glass-large .door-border-inner {
  width: min(20vw, 20vh);
  height: min(20vw, 20vh);
  max-width: 180px;
  max-height: 180px;
  border: 5px solid hsla(var(--primary), 0.4);
  background-color: hsl(var(--primary));
  box-shadow: 
    inset 0 0 20px hsla(var(--primary), 0.3),
    0 0 20px hsla(var(--primary), 0.4);
}

.door-text-container {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

.door-text {
  font-size: 1.125rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  background: linear-gradient(135deg, hsla(var(--background), 0.98), hsla(var(--card), 0.95));
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  text-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.5),
    0 0 10px hsla(var(--primary), 0.5);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.3),
    0 0 20px hsla(var(--primary), 0.3),
    inset 0 1px 2px rgba(255, 255, 255, 0.1);
  border: 2px solid hsla(var(--primary), 0.4);
  letter-spacing: 0.05em;
  text-align: center;
  animation: pulse 2s ease-in-out infinite;
  pointer-events: auto;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  white-space: nowrap;
}

.door-text:hover {
  transform: scale(1.05);
  box-shadow: 
    0 6px 16px rgba(0, 0, 0, 0.4),
    0 0 30px hsla(var(--primary), 0.6),
    inset 0 1px 2px rgba(255, 255, 255, 0.15);
  border-color: hsla(var(--primary), 0.6);
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.05);
  }
}

.washing-machine-large .door-text {
  font-size: 1.5rem;
  padding: 1.25rem 2.5rem;
  border: 3px solid hsla(var(--primary), 0.4);
  box-shadow: 
    0 6px 16px rgba(0, 0, 0, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.15);
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* Door Animation */
.door-open {
  animation: door-swing 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* animation for opening door */
@keyframes door-swing {
  0% {
    transform: perspective(1000px) rotateY(0deg) scale(1);
    transform-origin: left center;
    opacity: 1;
  }
  50% {
    transform: perspective(1000px) rotateY(-90deg) scale(0.95);
    transform-origin: left center;
    opacity: 1;
  }
  100% {
    transform: perspective(1000px) rotateY(-150deg) scale(1);
    transform-origin: left center;
    opacity: 1;
  }
}

/* shaking Animation */
.shake {
  animation: shake 2s ease-in-out infinite;
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0) translateY(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-2px) translateY(1px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(2px) translateY(-1px);
  }
}

/* fade in animation */
.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Video Page */
.video-content {
  position: fixed;
  top: 4.5rem; /* Adjusted for smaller nav */
  top: calc(4.5rem + env(safe-area-inset-top)); /* iPhone Safe Area */
  left: 0;
  right: 0;
  bottom: 0;
  bottom: calc(0px + env(safe-area-inset-bottom)); /* iPhone Safe Area */
  padding: 0;
  margin: 0;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  z-index: 1;
  /* iPhone Safe Area Support */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.video-container {
  width: 100%;
  height: 100%;
  margin: 0;
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 2rem;
}

.video-wrapper {
  width: 100%;
  max-width: 800px;
  aspect-ratio: 16 / 9;
  border: none;
  background-color: hsl(var(--background));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-wrapper:fullscreen {
  max-width: 100%;
  width: 100vw;
  height: 100vh;
  aspect-ratio: unset;
  background-color: #000;
}

.video-wrapper:fullscreen .video-player,
.video-wrapper:fullscreen #video-iframe {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.fullscreen-button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: rgba(0, 0, 0, 0.7);
  border: 2px solid hsl(var(--foreground));
  color: hsl(var(--foreground));
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.fullscreen-button:hover {
  background-color: rgba(0, 0, 0, 0.9);
  border-color: hsl(var(--primary));
  color: hsl(var(--primary));
  transform: scale(1.1);
}

.fullscreen-button:active {
  transform: scale(0.95);
}

.fullscreen-button svg {
  width: 20px;
  height: 20px;
}

.video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

#video-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background-color: hsl(var(--background));
}

.video-controls {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
}

.video-control-button {
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  border: 2px solid hsl(var(--foreground));
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0.75rem;
  min-width: 150px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.video-control-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.video-control-button:hover::before {
  width: 300px;
  height: 300px;
}

.video-control-button:hover {
  background-color: hsl(var(--primary));
  opacity: 1;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  border-color: hsl(var(--primary));
}

.video-control-button:active {
  transform: translateY(-2px) scale(1.02);
}

#back-button {
  background-color: transparent;
  color: hsl(var(--foreground));
  border-color: hsl(var(--foreground));
}

#back-button:hover {
  background-color: hsl(var(--secondary));
  color: hsl(var(--foreground));
  border-color: hsl(var(--primary));
}

#continue-button {
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--accent)) 100%);
  border: none;
  box-shadow: 0 4px 15px hsla(var(--primary), 0.4);
}

#continue-button:hover {
  background: linear-gradient(135deg, hsl(var(--accent)) 0%, hsl(var(--primary)) 100%);
  box-shadow: 0 8px 25px hsla(var(--primary), 0.6);
}

.choices-overlay {
  width: 100%;
  max-width: 1400px;
  background: linear-gradient(135deg, 
    hsla(var(--background), 0.95) 0%, 
    hsla(var(--card), 0.8) 50%,
    hsla(var(--background), 0.95) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  margin: 2rem auto;
  border-radius: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 0.6s ease-out;
}

.choices-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 0%, hsla(var(--primary), 0.1), transparent 70%);
  pointer-events: none;
}

.choices-overlay::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, hsla(var(--primary), 0.05), transparent 70%);
  animation: rotate 20s linear infinite;
  pointer-events: none;
}

.choices-grid {
  display: grid;
  grid-template-columns: 1fr; /* vertical layout for mobile */
  gap: 2.5rem;
  width: 100%;
  max-width: 1200px;
  padding: 1rem;
  position: relative;
  z-index: 1;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.choice-button {
  border: 3px solid hsl(var(--foreground));
  min-height: 24rem;
  padding: 3.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 2rem;
  background: linear-gradient(145deg, 
    hsl(var(--card)) 0%, 
    hsl(var(--secondary)) 50%,
    hsl(var(--card)) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 hsla(var(--foreground), 0.1);
  animation: fadeInScale 0.6s ease-out backwards;
}

.choice-button:nth-child(1) {
  animation-delay: 0.1s;
}

.choice-button:nth-child(2) {
  animation-delay: 0.2s;
}

.choice-button:nth-child(3) {
  animation-delay: 0.3s;
}

.choice-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, 
    hsla(var(--primary), 0.2), 
    hsla(var(--accent), 0.2),
    hsla(var(--primary), 0.2));
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 0;
}

.choice-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, 
    hsla(var(--primary), 0.4), 
    hsla(var(--accent), 0.2),
    transparent);
  transform: translate(-50%, -50%);
  transition: width 0.8s ease, height 0.8s ease;
  z-index: 0;
}

.choice-button:hover::before {
  opacity: 1;
}

.choice-button:hover::after {
  width: 400px;
  height: 400px;
}

.choice-button > * {
  position: relative;
  z-index: 1;
}

.choice-button:hover {
  background: linear-gradient(145deg, 
    hsl(var(--secondary)) 0%, 
    hsl(var(--card)) 50%,
    hsl(var(--secondary)) 100%);
  transform: translateY(-16px) scale(1.05) rotateY(2deg);
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.6),
    0 0 40px hsla(var(--primary), 0.5),
    inset 0 0 40px hsla(var(--primary), 0.15),
    0 0 0 4px hsla(var(--primary), 0.3);
  border-color: hsl(var(--primary));
  border-width: 4px;
}

.choice-button:active {
  transform: translateY(-8px) scale(1.02) rotateY(1deg);
  transition: all 0.15s ease;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.choice-button-correct:hover {
  background-color: hsl(var(--success));
  color: hsl(var(--success-foreground));
}

.choice-button-wrong:hover {
  background-color: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}

/* warning page */
.warning-page {
  min-height: 100vh;
  background-color: hsl(var(--destructive));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.warning-content {
  text-align: center;
}

.warning-title {
  font-size: 3.75rem;
  font-weight: 700;
  color: hsl(var(--destructive-foreground));
  margin-bottom: 2rem;
}

.warning-button {
  border: 2px solid hsl(var(--destructive-foreground));
  color: hsl(var(--destructive-foreground));
  font-size: 1.125rem;
  padding: 1.5rem 2rem;
}

.warning-button:hover {
  background-color: hsl(var(--destructive-foreground));
  color: hsl(var(--destructive));
}

/* Success Page */
.success-page {
  min-height: 100vh;
  background: linear-gradient(135deg, hsl(var(--success)) 0%, hsl(var(--success)) 50%, hsla(var(--success), 0.9) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.success-page::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, hsla(var(--success-foreground), 0.1) 0%, transparent 70%);
  animation: pulse 4s ease-in-out infinite;
}

.success-content {
  text-align: center;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.8s ease-out;
  max-width: 700px;
  width: 100%;
}

.success-title {
  font-size: 4rem;
  font-weight: 800;
  color: hsl(var(--success-foreground));
  margin-bottom: 1.5rem;
  text-shadow: 0 4px 12px hsla(0, 0%, 0%, 0.2);
  animation: bounceIn 1s ease-out;
  letter-spacing: -0.02em;
}

.success-title::after {
  content: ' 🎉';
  display: inline-block;
  animation: rotate 2s ease-in-out infinite;
  transform-origin: center;
}

.success-subtitle {
  font-size: 1.875rem;
  font-weight: 600;
  color: hsl(var(--success-foreground));
  margin-bottom: 2rem;
  opacity: 0.95;
}

.success-message {
  font-size: 1.25rem;
  line-height: 1.9;
  color: hsl(var(--success-foreground));
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  opacity: 0.9;
  font-weight: 400;
}

.success-button {
  border: 3px solid hsl(var(--success-foreground));
  color: hsl(var(--success-foreground));
  font-size: 1.25rem;
  font-weight: 600;
  padding: 1.25rem 3rem;
  background-color: transparent;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 15px hsla(0, 0%, 0%, 0.2);
}

.success-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: hsl(var(--success-foreground));
  transition: left 0.3s ease;
  z-index: -1;
}

.success-button:hover {
  background-color: hsl(var(--success-foreground));
  color: hsl(var(--success));
  transform: translateY(-3px);
  box-shadow: 0 8px 25px hsla(0, 0%, 0%, 0.3);
}

.success-button:hover::before {
  left: 0;
}

.success-button:active {
  transform: translateY(-1px);
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(-50px);
  }
  50% {
    opacity: 1;
    transform: scale(1.05) translateY(0);
  }
  70% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes rotate {
  0%, 100% {
    transform: rotate(0deg) scale(1);
  }
  25% {
    transform: rotate(-10deg) scale(1.1);
  }
  75% {
    transform: rotate(10deg) scale(1.1);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* BTS Page */
.bts-content {
  position: fixed;
  top: 4.5rem; /* Adjusted for smaller nav */
  top: calc(4.5rem + env(safe-area-inset-top)); /* iPhone Safe Area */
  left: 0;
  right: 0;
  bottom: 0;
  bottom: calc(0px + env(safe-area-inset-bottom)); /* iPhone Safe Area */
  padding: 2rem 2rem; /* Increased vertical padding */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto; /* Allow scrolling if needed */
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  /* iPhone Safe Area Support */
  padding-left: calc(2rem + env(safe-area-inset-left));
  padding-right: calc(2rem + env(safe-area-inset-right));
}

.bts-container {
  max-width: 1200px;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* center the content vertically */
  gap: 2rem; /* increase the gap between title and video */
  padding: 2rem 1rem; /* add the padding around content */
}

.bts-title {
  font-size: 2.5rem; 
  font-weight: 700; 
  color: hsl(var(--foreground));
  margin: 0;
  margin-bottom: 0.5rem;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  flex-shrink: 0;
  display: block;
}

.bts-container .video-wrapper {
  border: 2px solid hsl(var(--foreground));
  background-color: hsl(var(--card));
  position: relative;
  width: 85%;
  max-width: 900px; 
  flex: 0 1 auto; 
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.5rem; 
}

.bts-container .video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Team Page */
.team-content {
  padding-top: 6rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  padding-bottom: 3rem;
}

.team-container {
  max-width: 1152px;
  margin: 0 auto;
}

.team-header {
  text-align: center;
  margin-bottom: 4rem;
  margin-top: 2rem;
}

.team-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: hsl(var(--foreground));
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 2rem;
}

@media (min-width: 768px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .team-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.team-member {
  animation: fadeIn 0.3s ease-in;
  border: 2px solid hsl(var(--foreground));
  background-color: hsl(var(--card));
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 0.5rem;
}

.team-member:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.team-member-avatar {
  border: 2px solid hsl(var(--primary));
  aspect-ratio: 1;
  width: 100%;
  max-width: 250px;
  background-color: hsl(var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-radius: 50%;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.team-member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  position: relative;
  z-index: 0;
}

.team-member:hover .team-member-avatar {
  transform: scale(1.05);
  border-color: hsl(var(--primary));
  box-shadow: 0 0 20px hsla(var(--primary), 0.4);
}

.team-member-avatar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, hsla(var(--primary), 0.2), hsla(var(--accent), 0.2));
  border-radius: 50%;
}

.team-member-icon {
  width: 60%;
  height: 60%;
  color: hsla(var(--foreground), 0.4);
  position: relative;
  z-index: 1;
}

.team-member-info {
  text-align: center;
  width: 100%;
}

.team-member-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: hsl(var(--foreground));
}

.team-member-role {
  font-size: 1rem;
  font-weight: 500;
  color: hsl(var(--primary));
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.team-member-description {
  font-size: 0.875rem;
  line-height: 1.6;
  color: hsl(var(--muted-foreground));
  margin: 0;
}

/* NotFound Page */
.not-found-page {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  background-color: hsl(var(--muted));
}

.not-found-content {
  text-align: center;
}

.not-found-title {
  margin-bottom: 1rem;
  font-size: 2.25rem;
  font-weight: 700;
}

.not-found-text {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  color: hsl(var(--muted-foreground));
}

.not-found-link {
  color: hsl(var(--primary));
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  cursor: pointer;
}

.not-found-link:hover {
  color: hsla(var(--primary), 0.9);
}

/* Button Styles */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

button:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

button:disabled {
  pointer-events: none;
  opacity: 0.5;
}

/* Responsive Design */

/* Mobile: Base styles are mobile */
@media (min-width: 640px) {
  .nav-container {
    padding: 1.25rem 2rem;
  }

  .nav-title {
    font-size: 1.75rem;
  }

  .nav-button {
    padding: 0.875rem 2.25rem;
    font-size: 1.25rem;
  }

  .floating-text {
    font-size: 1.125rem;
    padding: 1rem 1.5rem;
  }

  .door-text {
    font-size: 1.25rem;
    padding: 1rem 2rem;
  }

  .video-container {
    padding: 2.5rem;
  }

  .choices-overlay {
    padding: 4rem 3rem;
  }
  
  .choices-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns for the tablet */
    gap: 2rem;
  }

  .choice-button {
    min-height: 22rem;
    padding: 3rem 2rem;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .nav-container {
    padding: 1.5rem 2.5rem;
  }

  .nav-title {
    font-size: 2rem;
  }

  .nav-button {
    padding: 1rem 2.5rem;
    font-size: 1.375rem;
  }

  .choices-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }

  .choice-button {
    min-height: 24rem;
    padding: 3.5rem 2.5rem;
  }
}

/* make sure we always uses vertical layout for mobile */
@media (max-width: 639px) {
  .choices-grid {
    grid-template-columns: 1fr !important;
    display: grid !important;
  }
  
  .choice-button {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Mobile: smaller screens */
@media (max-width: 639px) {
  /* Navigation */
  .nav-container {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .nav-brand {
    padding: 0.75rem 1.5rem;
    width: 100%;
    text-align: center;
  }

  .nav-title {
    font-size: 1.25rem;
  }
  
  .nav-items {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
  }

  .nav-button {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    flex: 1;
    min-width: calc(50% - 0.25rem);
  }

  /* Home Page: Washing Machine */
  .washing-machine-large {
    width: min(95vw, 95vh);
    height: min(110vw, 110vh); 
    max-width: 600px;
    max-height: 700px; 
    border-width: 4px;
  }

  .door-frame-large {
    width: min(75vw, 75vh);
    height: min(75vw, 75vh);
    max-width: 450px;
    max-height: 450px;
    border-width: 4px;
    top: 65%; /* move down a bit to avoid overlap with control panel */
  }

  .door-glass-large {
    border-width: 4px;
  }

  .door-glass-large .door-border-inner {
    width: min(25vw, 25vh);
    height: min(25vw, 25vh);
    max-width: 150px;
    max-height: 150px;
    border-width: 4px;
  }

  .control-panel {
    top: 1rem;
    left: 1rem;
    right: 1rem;
    height: 4rem;
    border-width: 2px;
    gap: 0.5rem;
  }

  .washing-machine-large .control-panel {
    top: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    height: 5rem;
    border-width: 2px;
  }

  .control-button {
    width: 2rem;
    height: 2rem;
    border-width: 2px;
  }

  .washing-machine-large .control-button {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 2px;
  }

  .door-text {
    font-size: 0.875rem;
    padding: 0.75rem 1.25rem;
    border-width: 2px;
  }

  .washing-machine-large .door-text {
    font-size: 1rem;
    padding: 1rem 1.75rem;
    border-width: 2px;
  }

  .floating-text {
    font-size: 0.875rem;
    padding: 0.625rem 1rem;
    border-width: 2px;
  }

  /* Video Page */
  .video-content {
    top: auto;
    top: calc(4.5rem + env(safe-area-inset-top)); 
    padding-top: 1rem;
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .video-container {
    padding: 1rem;
    gap: 1rem;
  }

  .video-wrapper {
    max-width: 100%;
    aspect-ratio: 16 / 9;
  }

  .fullscreen-button {
    width: 40px;
    height: 40px;
    top: 0.5rem;
    right: 0.5rem;
  }

  .fullscreen-button svg {
    width: 18px;
    height: 18px;
  }

  .video-controls {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }

  .video-control-button {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    min-width: auto;
  }

  /* Choices */
  .choices-overlay {
    padding: 2rem 1rem;
    margin: 1rem;
    border-radius: 1rem;
  }

  .choices-grid {
    grid-template-columns: 1fr !important; /* use vertical layout for mobile */
    gap: 1.5rem;
    padding: 0.5rem;
  }

  .choice-button {
    min-height: 18rem;
    padding: 2rem 1.5rem;
    border-width: 2px;
    border-radius: 1rem;
  }

  .choice-button span {
    font-size: 1rem;
  }

  /* Success Page */
  .success-page {
    padding: 1.5rem;
  }

  .success-content {
    max-width: 100%;
  }

  .success-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }

  .success-message {
    font-size: 1rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
  }

  .success-button {
    font-size: 1rem;
    padding: 1rem 2rem;
    border-width: 2px;
  }

  /* Warning Page */
  .warning-page {
    padding: 1rem;
  }

  .warning-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
  }

  .warning-button {
    font-size: 1rem;
    padding: 1rem 1.5rem;
  }

  /* BTS Page */
  .bts-content {
    top: auto;
    top: calc(4.5rem + env(safe-area-inset-top));
    padding: 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    padding-left: calc(1rem + env(safe-area-inset-left));
    padding-right: calc(1rem + env(safe-area-inset-right));
  }

  .bts-container {
    gap: 1.5rem; /* increase the gap between title and video */
    padding: 1rem 0.5rem; 
    justify-content: center; 
  }

  .bts-title {
    font-size: 2rem; 
    display: block; 
    margin-bottom: 0.5rem;
  }

  .bts-container .video-wrapper {
    width: 90%; /* use smaller width on mobile */
    max-width: 100%;
    border-width: 2px;
    flex: 0 1 auto; 
    margin-top: 0.5rem;
  }

  /* Team Page */
  .team-content {
    padding-top: 5rem;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 2rem;
  }

  .team-header {
    margin-bottom: 2rem;
    margin-top: 1rem;
  }

  .team-title {
    font-size: 2rem;
  }

  .team-grid {
    gap: 1.5rem;
  }

  .team-member {
    padding: 1.5rem;
  }

  .team-member-avatar {
    max-width: 180px;
    margin-bottom: 1rem;
  }

  .team-member-title {
    font-size: 1.25rem;
  }

  .team-member-role {
    font-size: 0.875rem;
  }

  .team-member-description {
    font-size: 0.8125rem;
  }

  /* NotFound Page */
  .not-found-title {
    font-size: 2rem;
  }

  .not-found-text {
    font-size: 1rem;
  }
}

/* Setting for extra smaller mobile */
@media (max-width: 375px) {
  .nav-title {
    font-size: 1.125rem;
  }

  .nav-button {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
  }

  .washing-machine-large {
    width: min(98vw, 98vh);
    height: min(98vw, 98vh);
  }

  .door-text {
    font-size: 0.75rem;
    padding: 0.625rem 1rem;
  }

  .floating-text {
    font-size: 0.75rem;
    padding: 0.5rem 0.875rem;
  }

  .success-title {
    font-size: 2rem;
  }

  .warning-title {
    font-size: 2rem;
  }

  .team-title {
    font-size: 1.75rem;
  }

  .bts-title {
    font-size: 1.75rem;
  }

  .choice-button {
    min-height: 16rem;
    padding: 1.5rem 1rem;
  }
}

/* landscape version of mobile */
@media (max-width: 896px) and (orientation: landscape) {
  .video-content {
    padding-top: 0.5rem;
  }

  .video-container {
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .video-wrapper {
    max-height: 60vh;
  }

  .choices-overlay {
    padding: 1.5rem 1rem;
    max-height: 90vh;
    overflow-y: auto;
  }

  .choices-grid {
    gap: 1rem;
  }

  .choice-button {
    min-height: 14rem;
    padding: 1.5rem 1rem;
  }
}

/* Larger Desktop */
@media (min-width: 1440px) {
  .nav-container {
    max-width: 1400px;
  }

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

  .choices-overlay {
    max-width: 1600px;
  }

  .choices-grid {
    max-width: 1400px;
  }

  .team-container {
    max-width: 1400px;
  }
}

/* optimizations for touch devices*/
@media (hover: none) and (pointer: coarse) {
  .nav-button,
  .video-control-button,
  .choice-button,
  .success-button,
  .warning-button {
    min-height: 44px;
    min-width: 44px;
  }

  .control-button {
    min-width: 44px;
    min-height: 44px;
  }

  .door-glass,
  .door-glass-large {
    min-width: 44px;
    min-height: 44px;
  }
}

@supports (-webkit-touch-callout: none) {
  html {
    /* prevent the iOS Safari bounce scrolling effects */
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
  }

  body {
    /* apply smooth scrolling on iOS */
    -webkit-overflow-scrolling: touch;
  }

  .index-page-fullscreen,
  .page-container {
    /* allow scrolling within the pages on iOS */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-button,
  .video-control-button,
  .choice-button,
  .success-button,
  .warning-button,
  .door-glass,
  .door-glass-large {
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
    touch-action: manipulation;
  }

  /* fixes for iPhone X and newer safe areas */
  @media screen and (max-width: 428px) {
    .washing-machine-large {
      width: min(90vw, 90vh);
      height: min(108vw, 108vh);
      max-height: 700px;
    }

    .door-frame-large {
      width: min(70vw, 70vh);
      height: min(70vw, 70vh);
      top: 65%; 
    }

    .floating-text {
      font-size: 0.8125rem;
      padding: 0.5rem 0.875rem;
      max-width: 85vw;
    }

    .door-text {
      font-size: 0.875rem;
      padding: 0.75rem 1.25rem;
      white-space: normal;
      text-align: center;
    }

    .washing-machine-large .door-text {
      font-size: 0.9375rem;
      padding: 0.875rem 1.5rem;
    }

    .nav-container {
      padding-top: calc(1rem + env(safe-area-inset-top));
      padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    .video-container {
      padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    .choices-overlay {
      padding-bottom: calc(2rem + env(safe-area-inset-bottom));
      max-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 8rem);
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
    }
  }

  /* settings for iPhone SE and smaller models */
  @media screen and (max-width: 375px) {
    .washing-machine-large {
      width: min(92vw, 92vh);
      height: min(108vw, 108vh); 
      max-height: 680px;
    }

    .door-frame-large {
      width: min(72vw, 72vh);
      height: min(72vw, 72vh);
      top: 66%; 
    }

    .control-panel {
      height: 3.5rem;
    }

    .washing-machine-large .control-panel {
      height: 4.5rem;
    }

    .control-button {
      width: 1.75rem;
      height: 1.75rem;
    }

    .washing-machine-large .control-button {
      width: 2.25rem;
      height: 2.25rem;
    }
  }

  /* orientations for iPhone landscape */
  @media screen and (max-width: 896px) and (orientation: landscape) {
    .washing-machine-large {
      width: min(60vw, 60vh);
      height: min(60vw, 60vh);
    }

    .door-frame-large {
      width: min(50vw, 50vh);
      height: min(50vw, 50vh);
    }

    .floating-text {
      font-size: 0.75rem;
      padding: 0.5rem 0.75rem;
    }

    .video-wrapper {
      max-height: 70vh;
    }

    .choices-overlay {
      max-height: 85vh;
      padding: 1rem;
    }

    .choice-button {
      min-height: 12rem;
      padding: 1.25rem 1rem;
    }
  }
}

