/*
2025.12.2 から書いてるよ

 z-index はレイヤーみたいなのだよ。数字が大きければ大きいほど上に反映されるよ（多分）

*/

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  height: 100%;
  font-family: "M PLUS 1", sans-serif;
}

/* 背景 */
#bg {
  position: fixed;
  inset: 0;
  z-index: -1;
}

/* UI(文字） */
#content {
  position: fixed;
  top: 16%;
  left: 50%;
  transform: translate(-50%, -50%);

  z-index: 30;
  color: white;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

/* 中央におきたい文字たち */
#center-ui {
  text-align: center;
}

/* 昼用 */
.text-day {
  color: #222;
  text-shadow: 0 1px 3px rgba(255,255,255,0.6);
}

/* 夕・夜用 */
.text-night {
  color: white;
  text-shadow:
    0 2px 6px rgba(0,0,0,0.7),
    0 0 12px rgba(0,0,0,0.4);
}

/* スクールバス時刻表 */
#title {
  font-size: 30px;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

/* 日付 */
.now {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 20px;
}
/* 時刻 */
.now .time {
  font-size: 36px;
  font-weight: bold;
}

/* どのダイヤか */
.service {
  font-size: 14px;
  opacity: 0.8;
}


/* バス停 */
.busstop {
  position: fixed;
  bottom: 110px;
  width: 90px;
  z-index: 6;
}

/* バス停画像 */
.busstop img {
  width: 140px;
  height: auto;
  display: block;
}

/* バス停の文字 */
.stop-timetable {
  position: absolute;
  top: 170px;
  left: 50%;
  transform: translateX(-28%);
  text-align: center;
  font-size: 13px;
  line-height: 1.4;
  color: #000;
}

.stop-timetable h2 {
  font-size: 12px;
  margin: 0 0 4px 0;
}

.stop-timetable span {
  white-space: nowrap;
}

/* 次の便 */
.stop-timetable .next {
  margin-bottom: 6px;
}
.stop-timetable .next span[data-format="hh:mm"] {
  font-size: 35px;
  font-weight: bold;
  letter-spacing: 0.05em; /* 文字間ちょい広げ */
}


/* 行き先の文字 */
.route-title {
  white-space: nowrap;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 4px;
}


/* バス停の位置 */
#stop1 { left: 50px; }
#stop2 { right: 100px; }


/* バス */
#bus {
  position: fixed;
  bottom: 200px;      
  left: 0;            
  width: 550px;
  height: 180px;  
  z-index: 20;
  pointer-events: none;
}

/* バス本体 */
#bus .body {
  position: absolute;
  inset: 0;
  width: 100%;
  z-index: 11;
}

/* タイヤ */
.wheel {
  position: absolute;
  width: 110px;
  bottom: -100px;
  z-index: 12;
}

/*  右向き（駅 → 成安） */
#bus.dir-right .wheel.front {
  right: 120px;
  left: auto;
}

#bus.dir-right .wheel.back {
  left: 75px;
  right: auto;
}

/*  左向き（成安 → 駅）  */
#bus.dir-left .wheel.front {
  left: 120px;
  right: auto; 
}

#bus.dir-left .wheel.back {
  right: 75px;
  left: auto;
}

/* タイヤ回転 */
@keyframes wheelspin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* 道路 */
#road {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: #555;
  z-index: 5;
}

/* 木 */
.tree {
  position: fixed;
  bottom: 115px;
  width: 100vw;
  z-index: 3;
}

/* 画面下のロゴとか */
#footer {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;

  font-size: 14px;
  z-index: 30;
}

/* ロゴ */
.logo {
  height: 60px;
  width: auto;
}

/* リンク */
.footer-link {
  pointer-events: auto;
  color: white;
  font-size: 14px;
  text-decoration: none;

  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(0,0,0,0.4);

  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.footer-link:hover {
  background: rgba(0,0,0,0.6);
}
