/* Securinets ISET Zaghouan CTF 2026 - FIRST BLOOD big screen, Christmas edition.
 * Self-contained: fonts/images are vendored from the platform's xmas theme. */
@font-face { font-family: "Raleway"; font-weight: 800; font-display: swap; src: url("/static/raleway-latin-800.woff2") format("woff2"); }
@font-face { font-family: "Raleway"; font-weight: 900; font-display: swap; src: url("/static/raleway-latin-900.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 400; font-display: swap; src: url("/static/lato-latin-400.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 700; font-display: swap; src: url("/static/lato-latin-700.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 900; font-display: swap; src: url("/static/lato-latin-900.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --night-0: #040a1a; --night-1: #0b1838; --night-2: #16285a;
  --red: #e90504; --red-deep: #8e0010; --red-ink: #b3001b; --red-dark: #3a0008;
  --green: #2f8f4e; --green-deep: #14472a; --green-pale: #a3d39c;
  --gold: #ffd166; --gold-deep: #c9962c;
  --snow: #f6f9ff; --ink: #2b2f36; --muted: #9fb0d0;
  --f-head: "Raleway", "Lato", system-ui, sans-serif;
  --f-body: "Lato", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  overflow: hidden; color: var(--snow); font-family: var(--f-body); -webkit-font-smoothing: antialiased;
  background: radial-gradient(ellipse at 50% 0%, var(--night-2) 0%, var(--night-1) 38%, var(--night-0) 100%);
}
[hidden] { display: none !important; }

/* ===================================================== scenery */
.sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.moon { position: fixed; z-index: 0; top: 9vh; right: 9vw; width: clamp(70px, 9vw, 150px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fffdf2 0%, #f3ead0 55%, #d8cba4 100%);
  box-shadow: 0 0 40px 10px rgba(255, 246, 214, .25), 0 0 120px 40px rgba(255, 246, 214, .08); }
.moon::after { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 62% 58%, rgba(0,0,0,.08) 0 9%, transparent 10%),
              radial-gradient(circle at 40% 70%, rgba(0,0,0,.06) 0 6%, transparent 7%),
              radial-gradient(circle at 70% 30%, rgba(0,0,0,.05) 0 5%, transparent 6%); }
.lights { position: fixed; z-index: 6; top: 0; left: 0; right: 0; height: 15px; pointer-events: none;
  background: url("/static/lights2-transparent.gif") repeat-x top left; }
.ground { position: fixed; z-index: 2; left: 0; right: 0; bottom: 0; height: 70px; pointer-events: none;
  background: url("/static/snow_bottom_border.png") repeat-x bottom center / auto 70px; }

.kicker { margin: 0; font-family: var(--f-body); font-weight: 700; font-size: clamp(.7rem, 1.4vw, 1rem);
  letter-spacing: .32em; text-transform: uppercase; color: var(--green-pale); }

/* candy-cane lettering */
.cane { display: inline-block; font-family: var(--f-head); font-weight: 900; text-transform: uppercase; letter-spacing: .04em;
  color: var(--snow);
  background: repeating-linear-gradient(-45deg, #ffffff 0 .16em, #ffe9e9 .16em .2em, var(--red) .2em .36em, #c40003 .36em .4em);
  background-size: 200% 200%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 var(--red-dark)) drop-shadow(0 0 18px rgba(255, 80, 80, .35));
  animation: caneSlide 6s linear infinite; }
@keyframes caneSlide { to { background-position: 100% 100%; } }

/* xmas-theme card: white card + tilted red layer behind (same idea as the platform) */
.xcard, .tag-card { position: relative; z-index: 0; color: var(--ink); border-radius: 6px;
  background: linear-gradient(160deg, #ffffff 0%, #f1f5fb 60%, #e4ebf6 100%);
  box-shadow: 0 0 15px rgba(0, 0, 0, .5); }
.xcard::before, .tag-card::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 6px;
  background: linear-gradient(160deg, var(--red) 0%, var(--red-deep) 100%); transform: rotate(-2.6deg); box-shadow: 0 0 15px rgba(0,0,0,.45); }
.xcard::after, .tag-card::after { content: ""; position: absolute; inset: 0; border-radius: 6px; z-index: 0; pointer-events: none;
  background: linear-gradient(160deg, #ffffff 0%, #f1f5fb 60%, #e4ebf6 100%); }
.xcard > *, .tag-card > * { position: relative; z-index: 1; }
.xcard-label { font-family: var(--f-head); font-weight: 800; font-size: clamp(.8rem, 1.5vw, 1.05rem); letter-spacing: .14em;
  text-transform: uppercase; color: var(--red-ink); margin-bottom: .8rem; }

/* ===================================================== arm screen */
.arm { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 2rem;
  background: radial-gradient(ellipse at 50% 30%, rgba(22, 40, 90, .55), rgba(4, 10, 26, .92)); }
.tag-card { max-width: 40rem; padding: 2.4rem 2.6rem 2.2rem; text-align: center; }
.tag-card .kicker { color: var(--green); }
.tag-card h1 { margin: .7rem 0 1rem; font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1; }
.tag-card h1 .cane { filter: drop-shadow(0 2px 0 var(--red-dark)); }
.tag-card h1 small { display: block; margin-top: .55rem; font-family: var(--f-body); font-weight: 900; font-size: .32em;
  letter-spacing: .38em; text-transform: uppercase; color: var(--green); }
.tag-card p { margin: 0 auto 1.6rem; max-width: 34rem; line-height: 1.55; color: #4a5160; }
.tag-card button { cursor: pointer; font-family: var(--f-head); font-weight: 900; font-size: 1.05rem; letter-spacing: .12em;
  text-transform: uppercase; padding: .95rem 2.3rem; border: 0; border-radius: 999px; color: #fff;
  background: linear-gradient(180deg, #ff2b2b, var(--red) 55%, var(--red-deep)); box-shadow: 0 6px 0 var(--red-dark), 0 10px 24px rgba(233, 5, 4, .35);
  transition: transform .12s ease, box-shadow .12s ease; }
.tag-card button:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--red-dark), 0 14px 30px rgba(233, 5, 4, .45); }
.tag-card button:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--red-dark); }
.tag-card button:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

/* ===================================================== idle screen */
.idle { position: fixed; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(1rem, 2.6vh, 2rem); text-align: center; padding: 3rem 2rem 6rem; }
.status { position: absolute; top: 2.2rem; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: .6rem;
  padding: .4rem 1rem; border-radius: 999px; background: rgba(4, 10, 26, .55); border: 1px solid rgba(163, 211, 156, .35);
  font-weight: 700; font-size: clamp(.65rem, 1.2vw, .85rem); letter-spacing: .22em; text-transform: uppercase; color: var(--green-pale); }
.status .dot { width: 9px; height: 9px; border-radius: 50%; background: #37d63e; box-shadow: 0 0 10px #37d63e; animation: blink 2.2s ease-in-out infinite; }
.idle.disconnected .status { color: #ffb3b3; border-color: rgba(233, 5, 4, .5); }
.idle.disconnected .status .dot { background: var(--red); box-shadow: 0 0 10px var(--red); }
@keyframes blink { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.3); } }
.idle-title { margin: 0; font-family: var(--f-head); font-weight: 900; font-size: clamp(2rem, 6.4vw, 5.4rem); line-height: 1.05;
  text-shadow: 0 4px 24px rgba(0, 0, 0, .55); }
.idle-title .cane { display: inline; }

.countdown { padding: 1.2rem 1.8rem 1.4rem; }
.cd { display: flex; gap: clamp(.6rem, 2vw, 1.6rem); justify-content: center; }
.cd div { min-width: 4.6rem; }
.cd b { display: block; font-family: var(--f-head); font-weight: 900; font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1; color: var(--red-ink);
  font-variant-numeric: tabular-nums; }
.cd span { display: block; margin-top: .35rem; font-size: .72rem; font-weight: 900; letter-spacing: .25em; text-transform: uppercase; color: var(--green); }

.board { width: min(46rem, 92vw); padding: 1.2rem 1.6rem 1.1rem; text-align: left; }
.board ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.board li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .9rem; padding: .55rem .8rem;
  border-radius: 4px; background: rgba(43, 47, 54, .05); font-size: clamp(.9rem, 1.6vw, 1.15rem); }
.board li:first-child:not(.empty) { background: rgba(233, 5, 4, .08); box-shadow: inset 3px 0 0 var(--red); }
.board li .bauble { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 12%, var(--red) 40%, var(--red-deep)); }
.board li:nth-child(even) .bauble { background: radial-gradient(circle at 35% 30%, #fff 0 12%, var(--green) 40%, var(--green-deep)); }
.board li:nth-child(3n) .bauble { background: radial-gradient(circle at 35% 30%, #fff 0 12%, var(--gold) 40%, var(--gold-deep)); }
.board .who { font-weight: 900; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .what { color: #5a6272; font-weight: 400; }
.board .when { font-weight: 700; color: var(--green); font-variant-numeric: tabular-nums; font-size: .85em; }
.board li.empty { display: block; color: #6b7384; font-style: italic; background: none; }
.board li.fresh { animation: fresh 1.2s ease both; }
@keyframes fresh { from { opacity: 0; transform: translateX(-12px); background: rgba(255, 209, 102, .55); } to { opacity: 1; transform: none; } }

/* ===================================================== the takeover */
.fb-overlay { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 1.5rem; overflow: hidden; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at 50% 42%, #c4001e 0%, #7a0012 38%, #2a0008 72%, #0c0207 100%); }
.fb-overlay.is-active { pointer-events: auto; opacity: 1; animation: fbIn .14s ease-out both; }
.fb-overlay.is-leaving { animation: fbOut .6s ease-in both; }
@keyframes fbIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fbOut { from { opacity: 1; } to { opacity: 0; } }
.fb-flash { position: absolute; inset: 0; z-index: 8; background: #fff; pointer-events: none; opacity: 0; }
.fb-overlay.is-active .fb-flash { animation: fbFlash .7s ease-out both; }
@keyframes fbFlash { 0% { opacity: .95; } 100% { opacity: 0; } }
.fb-rays { position: absolute; left: 50%; top: 44%; width: 220vmax; height: 220vmax; z-index: 0; pointer-events: none; transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(255, 209, 102, .10) 0deg 6deg, transparent 6deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 0%, transparent 55%); mask: radial-gradient(circle, #000 0%, transparent 55%);
  animation: fbSpin 40s linear infinite; }
@keyframes fbSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.fb-fx { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.fb-splats { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.fb-icicles { position: absolute; top: 0; left: 0; right: 0; height: clamp(90px, 14vh, 160px); z-index: 4; pointer-events: none;
  background: url("/static/icicles.png") repeat-x top center / auto 100%; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35));
  transform: translateY(-100%); }
.fb-overlay.is-active .fb-icicles { animation: fbDrop .6s cubic-bezier(.2, 1.4, .4, 1) .15s both; }
@keyframes fbDrop { to { transform: translateY(0); } }
.fb-runs { position: absolute; inset: 0 0 auto 0; z-index: 3; pointer-events: none; height: 0; }
.fb-run { position: absolute; top: clamp(40px, 7vh, 80px); width: var(--rw, 5px); height: 0; border-radius: 0 0 40% 40%;
  background: linear-gradient(to bottom, var(--red-dark), #74101c 35%, var(--red-ink) 75%, #ff2b3e);
  box-shadow: inset 1.5px 0 0 rgba(255, 170, 170, .3), inset -1px 0 0 rgba(0, 0, 0, .35), 0 0 7px rgba(0, 0, 0, .55);
  animation: fbRun var(--rt, 2.6s) cubic-bezier(.45, 0, .9, .35) var(--rd, 0s) forwards; }
.fb-run::after { content: ""; position: absolute; left: 50%; bottom: -3px; transform: translateX(-50%);
  width: calc(var(--rw, 5px) + 5px); height: calc(var(--rw, 5px) + 7px); border-radius: 50% 50% 48% 48%;
  background: radial-gradient(circle at 38% 30%, #ff9aa2, var(--red-ink) 42%, var(--red-dark)); }
@keyframes fbRun { from { height: 0; } to { height: var(--rh, 30vh); } }
.fb-splat { position: absolute; opacity: 0; transform: scale(.6) rotate(var(--sr, 0deg)); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); }
.fb-overlay.is-active .fb-splat { animation: fbSplat .5s cubic-bezier(.16, 1, .3, 1) var(--sd, .1s) both; }
@keyframes fbSplat { from { opacity: 0; transform: scale(.35) rotate(var(--sr, 0deg)); } to { opacity: var(--so, .7); transform: scale(1) rotate(var(--sr, 0deg)); } }
.fb-star { position: absolute; z-index: 3; top: 18%; left: -20%; width: 22vw; height: 3px; pointer-events: none; border-radius: 3px;
  background: linear-gradient(90deg, transparent, rgba(255, 209, 102, .2), #fff6d6); box-shadow: 0 0 14px 2px rgba(255, 209, 102, .6); opacity: 0;
  transform: rotate(-14deg); }
.fb-star::after { content: "\2605"; position: absolute; right: -.55em; top: 50%; transform: translateY(-52%); font-size: 2.2rem; color: #fff6d6;
  text-shadow: 0 0 16px var(--gold), 0 0 30px var(--gold); }
.fb-overlay.is-active .fb-star { animation: fbStar 2.4s cubic-bezier(.3, .1, .3, 1) 1.1s both; }
@keyframes fbStar { 0% { opacity: 0; transform: translate(0, 0) rotate(-14deg); } 10% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(150vw, -32vh) rotate(-14deg); } }

.fb-stage { position: relative; z-index: 5; max-width: 94vw; display: flex; flex-direction: column; align-items: center; }
.fb-kicker { margin-bottom: .9rem; font-weight: 900; font-size: clamp(.8rem, 1.7vw, 1.25rem); letter-spacing: .5em; text-transform: uppercase;
  color: var(--gold); text-shadow: 0 0 12px rgba(255, 209, 102, .5); opacity: 0; }
.fb-overlay.is-active .fb-kicker { animation: fbFade .6s ease .35s both; }
.fb-headline { margin: 0; font-size: clamp(3rem, 13vw, 10rem); line-height: .95; opacity: 0; white-space: nowrap; }
.fb-headline.cane { filter: drop-shadow(0 5px 0 var(--red-dark)) drop-shadow(0 0 30px rgba(255, 255, 255, .35)); }
.fb-overlay.is-active .fb-headline { animation: fbHeadIn .7s cubic-bezier(.2, 1.6, .4, 1) .25s both, caneSlide 3s linear infinite; }
@keyframes fbHeadIn { from { opacity: 0; transform: scale(.55) rotate(-4deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
.fb-sub { margin: 1.4rem 0 1.2rem; font-size: clamp(1.1rem, 3vw, 2rem); color: #ffd9dc; opacity: 0; }
.fb-sub .fb-chal { color: #fff; font-weight: 900; }
.fb-sub .fb-by { color: var(--green-pale); font-weight: 700; font-style: italic; }
.fb-overlay.is-active .fb-sub { animation: fbFade .8s ease .95s both; }
@keyframes fbFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* gift tag with the team name */
.fb-gift { position: relative; padding: clamp(1rem, 2.4vh, 1.6rem) clamp(1.8rem, 5vw, 4rem); opacity: 0; }
.fb-overlay.is-active .fb-gift { animation: fbGift .9s cubic-bezier(.2, 1.5, .4, 1) 1.25s both; }
@keyframes fbGift { from { opacity: 0; transform: translateY(40px) scale(.8) rotate(4deg); } to { opacity: 1; transform: none; } }
.fb-gift .ribbon { position: absolute; z-index: 2; top: -1px; bottom: -1px; left: 50%; width: 18px; transform: translateX(-50%);
  background: linear-gradient(90deg, #a87c1f, var(--gold) 40%, #fff1c4 50%, var(--gold) 60%, #a87c1f); opacity: .9; }
.fb-gift .bow { position: absolute; z-index: 3; top: -26px; left: 50%; transform: translateX(-50%); font-size: 46px; line-height: 1;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .35)); }
.fb-team { position: relative; z-index: 3; font-family: var(--f-head); font-weight: 900; font-size: clamp(2.2rem, 7.5vw, 6rem); line-height: 1.05;
  color: var(--red-ink); text-transform: uppercase; letter-spacing: .02em; word-break: break-word;
  text-shadow: 0 0 0 transparent, 3px 3px 0 rgba(255, 255, 255, .9); }
.fb-team span { background: linear-gradient(180deg, #fff 0 0); padding: 0 .2em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

.fb-meta { margin-top: 1.6rem; display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; opacity: 0; }
.fb-overlay.is-active .fb-meta { animation: fbFade .7s ease 2s both; }
.fb-chip { font-weight: 900; font-size: clamp(.9rem, 1.6vw, 1.2rem); letter-spacing: .15em; text-transform: uppercase; padding: .45rem 1.1rem;
  border-radius: 999px; border: 2px solid rgba(255, 255, 255, .7); background: var(--green-deep); color: #e9ffe6; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.fb-chip.gold { background: linear-gradient(180deg, #ffe08a, var(--gold) 50%, var(--gold-deep)); color: #3a2700; border-color: #fff4cc; }
.fb-timer { position: absolute; left: 0; bottom: 0; height: 10px; width: 100%; z-index: 7; transform-origin: left;
  background: repeating-linear-gradient(-45deg, #fff 0 12px, var(--red) 12px 24px); box-shadow: 0 0 12px rgba(255, 255, 255, .45); }
.fb-overlay.is-active .fb-timer { animation: fbTimer var(--fb-duration, 10s) linear both; }
@keyframes fbTimer { from { transform: scaleX(1); } to { transform: scaleX(0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .fb-headline, .fb-sub, .fb-gift, .fb-meta, .fb-kicker, .fb-splat, .fb-icicles { opacity: 1 !important; transform: none !important; }
  .fb-run { height: var(--rh, 30vh) !important; }
  .fb-star, .fb-flash { display: none; }
}
@media (max-width: 640px) {
  .board li { grid-template-columns: auto 1fr; } .board .when { display: none; }
  .fb-headline { white-space: normal; }
  .fb-gift { max-width: 94vw; padding-left: 1rem; padding-right: 1rem; }
  .fb-team { font-size: clamp(1.5rem, 8.5vw, 2.6rem); }
}
