:root {
  color-scheme: dark;
  --bg: #000000;
  --text: #f5f5f5;
  --muted: #bbbbbb;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: "Courier New", monospace;
  color: var(--text);
  background: var(--bg);
}

.countdown-page {
  max-width: 760px;
  text-align: center;
}

.title {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.subtitle {
  margin: 10px 0 24px;
  color: var(--muted);
}

.countdown {
  margin: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 20px;
  font-size: 1.1rem;
}

.countdown > span {
  white-space: nowrap;
}

.countdown strong {
  display: block;
  font-size: 2rem;
  line-height: 1.1;
}

.status {
  min-height: 1.5em;
  margin: 16px 0 8px;
  font-weight: bold;
}

.passcode-page {
  width: min(430px, 100%);
  text-align: center;
}

.pixel-panel {
  position: relative;
  padding: 18px;
  border: 4px solid #111;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.14) 1px, transparent 1px) 0 0 / 8px 8px,
    linear-gradient(rgba(0, 0, 0, 0.14) 1px, transparent 1px) 0 0 / 8px 8px,
    #d7d7d7;
  box-shadow:
    0 0 0 4px #2a2a2a,
    0 0 0 8px #8a8a8a,
    0 14px 0 #555,
    0 18px 0 #2b2b2b;
}

.pixel-panel::before {
  content: "ACCESS PANEL";
  position: absolute;
  top: -14px;
  left: 12px;
  padding: 2px 8px;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  background: #111;
  color: #ffd966;
}

.passcode-display {
  margin: 0;
  padding: 12px 10px;
  border: 4px solid #1e1e1e;
  border-radius: 0;
  background: #0c1610;
  color: #79ff9f;
  font-size: 1.9rem;
  letter-spacing: 0.24em;
  min-height: 1.2em;
  text-shadow: 2px 2px 0 #1a4425;
  box-shadow: inset 0 0 0 3px #2b462f;
}

.passcode-page .status {
  margin: 10px 0 14px;
  color: #e8e8e8;
  min-height: 1.6em;
}

.pixel-keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, 1fr));
  gap: 10px;
  padding: 4px;
}

.pixel-keypad button {
  border: 3px solid #121212;
  border-radius: 0;
  background: #f0f0f0;
  color: #111;
  font: inherit;
  font-size: 1.1rem;
  font-weight: bold;
  line-height: 1;
  padding: 12px 0 8px;
  min-height: 68px;
  cursor: pointer;
  box-shadow:
    inset -3px -3px 0 #c2c2c2,
    inset 3px 3px 0 #ffffff,
    0 4px 0 #4d4d4d,
    4px 4px 0 #1f1f1f;
  transition: transform 0.05s steps(2, end), box-shadow 0.05s steps(2, end), filter 0.08s linear;
}

.pixel-keypad button span {
  display: block;
  margin-top: 6px;
  font-size: 0.52rem;
  letter-spacing: 0.09em;
  color: #3f3f3f;
}

.pixel-keypad button:hover {
  filter: saturate(1.1);
}

.pixel-keypad button:active,
.pixel-keypad button.is-pressed {
  transform: translate(2px, 3px);
  box-shadow:
    inset -2px -2px 0 #cfcfcf,
    inset 2px 2px 0 #f6f6f6,
    0 1px 0 #4d4d4d,
    2px 2px 0 #1f1f1f;
}

.pixel-keypad .key-action {
  background: #dce8ff;
}

.passcode-page.unlocked .status {
  color: #79ff9f;
}

.acs-page {
  text-align: center;
}

.acs-title {
  margin: 0;
  font-size: clamp(2.4rem, 8vw, 5rem);
  letter-spacing: 0.3em;
  color: #ffffff;
}

.folder-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  border: 2px solid #f5f5f5;
  background: #0f0f0f;
  color: #f5f5f5;
  font: inherit;
  padding: 10px 14px;
  cursor: pointer;
}

.folder-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.folder-label {
  font-size: 1rem;
}

.acs-viewer {
  margin: 18px auto 0;
  width: min(920px, 95vw);
  border: 2px solid #f5f5f5;
  background: #0a0a0a;
  padding: 10px;
}

.acs-viewer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.acs-viewer-head p {
  margin: 0;
  color: #ffffff;
}

.close-viewer {
  border: 1px solid #f5f5f5;
  background: #1a1a1a;
  color: #fff;
  font: inherit;
  padding: 4px 8px;
  cursor: pointer;
}

.acs-record-image {
  width: 100%;
  max-width: 600px;
  display: block;
  margin: 20px auto;
  border-radius: 10px;
}

.gallery-container {
  position: relative;
  display: inline-block;
}

.acs-record-image {
  width: 600px;
  max-width: 90%;
  display: block;
  position: relative;
  z-index: 1;
}

/* SIDE ARROWS */
/* SIDE ARROWS */
/* SIDE ARROWS */
.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  color: white;
  background: rgba(0,0,0,0.3);
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 9999;
}

.nav-arrow.left { left: 10px; }
.nav-arrow.right { right: 10px; }

.nav-arrow:hover {
  background: rgba(255,255,255,0.2);
}

.nav-arrow:hover {
  background: rgba(255,255,255,0.2);
}

/* LEFT SIDE */
.nav-arrow.left {
  left: 0;
}

/* RIGHT SIDE */
.nav-arrow.right {
  right: 0;
}

.nav-arrow:hover {
  opacity: 1;
}

/* LEFT SIDE */
.nav-arrow.left {
  left: -60px;
}

/* RIGHT SIDE */
.nav-arrow.right {
  right: -60px;
}
