/* Layout is authored on a fixed 1080 x 1920 (portrait Full HD) stage and scaled to fit the window. */
@font-face { font-family: 'Inter'; font-weight: 400; src: url(fonts/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; src: url(fonts/inter-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; src: url(fonts/inter-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 800; src: url(fonts/inter-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 400; src: url(fonts/montserrat-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 500; src: url(fonts/montserrat-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 600; src: url(fonts/montserrat-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 700; src: url(fonts/montserrat-latin-700-normal.woff2) format('woff2'); }

:root {
  --bg: #061426;
  --white: #f4f8ff;
  --red: #ff2f42;
  --teal-1: #1ee8d6;
  --teal-2: #0f9e93;
  --teal-3: #0a7d76;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%; height: 100%; overflow: hidden;
  background: var(--bg);
  user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  cursor: default;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; outline: none; }

#stage {
  position: absolute; left: 50%; top: 50%;
  width: 1080px; height: 1920px;
  transform-origin: 0 0;
  overflow: hidden;
  color: var(--white);
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background:
    radial-gradient(ellipse 60% 40% at 50% 50%, rgba(10, 34, 58, .9) 0%, rgba(10, 34, 58, 0) 70%),
    linear-gradient(180deg, #031c32 0%, #031c32 80%, #032640 100%);
}

.bg-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.logo {
  position: absolute; left: 94px; top: 52px;
  height: 118px; width: auto;
  filter: drop-shadow(0 0 10px rgba(80, 180, 255, .25));
}

/* ---------- screens ---------- */
.screen {
  position: absolute; inset: 0;
  opacity: 0; pointer-events: none;
  transform: scale(1.02);
  transition: opacity .35s ease, transform .35s ease;
}
.screen.active { opacity: 1; pointer-events: auto; transform: none; }

.label {
  position: absolute; left: 95px; top: 222px;
  display: flex; align-items: center; gap: 30px;
  font-family: 'Montserrat', 'Segoe UI', sans-serif;
  font-weight: 500; font-size: 49px; letter-spacing: 3px;
  line-height: 1;
}
.label .bar {
  width: 14px; height: 56px; border-radius: 4px;
  background: var(--red);
  box-shadow: 0 0 14px rgba(255, 47, 66, .7);
}

/* ---------- number display ---------- */
.display {
  position: absolute; left: 77px; top: 334px;
  width: 927px; height: 325px;
  border-radius: 34px;
  border: 2px solid rgba(110, 205, 255, .55);
  background:
    linear-gradient(180deg, rgba(64, 170, 220, .55) 0%, rgba(30, 105, 160, .45) 35%, rgba(13, 55, 95, .55) 75%, rgba(10, 42, 75, .6) 100%);
  box-shadow:
    0 0 34px rgba(40, 160, 255, .30),
    inset 0 2px 0 rgba(200, 240, 255, .25),
    inset 0 0 60px rgba(120, 220, 255, .12);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
/* glass diagonal on the right */
.display::before {
  content: ''; position: absolute; right: -40px; bottom: -10px;
  width: 210px; height: 360px;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 50%, rgba(140, 215, 255, .14) 50.5%, rgba(140, 215, 255, .06) 100%);
  transform: skewX(-28deg);
  pointer-events: none;
}
/* red glow line at the bottom edge */
.display::after {
  content: ''; position: absolute; left: 50%; bottom: 22px;
  width: 640px; height: 4px; transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(255, 47, 66, 0), #ff3b4c 50%, rgba(255, 47, 66, 0));
  box-shadow: 0 0 18px 3px rgba(255, 47, 66, .55);
  border-radius: 2px;
}
.number {
  font-weight: 700; font-size: 236px; letter-spacing: -2px; line-height: 1;
  white-space: nowrap;
  text-shadow: 0 4px 18px rgba(0, 20, 50, .35), 0 0 30px rgba(170, 225, 255, .25);
  transform-origin: center;
  margin-top: -14px;
}
.number.empty { opacity: .25; }

.display.shake { animation: shake .4s; }
@keyframes shake {
  20%, 60% { transform: translateX(-14px); }
  40%, 80% { transform: translateX(14px); }
}

/* ---------- keypad ---------- */
.keypad {
  position: absolute; left: 77px; top: 707px;
  width: 927px; height: 800px;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, 200px);
}
.key {
  position: relative;
  font-weight: 700; font-size: 112px; line-height: 1;
  display: grid; place-items: center;
  text-shadow:
    0 0 14px rgba(120, 210, 255, .65),
    0 0 36px rgba(40, 150, 255, .45);
  transition: transform .08s ease;
}
.key::before {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 230px; height: 200px; transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(40, 120, 200, .18), rgba(40, 120, 200, 0));
  transition: background .15s;
  z-index: -1;
}
.key.hot::before, .key.pressed::before {
  background: radial-gradient(closest-side, rgba(255, 40, 60, .42), rgba(170, 20, 50, .18) 55%, rgba(255, 40, 60, 0));
}
.key.hot { text-shadow: 0 0 10px rgba(255, 150, 165, .45), 0 0 34px rgba(255, 50, 70, .4); }
.key.pressed { transform: scale(.92); text-shadow: 0 0 16px rgba(255, 130, 150, .8), 0 0 44px rgba(255, 50, 70, .7); }
.key.clear {
  font-family: 'Montserrat', 'Segoe UI', sans-serif;
  font-weight: 600; font-size: 44px; letter-spacing: 4px;
}
.key.clear.pressed { transform: scale(.94); }

/* ---------- big action button ---------- */
.action {
  position: absolute; left: 77px; top: 1561px;
  width: 927px; height: 179px;
  border-radius: 36px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  transition: transform .1s ease, filter .1s ease;
}
.action:active { transform: scale(.985); filter: brightness(1.1); }
.action::after { /* red glow under the button */
  content: ''; position: absolute; left: 50%; bottom: -3px;
  width: 520px; height: 4px; transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(255, 47, 66, 0), #ff3b4c 50%, rgba(255, 47, 66, 0));
  box-shadow: 0 0 16px 3px rgba(255, 47, 66, .5);
  border-radius: 2px;
}
.action .icon { width: 96px; height: 96px; margin-left: 12px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .15)); }
.action .divider {
  width: 4px; height: 92px; margin: 0 52px 0 46px;
  background: var(--red); border-radius: 2px;
  box-shadow: 0 0 8px rgba(255, 47, 66, .6);
}
.action .text {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  font-weight: 700; font-size: 76px; letter-spacing: 2px;
  text-shadow: 0 2px 6px rgba(0, 40, 40, .2);
}
.action.call {
  background: linear-gradient(90deg, var(--teal-1) 0%, #16c7b8 35%, var(--teal-2) 75%, var(--teal-3) 100%);
  box-shadow:
    0 0 34px rgba(20, 220, 200, .32),
    inset 0 2px 0 rgba(255, 255, 255, .35),
    inset 0 -8px 20px rgba(0, 60, 60, .18);
}
.action.call .icon { margin-left: 0; }
.action.end {
  background: linear-gradient(90deg, #ff5566 0%, #f0283d 45%, #c4142c 100%);
  box-shadow:
    0 0 34px rgba(255, 50, 70, .38),
    inset 0 2px 0 rgba(255, 255, 255, .35),
    inset 0 -8px 20px rgba(80, 0, 10, .2);
}
.action.end::after { background: linear-gradient(90deg, rgba(60, 196, 255, 0), #3cc4ff 50%, rgba(60, 196, 255, 0)); box-shadow: 0 0 16px 3px rgba(60, 196, 255, .5); }
.action.end .icon { transform: rotate(135deg); }
.action.end .divider { background: #fff; box-shadow: 0 0 8px rgba(255, 255, 255, .6); }

/* ---------- call screen ---------- */
.call-number {
  position: absolute; left: 0; right: 0; top: 360px;
  text-align: center;
  font-weight: 700; font-size: 200px; line-height: 1; letter-spacing: -2px;
  white-space: nowrap;
  text-shadow: 0 0 30px rgba(140, 215, 255, .35);
}
.call-sub {
  position: absolute; left: 0; right: 0; top: 600px;
  text-align: center;
  font-family: 'Montserrat', 'Segoe UI', sans-serif; font-weight: 500;
  font-size: 40px; letter-spacing: 2px;
  color: rgba(200, 230, 255, .75);
}

.pulse {
  position: absolute; left: 50%; top: 1035px;
  width: 300px; height: 300px; transform: translate(-50%, -50%);
}
.pulse .core {
  position: absolute; inset: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--teal-1), var(--teal-3));
  box-shadow: 0 0 60px rgba(30, 232, 214, .55), inset 0 3px 0 rgba(255, 255, 255, .35);
  color: #fff;
}
.pulse .core svg { width: 130px; height: 130px; }
.ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid rgba(30, 232, 214, .7);
  box-shadow: 0 0 20px rgba(30, 232, 214, .4);
  animation: ripple 2.4s ease-out infinite;
}
.ring.r2 { animation-delay: .8s; }
.ring.r3 { animation-delay: 1.6s; }
@keyframes ripple {
  0% { transform: scale(1); opacity: .9; }
  100% { transform: scale(2.3); opacity: 0; }
}
.pulse.ringing .core { animation: wiggle 1.2s ease-in-out infinite; }
@keyframes wiggle {
  0%, 50%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(-12deg); }
  20%, 40% { transform: rotate(12deg); }
}
.pulse.connected .ring { animation-duration: 3.6s; border-color: rgba(60, 196, 255, .5); }
.pulse.ended .ring { animation: none; opacity: 0; }
.pulse.ended .core { background: linear-gradient(135deg, #ff5566, #c4142c); box-shadow: 0 0 60px rgba(255, 50, 70, .5); }
.pulse.ended .core svg { transform: rotate(135deg); }

.status {
  position: absolute; left: 0; right: 0; top: 1300px;
  text-align: center;
  font-family: 'Montserrat', 'Segoe UI', sans-serif; font-weight: 600;
  font-size: 58px; letter-spacing: 3px;
}
.dots i { font-style: normal; animation: blink 1.4s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; }
.dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .15; } 40% { opacity: 1; } }

.timer {
  position: absolute; left: 0; right: 0; top: 1395px;
  text-align: center;
  font-weight: 600; font-size: 64px; letter-spacing: 4px;
  font-variant-numeric: tabular-nums;
  color: rgba(200, 235, 255, .85);
  opacity: 0; transition: opacity .3s;
}
.timer.show { opacity: 1; }

/* ---------- skins: art tagged data-art="<skin>" only shows for that skin ---------- */
[data-art] { display: none; }
html[data-skin="classic"] [data-art="classic"] { display: block; }
.art-full { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ---------- dev mode ---------- */
.dev-hotspot {
  position: absolute; right: 0; top: 0;
  width: 200px; height: 200px;
  z-index: 50;
}
.dev-menu {
  position: absolute; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: rgba(2, 10, 24, .72);
  backdrop-filter: blur(10px);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  color: #f4f8ff;
}
.dev-menu.open { opacity: 1; pointer-events: auto; }
.dev-panel {
  width: 860px; padding: 56px 56px 60px;
  border-radius: 44px;
  background: linear-gradient(180deg, #13263f, #0b1829);
  border: 2px solid rgba(120, 190, 255, .25);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  transform: translateY(20px); transition: transform .2s ease;
}
.dev-menu.open .dev-panel { transform: none; }
.dev-head { display: flex; align-items: center; justify-content: space-between; }
.dev-head h2 { font-family: 'Montserrat', 'Segoe UI', sans-serif; font-weight: 700; font-size: 56px; letter-spacing: 1px; }
.dev-close { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); }
.dev-close svg { width: 48px; height: 48px; }
.dev-close:active { background: rgba(255, 255, 255, .18); }
.dev-sub { margin: 14px 0 40px; font-size: 32px; color: rgba(200, 220, 245, .7); }
.dev-skins { display: flex; flex-direction: column; gap: 22px; }
.dev-skin {
  display: flex; align-items: center; gap: 34px;
  width: 100%; min-height: 150px; padding: 24px 34px;
  border-radius: 30px; text-align: left;
  background: rgba(255, 255, 255, .06);
  border: 3px solid transparent;
  transition: background .12s, border-color .12s;
}
.dev-skin:active { background: rgba(255, 255, 255, .14); }
.dev-skin.current { border-color: #3cc4ff; background: rgba(60, 196, 255, .12); }
.dev-skin:disabled { opacity: .4; cursor: default; }
.dev-skin .swatch { flex: none; width: 104px; height: 104px; border-radius: 24px; border: 2px solid rgba(255, 255, 255, .25); background: #3a4a60; }
.dev-skin .swatch[data-id="classic"] { background: linear-gradient(160deg, #0a2a48 40%, #1ee8d6 41%, #0f9e93 60%, #031c32 61%); }
.dev-skin .swatch[data-id="skyline"] { background: linear-gradient(160deg, #c6ecfd 40%, #013393 41%, #02b3ee 60%, #e9f7ff 61%); }
.dev-skin .swatch[data-id="navy"] { background: linear-gradient(160deg, #fff 40%, #272372 41%, #272372 60%, #c9a6ef 61%, #a7e3e3 75%); border: 6px solid #272372; }
.dev-skin .meta { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.dev-skin .name { font-weight: 700; font-size: 44px; }
.dev-skin .note { font-size: 30px; color: rgba(200, 220, 245, .7); }
.dev-skin .tag { font-size: 26px; font-weight: 700; letter-spacing: 2px; color: #3cc4ff; }
.dev-quit {
  margin-top: 44px; width: 100%; height: 130px;
  border-radius: 30px;
  font-family: 'Montserrat', 'Segoe UI', sans-serif; font-weight: 700; font-size: 44px; letter-spacing: 2px;
  color: #fff; background: linear-gradient(90deg, #ff5566, #c4142c);
}
.dev-quit:active { filter: brightness(1.1); }
.dev-quit:disabled { opacity: .35; }

.display .flare { display: none; }
