* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #0d1117;
  color: #e6edf3;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  padding: 0 20px;
}

#header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

#date {
  font-size: 1.8rem;
  color: #8b949e;
  white-space: nowrap;
}

#time {
  font-size: 3.5rem;
  font-weight: bold;
  color: #fff;
  text-align: center;
}

#weather {
  font-size: 1.3rem;
  color: #fff;
  text-align: right;
  white-space: nowrap;
}

#dashboard {
  max-width: 100%;
  margin: 6px auto;
}

section {
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 6px 10px;
  margin: 5px 0;
}

.section-title {
  font-size: 1.2rem;
  color: #8b949e;
  margin-bottom: 3px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.route-row {
  display: flex;
  align-items: center;
  padding: 2px 0;
}

.route-num {
  width: 55px;
  font-weight: bold;
  font-size: 1.5rem;
  color: #58a6ff;
  flex-shrink: 0;
}

.route-dest {
  flex: 1;
  font-size: 1.3rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 10px;
  min-width: 0;
}

.route-dest.mtr-dest {
  text-align: center;
  padding-right: 0;
}

.route-num:empty {
  width: 0;
  padding: 0;
}

.route-time {
  font-size: 1.3rem;
  font-weight: bold;
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
}

.route-time .t-arr {
  display: inline;
}

.route-time .t-sep {
  color: #484f58;
  margin: 0 5px;
  font-weight: normal;
}

.route-time .soon {
  color: #3fb950;
}

.route-time .medium {
  color: #d29922;
}

.route-time .later {
  color: #8b949e;
}

#footer {
  text-align: center;
  color: #484f58;
  font-size: 0.8rem;
  padding: 8px;
}

#refresh-info {
  margin-right: 12px;
}

/* 打直平板模式 (闊度 700-1300px) */
@media (max-width: 1300px) {
  #time { font-size: 2.8rem; }
  #date { font-size: 1.4rem; }
  #weather { font-size: 1.1rem; }
  .route-num { width: 48px; font-size: 1.25rem; }
  .route-dest { font-size: 1.1rem; padding-right: 6px; }
  .route-time { font-size: 1.1rem; }
  .section-title { font-size: 1.05rem; }
  #header { padding: 6px 14px; }
  body { padding: 0 12px; }
  section { padding: 5px 8px; margin: 4px 0; }
  #dashboard { margin: 4px auto; }
  .route-row { padding: 1px 0; }
}

/* 手機模式 */
@media (max-width: 600px) {
  #time { font-size: 2.2rem; }
  #date { font-size: 1.1rem; }
  #weather { font-size: 0.95rem; }
  .route-num { width: 40px; font-size: 1rem; }
  .route-dest { font-size: 0.9rem; }
  .route-time { font-size: 0.9rem; }
  .section-title { font-size: 0.9rem; }
  body { padding: 0 8px; }
  section { padding: 4px 6px; }
}