﻿/* styles.css - signage layout to match the provided reference */
:root {
  --blue-top: #ffffff;
  --blue-deep: #ffffff;
  --gray-head: #f2f2f2;
  --gray-head-2: #e6e6e6;
  --row-dark: #f7f7f7;
  --row-light: #ffffff;
  --text: #111111;
  --muted: #4b4b4b;
  --accent: #1a1a1a;
  --border: #e0e0e0;
  --row-border: #e6e6e6;
  --departed-bg: #eeeeee;
  --departed-text: #6b6b6b;
  --digit-font: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

body[data-theme="blue"] {
  --blue-top: #0a3a6f;
  --blue-deep: #0a2954;
  --gray-head: #3a3a3a;
  --gray-head-2: #505050;
  --row-dark: #1c2b47;
  --row-light: #45629a;
  --text: #f4f7ff;
  --muted: #cfe0ff;
  --accent: #2fb2ff;
  --border: #122848;
  --row-border: rgba(255, 255, 255, 0.08);
  --departed-bg: #2b2f38;
  --departed-text: #b7c0cf;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: var(--text);
  background: var(--blue-deep);
  height: 100vh;
  overflow: hidden;
}

html {
  height: 100%;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  background: var(--blue-top);
  border-bottom: 2px solid var(--border);
}

.title-block h1 {
  margin: 0 0 6px;
  font-size: 34px;
  letter-spacing: 0.08em;
}

.subtitle {
  margin: 0;
  font-size: 18px;
  color: var(--muted);
}

.time-block {
  text-align: right;
  font-size: 16px;
}

.time-main {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: flex-end;
}

.time-main .label {
  font-size: 16px;
  color: var(--muted);
}

.time-value {
  font-family: var(--digit-font);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.time-sub {
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
}

.table {
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.table-head {
  display: grid;
  grid-template-columns: 220px 160px 1fr 140px 160px 220px;
  background: var(--gray-head);
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
  min-width: 860px;
}

.table-head div {
  padding: 14px 16px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.table-head div:nth-child(2) {
  background: var(--gray-head-2);
}

.table-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.row {
  display: grid;
  grid-template-columns: 220px 160px 1fr 140px 160px 220px;
  padding: 10px 0;
  border-bottom: 1px solid var(--row-border);
  align-items: center;
  min-height: 56px;
  min-width: 860px;
}

.row:nth-child(odd) {
  background: var(--row-light);
}

.row:nth-child(even) {
  background: var(--row-dark);
}

.row.departed {
  background: var(--departed-bg);
  color: var(--departed-text);
}

.row.departed .company {
  color: var(--departed-text);
}

.row.departed .depart,
.row.departed .arrival,
.row.departed .route,
.row.departed .note {
  color: var(--departed-text);
}

.cell {
  padding: 6px 16px;
  font-size: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell.marquee {
  text-overflow: clip;
}

.cell.marquee .marquee__text {
  display: inline-block;
  white-space: nowrap;
  will-change: transform;
  animation: marquee var(--marquee-duration, 12s) linear infinite;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-1 * var(--marquee-distance, 100%)));
  }
}

.company {
  color: var(--accent);
  font-weight: 700;
}

.company.company-odakyu {
  color: #9f0a1e;
}

.company.company-kawasaki {
  color: #00a2ff;
}

.route {
  font-size: 20px;
}

.depart {
  font-family: var(--digit-font);
  font-size: 24px;
  font-weight: 700;
}

.arrival {
  font-family: var(--digit-font);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.note {
  font-size: 16px;
  color: var(--muted);
  font-weight: 700;
}

.empty {
  padding: 20px 16px;
  font-size: 18px;
  color: var(--muted);
}

.closed {
  position: absolute;
  inset: 0;
  background: var(--blue-deep);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.closed.hidden {
  display: none;
}

.closed-box {
  text-align: center;
  padding: 40px 48px;
  border: 2px solid var(--border);
  background: var(--blue-top);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.closed-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.closed-sub {
  margin-top: 12px;
  font-size: 18px;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .table-head,
  .row {
    grid-template-columns: 180px 140px 1fr 120px 140px 180px;
  }
}

@media (max-width: 900px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .title-block h1 {
    font-size: 24px;
  }

  .subtitle {
    font-size: 14px;
  }

  .time-block {
    text-align: left;
  }

  .table-head,
  .row {
    grid-template-columns: 160px 120px 1fr 100px 120px 160px;
    min-width: 760px;
  }

  .table-head div,
  .cell {
    font-size: 14px;
    padding: 4px 10px;
  }

  .depart,
  .arrival {
    font-size: 18px;
  }

  .note {
    font-size: 14px;
  }

  .table-body {
    overflow-y: auto;
  }
}
