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

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #0c0c0e;
  color: #a8a8b0;
  font-family: 'DM Mono', monospace;
}

.ft-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: linear-gradient(180deg, #101014 0%, #08080a 100%);
}

.ft-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(100, 100, 110, 0.2);
  background: rgba(0, 0, 0, 0.45);
}

.ft-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ft-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #40c060;
  box-shadow: 0 0 8px rgba(64, 192, 96, 0.6);
  transition: background 0.2s, box-shadow 0.2s;
}

.ft-dot.ft-away {
  background: #c04040;
  box-shadow: 0 0 8px rgba(192, 64, 64, 0.5);
}

.ft-brand h1 {
  margin: 0;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: #e0e0e8;
}

.ft-credit {
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  opacity: 0.4;
}

.ft-exit {
  font-size: 0.68rem;
  color: rgba(160, 160, 170, 0.55);
  text-decoration: none;
  padding: 5px 10px;
  border: 1px solid rgba(80, 80, 90, 0.3);
  border-radius: 3px;
}

.ft-main {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr min(260px, 34vw);
  gap: 12px;
  padding: 12px;
  min-height: 0;
}

.ft-monitor {
  position: relative;
  min-height: 0;
  border: 3px solid #222228;
  border-radius: 6px;
  background: #060608;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8);
}

.ft-screen-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.ft-status {
  margin: 0 0 6px;
  font-size: 0.85rem;
  letter-spacing: 0.28em;
  color: #c0c0c8;
}

.ft-sub {
  margin: 0 0 28px;
  font-size: 0.72rem;
  opacity: 0.5;
}

.ft-progress-wrap {
  width: min(420px, 90%);
}

.ft-progress-label {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.45;
  margin-bottom: 8px;
  text-align: left;
}

.ft-bar {
  height: 14px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(80, 80, 90, 0.35);
  border-radius: 3px;
  overflow: hidden;
}

.ft-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #204030, #50c080);
  transition: width 0.2s linear;
}

.ft-event {
  margin: 24px 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: #ff6060;
  animation: ft-pulse 0.6s ease infinite alternate;
}

@keyframes ft-pulse {
  from { opacity: 0.65; }
  to { opacity: 1; }
}

.ft-hide-timer {
  margin: 10px 0 0;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  color: #8090a0;
}

.ft-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.12) 2px,
    rgba(0, 0, 0, 0.12) 4px
  );
  z-index: 3;
}

.ft-static {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 4;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.ft-static.ft-on { opacity: 0.35; animation: ft-static 0.1s steps(3) infinite; }

@keyframes ft-static {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-1%, 1%); }
  100% { transform: translate(1%, -1%); }
}

.ft-monitor.ft-knock {
  animation: ft-shake 0.15s ease infinite;
}

@keyframes ft-shake {
  0%, 100% { transform: translate(0); }
  50% { transform: translate(2px, -1px); }
}

.ft-panel {
  padding: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(60, 60, 70, 0.25);
  border-radius: 4px;
}

.ft-panel-title {
  margin: 0 0 12px;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.5;
}

.ft-readout {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  font-size: 0.68rem;
}

.ft-readout li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(60, 60, 70, 0.2);
}

.ft-readout strong {
  color: #e0e0e8;
  font-weight: 500;
}

.ft-tip {
  margin: 0;
  font-size: 0.65rem;
  line-height: 1.55;
  opacity: 0.45;
  font-style: italic;
}

.ft-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 6, 8, 0.95);
  text-align: center;
}

.ft-overlay[hidden] { display: none; }

.ft-box { max-width: 440px; }

.ft-badge {
  margin: 0 0 10px;
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  color: #707078;
}

.ft-box h2 {
  margin: 0 0 14px;
  font-size: clamp(1.2rem, 5vw, 1.7rem);
  letter-spacing: 0.1em;
  color: #f0f0f8;
}

.ft-desc {
  margin: 0 0 14px;
  font-size: 0.8rem;
  line-height: 1.65;
  color: rgba(168, 168, 176, 0.78);
}

.ft-rules {
  text-align: left;
  margin: 0 0 14px;
  padding-left: 1.1rem;
  font-size: 0.76rem;
  line-height: 1.65;
  color: rgba(140, 140, 150, 0.65);
}

.ft-note {
  margin: 0 0 18px;
  font-size: 0.65rem;
  opacity: 0.4;
}

.ft-btn {
  padding: 11px 22px;
  font-family: inherit;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e8e8f0;
  background: rgba(28, 28, 32, 0.95);
  border: 1px solid rgba(100, 100, 110, 0.4);
  border-radius: 3px;
  cursor: pointer;
}

.ft-btn:hover { border-color: #c0c0c8; }

.ft-overlay h2 {
  margin: 0 0 12px;
  font-size: 1.4rem;
  letter-spacing: 0.14em;
  color: #f0f0f8;
}

.ft-overlay p {
  margin: 0 0 18px;
  max-width: 380px;
  line-height: 1.6;
  font-size: 0.8rem;
  color: rgba(168, 168, 176, 0.75);
}

@media (max-width: 640px) {
  .ft-main {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }
}
