body {
  font-family: "Avenir", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
}

.modal-card {
    position: absolute;
    bottom: 0;
    margin-bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 800px;
    width: 90vw;
    border-radius: 25px;
    background:
        radial-gradient(
            120% 120% at 50% 50%,
            rgba(255, 255, 255, 0.15) 0%,
            rgba(240, 240, 240, 0.1) 0.05%,
            rgba(0, 0, 0, 0.9) 100%
        ),
        radial-gradient(
            208.93% 154.42% at 50% 50.58%,
            rgba(0, 0, 0, 0.05) 0%,
            rgba(0, 0, 0, 0.2) 97.6%
        ),
        #000;

    box-shadow:
        inset 0 -2px 10px rgba(0, 0, 0, 0.6),
        0 2px 6px rgba(0, 0, 0, 0.6);
}

.bottom-button-wrapper {
  width: 100%;
  padding: 16px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  box-sizing: border-box;
  z-index: 10;
}

.bottom-button-wrapper button:not(.hidden) {
    flex: 1 1 100%;
}

.bottom-button-wrapper:has(button.hidden) {
    gap: 0;
}

.bottom-button-wrapper button {
  pointer-events: auto;
  flex: 1;
  padding: 20px 0;
  border: none;
  border-radius: 32px;
  font-size: 18px;
  font-weight: bolder;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.bottom-button-wrapper .primary-button {
  pointer-events: auto;
  width: 100%;
  padding: 20px 0;
  border: none;
  border-radius: 32px;
  font-size: 18px;
  font-weight: bolder;
  color: #fff;
  background: linear-gradient(90deg, #0239E9, #73ACEB);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bottom-button-wrapper .secondary-button {
  background: rgba(250, 250, 250, 0.1);
}

.bottom-button-wrapper .primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.5);
}

.bottom-button-wrapper .secondary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.5);
}

.animated {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    width: 0;
}

.disabled {
  opacity: 0.2 !important;
  pointer-events: none !important;
  cursor: default !important;
  box-shadow: none !important;
}

.modal-title {
    text-align: center;
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    margin-top: 28px;
    margin-bottom: 20px;
    padding-left: 20px;
    padding-right: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-text {
    text-align: center;
    color: #fff;
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 20px;
    padding-left: 20px;
    padding-right: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 10px 0;
}

.async-image {
    display: block;
    max-width: 100%;
    max-height: 50vh;
    height: auto;
    border-radius: 2px;
    opacity: 1;
    margin-bottom: 18px;
}

.handover-async-image {
    display: block;
    width: 110px;
    height: 110px;
    border-radius: 12px;
    opacity: 1;
    margin-bottom: 18px;
    margin-top: 18px;
    object-fit: cover;
    object-position: center;
}

.handover-title {
    text-align: center;
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    margin-top: 0px;
    margin-bottom: 10px;
    padding-left: 20px;
    padding-right: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.handover-text {
    text-align: center;
    color: #fff;
    font-size: 18px;
    font-weight: 400;
    margin-top: 0px;
    margin-bottom: 24px;
    padding-left: 20px;
    padding-right: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.handover-progress-wrapper {
    width: 90%;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 10px;
    margin-bottom: 30px;
    margin-left: 5%;
    margin-right: 5%;
}

#handover-progress-bar {
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, #0239E9, #73ACEB);
    transition: width 6s linear;
    border-radius: 4px;
}

.choice-wrapper {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 20px;
  box-sizing: border-box;
  width: 100%;
  max-height: 60vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.choice-box {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  min-height: 130px;
  border-radius: 20px;
  cursor: pointer;
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
  opacity: 0.9;
  width: 100%;
  box-sizing: border-box;

  background: linear-gradient(
      to bottom,
      rgba(30, 30, 30, 0.7) 30%,
      rgba(10, 10, 10, 0.9) 80%,
      rgba(255, 255, 255, 0.1) 100%
  );
  box-shadow:
      inset 0 -2px 10px rgba(255, 255, 255, 0.15),
      inset 0 2px 8px rgba(0, 0, 0, 0.4),
      0 4px 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;

  overflow: hidden; /* prevents expansion from long words */
  word-wrap: break-word; /* allow breaking inside long words */
  word-break: break-word;
}

.choice-box span {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.choice-box:hover {
  transform: translateY(-3px);
  box-shadow:
      inset 0 -2px 10px rgba(255, 255, 255, 0.25),
      0 6px 16px rgba(0, 0, 0, 0.6);
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 20px 20px 20px;
}

.styled-input {
    padding: 18px 20px;
    border-radius: 20px;
    border: none;
    font-size: 17px;
    font-weight: 500;
    color: #fff;
    background: linear-gradient(
        to bottom,
        rgba(30, 30, 30, 0.7) 30%,
        rgba(10, 10, 10, 0.9) 80%,
        rgba(255, 255, 255, 0.1) 100%
    );
    box-shadow:
        inset 0 -2px 10px rgba(255, 255, 255, 0.15),
        inset 0 2px 8px rgba(0, 0, 0, 0.4),
        0 4px 10px rgba(0, 0, 0, 0.5);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    outline: none;
    text-align: center;
}

.styled-input::placeholder {
    color: rgba(255,255,255,0.6);
}

.styled-input:focus {
    box-shadow:
        inset 0 -2px 12px rgba(255, 255, 255, 0.25),
        inset 0 2px 10px rgba(0, 0, 0, 0.5),
        0 6px 14px rgba(0, 0, 0, 0.6);
    transform: translateY(-2px);
}

.iframe-wrapper {
    width: 100%;
    height: 70vh;
    padding: 10px 20px 20px 20px;
    box-sizing: border-box;
}

.iframe-wrapper iframe {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    border: none;
    box-shadow:
        inset 0 -2px 10px rgba(255, 255, 255, 0.15),
        inset 0 2px 8px rgba(0, 0, 0, 0.4),
        0 4px 10px rgba(0, 0, 0, 0.5);
}