@font-face {
  font-family: "Centrale Sans";
  src: url("/fonts/CentraleSans-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Centrale Sans";
  src: url("/fonts/CentraleSans-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
}

:root {
  --stage-scale: 1;
  --note-scale: 1;
  --bg-0: #04111f;
  --bg-1: #0a1d36;
  --bg-2: #123864;
  --text: #f4f8ff;
  --muted: rgba(244, 248, 255, 0.72);
  --accent: #9ff6bf;
  --accent-2: #88d9ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  min-height: 100dvh;
  font-family: "Centrale Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 18%, rgba(136, 217, 255, 0.18), transparent 22%),
    radial-gradient(circle at 82% 16%, rgba(159, 246, 191, 0.12), transparent 18%),
    radial-gradient(circle at 50% 90%, rgba(255, 214, 107, 0.08), transparent 24%),
    linear-gradient(135deg, var(--bg-0), var(--bg-1) 44%, var(--bg-2));
}

.hidden {
  display: none !important;
}

.display-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1920px;
  height: 1080px;
  transform: translate(-50%, -50%) scale(var(--stage-scale));
  transform-origin: center center;
  overflow: hidden;
  border-radius: 32px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.4);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 26%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.02), transparent 42%);
}

.display-stage.visual-mode {
  position: fixed;
  inset: 0;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100dvh;
  transform: none;
  transform-origin: top left;
  border-radius: 0;
  box-shadow: none;
}

.display-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 120px 120px;
  opacity: 0.2;
  pointer-events: none;
}

.stage-glow {
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.22;
  pointer-events: none;
}

.glow-a {
  left: -180px;
  bottom: -210px;
  background: #52ddff;
}

.glow-b {
  right: -160px;
  top: -220px;
  background: #9ff6bf;
}

.stage-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 12%, transparent 88%, rgba(255, 255, 255, 0.03)),
    radial-gradient(circle at center, transparent 60%, rgba(0, 0, 0, 0.12));
  pointer-events: none;
}

.board-header {
  position: absolute;
  top: 34px;
  left: 40px;
  right: 40px;
  z-index: 360;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 10px;
  pointer-events: none;
}

.header-copy {
  max-width: 380px;
  padding: 10px 12px 11px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(8, 18, 38, 0.76), rgba(8, 18, 38, 0.36));
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(12px);
}

.board-kicker {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 6px;
  font-weight: 700;
}

.board-header h1 {
  margin: 8px 0 5px;
  font-size: 24px;
  line-height: 0.94;
  letter-spacing: -0.06em;
}

.board-header p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.flow-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.flow-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.flow-note {
  position: absolute;
  width: 248px;
  min-height: 304px;
  padding: 32px 20px 18px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 18%),
    linear-gradient(135deg, var(--card-bg), var(--card-bg));
  color: #153053;
  box-shadow:
    0 18px 38px rgba(3, 9, 22, 0.22),
    0 3px 0 rgba(255, 255, 255, 0.18) inset;
  display: flex;
  flex-direction: column;
  gap: 10px;
  will-change: transform, opacity;
}

.flow-note-slot {
  transform-origin: top left;
}

.flow-note-slot--hero {
  box-shadow:
    0 22px 46px rgba(3, 9, 22, 0.28),
    0 3px 0 rgba(255, 255, 255, 0.18) inset;
}

.flow-note::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), transparent 28%, rgba(0, 0, 0, 0.03));
  pointer-events: none;
}

.flow-note.fresh {
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.46),
    0 0 42px rgba(255, 216, 107, 0.38),
    0 18px 38px rgba(3, 9, 22, 0.22),
    0 3px 0 rgba(255, 255, 255, 0.18) inset;
}

.note-tape {
  position: absolute;
  left: 26px;
  top: 11px;
  width: 74px;
  height: 18px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.36);
  transform: rotate(-7deg);
}

.note-pin {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--card-accent);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.17);
}

.note-tag {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-self: flex-start;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(21, 48, 83, 0.08);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.note-name {
  position: relative;
  z-index: 1;
  margin-top: 4px;
  font-size: 28px;
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.05em;
  word-break: break-word;
}

.note-university {
  position: relative;
  z-index: 1;
  font-size: 18px;
  line-height: 1.22;
  font-weight: 700;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.note-department {
  position: relative;
  z-index: 1;
  font-size: 15px;
  line-height: 1.38;
  opacity: 0.88;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.note-time {
  position: relative;
  z-index: 1;
  margin-top: auto;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.62;
}

.flow-empty {
  position: absolute;
  left: 50%;
  top: 54%;
  width: 560px;
  transform: translate(-50%, -50%);
  z-index: 12;
  display: grid;
  place-items: center;
  gap: 14px;
  text-align: center;
  padding: 28px 36px 34px;
  border-radius: 30px;
  background: rgba(8, 18, 38, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  transition: opacity 0.28s ease;
}

.flow-empty.hidden {
  opacity: 0;
  pointer-events: none;
}

.empty-stack {
  position: relative;
  width: 250px;
  height: 150px;
}

.empty-note {
  position: absolute;
  width: 118px;
  height: 118px;
  border-radius: 18px;
  box-shadow: 0 16px 34px rgba(3, 9, 22, 0.24);
}

.note-a {
  left: 2px;
  top: 18px;
  background: #ffd86b;
  transform: rotate(-9deg);
}

.note-b {
  left: 68px;
  top: 0;
  background: #9ce7ff;
}

.note-c {
  right: 0;
  top: 20px;
  background: #ffb3c7;
  transform: rotate(8deg);
}

.flow-empty h2 {
  margin: 0;
  font-size: 42px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.flow-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.45;
}

.ticker {
  position: absolute;
  left: 40px;
  right: 40px;
  bottom: 26px;
  height: 54px;
  z-index: 360;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(8, 18, 38, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.09);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  backdrop-filter: blur(10px);
}

.ticker.hidden {
  display: none;
}

.ticker-label {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.ticker-track-wrap {
  overflow: hidden;
  height: 100%;
}

.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 42px;
  min-width: max-content;
  height: 100%;
  padding-right: 42px;
  white-space: nowrap;
  animation: ticker-slide 42s linear infinite;
}

.ticker-track span {
  color: rgba(244, 248, 255, 0.86);
  font-size: 16px;
}

.ticker-track strong {
  color: #ffffff;
}

.qr-panel {
  position: absolute;
  right: 40px;
  bottom: 96px;
  z-index: 380;
  display: grid;
  grid-template-columns: 1fr 126px;
  align-items: center;
  gap: 16px;
  min-width: 350px;
  padding: 16px 18px;
  border-radius: 26px;
  background: rgba(8, 18, 38, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
}

.qr-panel.hidden {
  display: none;
}

.qr-panel.without-ticker {
  bottom: 38px;
}

.qr-panel-title {
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.qr-panel-subtitle {
  margin-top: 6px;
  color: rgba(244, 248, 255, 0.76);
  font-size: 11px;
  line-height: 1.45;
}

.qr-panel-image-wrap {
  width: 126px;
  height: 126px;
  padding: 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  display: grid;
  place-items: center;
}

.qr-panel-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.fullscreen-btn {
  position: absolute;
  left: 22px;
  bottom: 96px;
  z-index: 420;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(136, 217, 255, 0.22);
  border-radius: 14px;
  background: rgba(8, 18, 38, 0.74);
  color: rgba(244, 248, 255, 0.94);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 22px;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.fullscreen-btn:hover {
  transform: translateY(-1px);
  background: rgba(12, 27, 49, 0.9);
}

html.display-fullscreen .fullscreen-btn {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@keyframes ticker-slide {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation: none;
  }
}
