:root {
  --bg: #000;
  --fail: #ff0000;
  --correct: #11ff00;
  --grey: #d6d7d7;
  --grey-dark: #bdbdbd;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: #fff;
  font-family: Roboto, "Segoe UI", system-ui, -apple-system, sans-serif;
  overscroll-behavior: none;
}

#app {
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}

.btn {
  font-family: inherit;
  border: 0;
  border-radius: 2px;
  color: #000;
  background: var(--grey);
  box-shadow: 0 1px 3px rgba(0,0,0,.6);
  cursor: pointer;
  user-select: none;
  transition: filter .08s, transform .08s;
}
.btn:active { filter: brightness(.82); transform: translateY(1px); }

.btn-elevator {
  margin-top: 8px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .4px;
  max-width: 100%;
}
.btn-elevator.playing { background: var(--grey-dark); }

.verdict {
  flex: 1 1 auto;
  width: 100%;
  max-width: 520px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-content: center;
  min-height: 180px;
}

.verdict .btn {
  height: 100%;
  min-height: 38vh;
  font-size: 28px;
  font-weight: 700;
  color: #000;
}
.btn-correct { background: var(--correct); }
.btn-fail    { background: var(--fail); color: #fff; }

.bottom {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.adds {
  width: 100%;
  max-width: 520px;
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 0;
  cursor: pointer;
}
.adds video {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}

#unsilence {
  position: fixed;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
  left: -10px; top: -10px;
}

.copyright {
  margin: 0;
  font-size: 12px;
  color: #9a9a9a;
  text-align: center;
}

.menu {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: 12px;
  z-index: 15;
}

.menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 38px; height: 34px;
  padding: 0 8px;
  background: transparent;
  border: 1px solid #3a3a3a;
  border-radius: 3px;
  cursor: pointer;
}
.menu-btn span {
  display: block;
  height: 2px;
  background: #9a9a9a;
  border-radius: 1px;
}
.menu-btn[aria-expanded="true"] { border-color: #6f6f6f; }
.menu-btn[aria-expanded="true"] span { background: #e0e0e0; }

.menu-list {
  position: absolute;
  top: 40px; right: 0;
  min-width: 156px;
  padding: 4px 0;
  background: #2b2b2b;
  border: 1px solid #3f3f3f;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,.7);
  overflow: hidden;
}
.menu-list[hidden] { display: none; }

.menu-item {
  display: block;
  width: 100%;
  padding: 11px 16px;
  font-family: inherit;
  font-size: 14.5px;
  text-align: left;
  color: #dcdcdc;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.menu-item[hidden] { display: none; }
.menu-item:hover, .menu-item:active { background: #3a3a3a; color: #fff; }

.dialog-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.72);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  z-index: 20;
}
.dialog-backdrop[hidden] { display: none; }

.dialog {
  background: #2b2b2b;
  border-radius: 4px;
  padding: 22px;
  max-width: 460px;
  max-height: 86vh;
  overflow-y: auto;
  box-shadow: 0 8px 28px rgba(0,0,0,.7);
}
.dialog h1 { margin: 0 0 14px; font-size: 19px; line-height: 1.25; }
.dialog p  { margin: 0 0 12px; font-size: 14.5px; line-height: 1.5; color: #dcdcdc; }
.sealed {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #3f3f3f;
}
.sealed[hidden] { display: none; }

.seal-img {
  flex: 0 0 auto;
  width: 74px;
  transform: rotate(-9deg);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.6));
}

.sealed-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #9a9a9a;
  letter-spacing: .2px;
}

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.btn-what,
.btn-accept {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .5px;
  text-decoration: none;
}

.btn-accept { background: var(--correct); color: #000; }
.btn-what   { background: var(--fail);    color: #fff; }

.player {
  position: fixed; inset: 0;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  z-index: 30;
}
.player[hidden] { display: none; }
#video { width: 100%; max-height: 100%; }
