* { box-sizing: border-box; }
html, body {
  margin: 0;
  font-family: 'Jost', sans-serif;
  background: #111 url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/499416/demo-bg.jpg") center/cover no-repeat fixed;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
  height: 100%;
  overflow: hidden;
}

.large-header {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  overflow: hidden;
}

#demo-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.side-logos {
  position: fixed; top: 50%; left: 20px; transform: translateY(-50%);
  display: flex; flex-direction: column; z-index: 10;
}
.side-logos img { width: 78px; margin-bottom: 30px; }

#main-logo-img-wrapper {
  position: relative;
  z-index: 2;
  max-width: 90%; display: none;
}
#main-logo-img-wrapper img { display: block; width: 100%; height: auto; }

/* --- Desktop Structure --- */
.desktop-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 2;
}
#desktop-main-jh-logo {
  width: clamp(270px, 37.5vw, 450px);
  height: auto;
  margin-bottom: 3vh;
}
.slot-wrapper-desktop {
  width: 100%; text-align: center;
  padding: 0 10px;
  margin-bottom: 5vh;
}
.slot-machine-desktop { display: flex; justify-content: center; align-items: center; gap: 8px; }
.slot-desktop {
  width: clamp(130px, 11vw, 160px); height: 45px; overflow: hidden; position: relative;
  background: rgba(255, 255, 255, 0.08); border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18); cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.slot-desktop:hover, .slot-desktop:active { transform: scale(1.03); box-shadow: 0 0 10px rgba(173, 216, 230, 0.4); }
.slot-inner-desktop { position: absolute; width: 100%; top: 0; left: 0; }
.slot-inner-desktop span {
  display: block; height: 45px; line-height: 45px; text-align: center; width: 100%;
  white-space: nowrap; font-size: clamp(0.9rem, 1.4vw, 1.3rem);
  font-weight: 600; text-transform: uppercase;
}
.arrow-desktop { color: #888; font-size: clamp(1.1rem, 1.6vw, 1.4rem); opacity: 0.7; }


/* --- Mobile Cycle Layout --- */
.mobile-cycle-layout-wrapper { display: none; }
.mobile-cycle-word-container {
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: opacity 0.2s ease, transform 0.2s ease;
  position: absolute;
  width: clamp(100px, 28vw, 140px);
  height: clamp(35px, 8vw, 45px);
}
.mobile-cycle-word-container:hover { opacity: 0.8; }
.mobile-word-spinner-inner { position: absolute; width: 100%; top: 0; left: 0; }
.mobile-word-spinner-inner span {
  display: block; width: 100%; height: 100%; line-height: inherit;
  text-align: center; white-space: nowrap;
  font-weight: 600; text-transform: uppercase; color: #fff; text-shadow: 0 0 6px rgba(0,0,0,0.6);
  font-size: clamp(1rem, 3.8vw, 1.4rem);
}

.footer-container {
  width: 100%;
  text-align: center;
  position: relative; 
  z-index: 2;
  margin-top: auto;
  padding-bottom: 20px;
}
.footer-labels {
  width: 100%; text-align: center;
  padding: 10px;
  position: relative;
  z-index: 2;
}
.footer-labels span {
  display: inline-block; margin: 5px 10px; font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 600; text-transform: uppercase; letter-spacing: 2.5px;
  color: #add8e6; transition: opacity 0.3s;
}
.footer-labels span:hover { opacity: 0.7; }

.footer-link {
  display: inline-block;
  margin-top: 15px;
  color: #fff;
  border: 1px solid #fff;
  padding: 5px 12px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background-color 0.2s ease, color 0.2s ease;
  cursor: pointer;
}
.footer-link:hover { background: #fff; color: #111; }

.modal {
  display: none; position: fixed; z-index: 100;
  left: 0; top: 0; width: 100%; height: 100%;
  overflow: auto; background-color: rgba(0,0,0,0.7);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  align-items: center; justify-content: center;
}
.modal-content {
  background-color: #1a1a1a; color: #f1f1f1;
  margin: auto; padding: 25px 30px;
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px;
  width: 90%; max-width: 650px; position: relative;
  animation: fadeIn 0.4s ease-out; max-height: 85vh; overflow-y: auto;
}
.modal-content h2 { margin-top: 0; color: #add8e6; letter-spacing: 1px; }
.modal-content p {
  line-height: 1.6; font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  font-weight: 500; color: #ccc;
}
.modal-email-link {
  color: #add8e6; text-decoration: none; border-bottom: 1px dotted #add8e6;
  transition: color 0.2s, border-bottom-color 0.2s;
}
.modal-email-link:hover { color: #fff; border-bottom-color: #fff; }
.close-button {
  color: #aaa; position: absolute; top: 10px; right: 20px;
  font-size: 28px; font-weight: bold; z-index: 5;
}
.close-button:hover, .close-button:focus { color: #fff; text-decoration: none; cursor: pointer; }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

#main-language-toggle { position: fixed; top: 20px; right: 20px; z-index: 20; }
.language-toggle-container { display: flex; align-items: center; gap: 8px; }
.lang-label {
  font-size: 0.8rem; font-weight: 600; color: #888;
  text-transform: uppercase; transition: color 0.3s ease;
}
.language-toggle-container .switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.language-toggle-container .switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background-color: #333; border: 1px solid #555; transition: .4s;
}
.slider:before {
  position: absolute; content: ""; height: 16px; width: 16px; left: 4px; bottom: 3px;
  background-color: #add8e6; transition: .4s;
}
input:checked + .slider { background-color: #333; }
input:checked + .slider:before { transform: translateX(18px); }
.slider.round { border-radius: 24px; }
.slider.round:before { border-radius: 50%; }

/* CSS for animated language change */
.lang-anim-item {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}
.is-hiding {
  opacity: 0 !important;
  transform: scale(0.8);
}

/* --- Media Queries --- */
@media (max-width: 768px) {
  .desktop-content-wrapper, .side-logos { display: none; }
  #main-logo-img-wrapper {
    display: block;
    width: clamp(150px, 60vw, 250px);
    margin: 0 auto;
    text-align: center;
  }
  #main-logo-img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  .large-header {
    padding-bottom: 15vh;
  }
  .footer-container {
    position: absolute;
    bottom: 5vh;
    left: 0;
    right: 0;
    margin-top: 0;
  }

  .mobile-cycle-layout-wrapper {
    display: block;
    position: relative;
    width: clamp(320px, 95vw, 450px);
    height: clamp(320px, 95vw, 450px);
    margin: 0 auto;
    z-index: 2;
  }
  #mobile-central-logo-container {
    position: absolute;
    top: 50%; left: 50%;
    width: clamp(100px, 25vw, 130px);
    transform: translate(-50%, -50%);
    z-index: 3;
  }
  #central-rotating-arrow {
    position: absolute;
    top: 50%; left: 50%;
    width: clamp(240px, 65vw, 340px);
    height: clamp(240px, 65vw, 340px);
    transform: translate(-50%, -50%) rotate(0deg);
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 1;
    opacity: 0.7;
  }

  [data-slot-index="0"],
  [data-slot-index="3"] {
    left: 50%;
    transform: translate(-50%, -50%);
    justify-content: center;
  }
  [data-slot-index="4"],
  [data-slot-index="5"] {
    left: 0;
    transform: translateY(-50%);
    justify-content: flex-start;
  }
  [data-slot-index="1"],
  [data-slot-index="2"] {
    right: 0;
    transform: translateY(-50%);
    justify-content: flex-end;
  }

  [data-slot-index="0"] { top: 8%; }
  [data-slot-index="1"], [data-slot-index="5"] { top: 35%; }
  [data-slot-index="2"], [data-slot-index="4"] { top: 65%; }
  [data-slot-index="3"] { top: 92%; }
}