* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Georgia, "Times New Roman", serif;
  background: #081b2a;
  color: #f7f0df;
}
body {
  overflow: hidden;
}
.screen-board {
  width: 100vw;
  height: 100vh;
  min-width: 960px;
  min-height: 540px;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  grid-template-rows: minmax(0, 1fr) 70px;
  gap: 18px;
  background: radial-gradient(
    circle at 90% 0,
    #254e5b 0,
    #081b2a 47%,
    #06121d 100%
  );
}
.display-main {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 18%;
  gap: 14px;
}
.video-panel,
.timetable-slot,
.announcement-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(247, 240, 223, 0.22);
  background: #102c39;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}
.video-panel {
  min-height: 0;
}
.panel-heading {
  position: absolute;
  z-index: 3;
  inset: 0 0 auto 0;
  display: flex;
  justify-content: space-between;
  padding: 18px 22px;
  color: #f1d79a;
  font:
    700 13px Arial,
    sans-serif;
  letter-spacing: 0.16em;
}
.video-stage {
  position: absolute;
  inset: 0;
}
.video-stage video,
.video-stage img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.video-stage:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.3),
    transparent 32%,
    rgba(0, 0, 0, 0.7)
  );
}
.video-overlay {
  position: absolute;
  z-index: 2;
  right: 28px;
  bottom: 22px;
  left: 28px;
}
.video-overlay h1 {
  margin: 0 0 6px;
  font-size: clamp(28px, 3.3vw, 58px);
  font-weight: 400;
}
.video-overlay p {
  margin: 0;
  max-width: 75%;
  font:
    16px Arial,
    sans-serif;
  color: #d5e0de;
}
.empty-state {
  display: grid;
  place-items: center;
  height: 100%;
  font:
    16px Arial,
    sans-serif;
  color: #aebfbe;
}
.timetable-slot {
  min-height: 100px;
  background: #dfe7e2;
}
.timetable-slot iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.announcement-column {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 18px;
  min-height: 0;
}
.announcement-card {
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  isolation: isolate;
}
.announcement-card:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(transparent 15%, rgba(1, 10, 16, 0.9));
}
.announcement-card a {
  display: block;
  width: 100%;
  height: 100%;
  padding: 22px;
  color: #fff;
  text-decoration: none;
}
.announcement-card h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 2.1vw, 38px);
  font-weight: 400;
}
.announcement-card p {
  margin: 0;
  font:
    14px Arial,
    sans-serif;
  color: #d5e0de;
}
.announcement-label {
  display: inline-block;
  margin-bottom: 28%;
  font:
    700 12px Arial,
    sans-serif;
  letter-spacing: 0.18em;
  color: #f1d79a;
}
.news-ticker {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  min-width: 0;
  background: #e9c46a;
  color: #102c39;
}
.ticker-label {
  padding: 0 22px;
  font:
    700 12px Arial,
    sans-serif;
  letter-spacing: 0.15em;
}
.ticker-viewport {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.ticker-content {
  display: inline-flex;
  gap: 80px;
  min-width: max-content;
  font:
    700 20px Arial,
    sans-serif;
  animation: ticker-scroll var(--ticker-duration, 24s) linear infinite;
}
.clock {
  padding: 0 22px;
  margin-left: auto;
  font:
    700 18px Arial,
    sans-serif;
}
@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
.admin-page {
  overflow: auto;
  background: linear-gradient(135deg, #081b2a, #d8a954);
  padding: 48px 24px;
}
.admin-shell {
  max-width: 1180px;
  margin: auto;
}
.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}
.eyebrow {
  margin: 0 0 8px;
  color: #e9c46a;
  font:
    700 12px Arial,
    sans-serif;
  letter-spacing: 0.18em;
}
.admin-header h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 400;
}
.lead {
  max-width: 650px;
  margin: 10px 0 0;
  font:
    16px Arial,
    sans-serif;
  color: #cbd7d4;
}
.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.admin-card {
  padding: 26px;
  background: rgba(6, 18, 29, 0.91);
  border: 1px solid rgba(247, 240, 223, 0.18);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.16);
}
.admin-wide {
  grid-column: 1/-1;
}
.admin-card h2 {
  margin: 0 0 20px;
  font-size: 28px;
  font-weight: 400;
}
label {
  display: grid;
  gap: 7px;
  margin: 0 0 16px;
  font:
    700 12px Arial,
    sans-serif;
  letter-spacing: 0.05em;
  color: #cbd7d4;
}
input,
textarea,
select {
  width: 100%;
  padding: 12px;
  border: 1px solid #42616a;
  background: #102c39;
  color: #f7f0df;
  font:
    15px Arial,
    sans-serif;
  border-radius: 0;
}
textarea {
  resize: vertical;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 16px;
}
.wide-field {
  grid-column: 1/-1;
}
.button-row,
.list-footer {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.button {
  display: inline-block;
  padding: 12px 16px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  font:
    700 12px Arial,
    sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.button-primary {
  background: #e9c46a;
  color: #102c39;
}
.button-secondary {
  background: transparent;
  border-color: #66828a;
  color: #f7f0df;
}
.hint,
.note {
  font:
    13px Arial,
    sans-serif;
  color: #9fb5b4;
}
.slide-list {
  display: grid;
  gap: 9px;
  margin-bottom: 16px;
}
.slide-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  background: #102c39;
  font:
    14px Arial,
    sans-serif;
}
.slide-card span {
  display: block;
  margin-top: 4px;
  color: #9fb5b4;
}
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.actions .button {
  padding: 8px 10px;
}
.admin-card #import-json {
  margin-top: 12px;
  min-height: 110px;
}
@media (max-width: 900px) {
  body {
    overflow: auto;
  }
  .screen-board {
    min-width: 0;
    min-height: 100vh;
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: 65vh 60vh 70px;
  }
  .announcement-column {
    grid-column: 1;
    grid-row: 2;
  }
  .news-ticker {
    grid-row: 3;
  }
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .admin-wide {
    grid-column: auto;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .wide-field {
    grid-column: auto;
  }
  .admin-header {
    align-items: start;
    flex-direction: column;
  }
}
