/* Cyberpunk Dashboard Styles */
:root {
  --bg-dark: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-glow: #1a1a25;
  --neon-cyan: #00ffff;
  --neon-magenta: #ff00ff;
  --neon-yellow: #ffff00;
  --neon-red: #ff3333;
  --text-main: #e0e0e0;
  --text-dim: #888899;
  --grid-line: rgba(0, 255, 255, 0.08);
  --font-display: 'Orbitron', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
}

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

html, body {
  height: 100%;
  background: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-mono);
  overflow: hidden;
}

/* Scanline */
.scanline {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent, transparent 2px,
    rgba(0, 255, 255, 0.03) 2px, rgba(0, 255, 255, 0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
  animation: scanMove 8s linear infinite;
}
@keyframes scanMove {
  0% { background-position: 0 0; }
  100% { background-position: 0 100px; }
}

.container {
  height: 100vh;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background:
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    linear-gradient(var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.2), inset 0 0 30px rgba(0, 255, 255, 0.05);
}
.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--neon-cyan);
  text-shadow: 0 0 10px var(--neon-cyan);
  letter-spacing: 2px;
}
.clock {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--neon-magenta);
  text-shadow: 0 0 15px var(--neon-magenta);
}

/* Grid */
.grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 12px;
  min-height: 0;
}

/* Card */
.card {
  background: var(--bg-card);
  border: 1px solid #333344;
  padding: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.card:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.15);
}
.card-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--neon-yellow);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #333344;
  text-shadow: 0 0 8px var(--neon-yellow);
}

.card.weather    { grid-column: 1; grid-row: 1; }
.card.hotsearch  { grid-column: 2; grid-row: 1; }
.card.oil        { grid-column: 3; grid-row: 1; }
.card.exchange   { grid-column: 4; grid-row: 1; }
.card.calendar   { grid-column: 1; grid-row: 2; }
.card.boxoffice  { grid-column: 2; grid-row: 2; }
.card.server     { grid-column: 3; grid-row: 2; }
.card.bikes      { grid-column: 4; grid-row: 2; }

/* Weather */
.weather-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  overflow-y: auto;
}
.weather-item {
  background: var(--bg-card-glow);
  padding: 6px 8px;
  border-left: 2px solid var(--neon-cyan);
  font-size: 0.75rem;
}
.weather-item .city { color: var(--text-dim); font-size: 0.7rem; }
.weather-item .temp { font-size: 1.1rem; color: var(--neon-cyan); font-weight: bold; }
.weather-item .desc { color: var(--text-main); }
.weather-item .extra { font-size: 0.65rem; color: var(--text-dim); }

/* Hot search - 字号调大 */
.tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.tab {
  background: transparent;
  border: 1px solid #444455;
  color: var(--text-dim);
  padding: 3px 8px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.tab.active {
  border-color: var(--neon-magenta);
  color: var(--neon-magenta);
  box-shadow: 0 0 8px rgba(255, 0, 255, 0.3);
}
.hot-list { flex: 1; overflow-y: auto; }
.hot-item {
  display: flex;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid #222233;
  font-size: 0.95rem;  /* 字号调大 */
}
.hot-item .rank { color: var(--neon-magenta); width: 28px; font-weight: bold; }
.hot-item .title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Oil */
.oil-grid { display: flex; flex-direction: column; gap: 8px; }
.oil-item {
  display: flex;
  justify-content: space-between;
  padding: 8px;
  background: var(--bg-card-glow);
  border-left: 2px solid var(--neon-yellow);
}
.oil-item .city { color: var(--neon-yellow); font-weight: bold; }
.oil-item .price { font-size: 0.9rem; color: var(--text-main); }

/* Exchange - 加箭头 */
.exchange-list { display: flex; flex-direction: column; gap: 8px; }
.exchange-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  background: var(--bg-card-glow);
  border-left: 2px solid var(--neon-cyan);
  font-size: 1rem;
}
.exchange-item .currency { color: var(--neon-cyan); font-weight: bold; }
.exchange-item .arrow { color: var(--neon-magenta); margin: 0 8px; }
.exchange-item .amount { color: var(--text-main); font-weight: bold; }

/* Calendar - 加月历 */
.cal-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.cal-top {
  text-align: center;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid #333344;
}
.cal-content .solar { color: var(--neon-magenta); font-size: 1rem; }
.cal-content .lunar { color: var(--neon-yellow); font-size: 0.9rem; margin-top: 2px; }
.cal-content .festival { color: var(--neon-red); font-size: 0.75rem; margin-top: 2px; }

.month-cal {
  flex: 1;
  display: flex;
  flex-direction: column;
  font-size: 0.7rem;
}
.cal-hdr, .cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  flex: 1;
  align-items: center;
}
.cal-hdr span {
  color: var(--neon-cyan);
  font-weight: bold;
  padding: 2px 0;
  border-bottom: 1px solid #333344;
}
.cal-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2px 0;
  color: var(--text-main);
  border-right: 1px solid #222233;
  font-size: 0.7rem;
}
.cal-day b {
  font-size: 0.85rem;
  color: var(--neon-yellow);
  font-weight: bold;
}
.cal-day i {
  font-style: normal;
  color: var(--text-dim);
  font-size: 0.6rem;
}
.cal-day.today {
  background: rgba(255, 0, 255, 0.2);
  border: 1px solid var(--neon-magenta);
}
.cal-day.today b { color: var(--neon-magenta); }
.cal-empty { border-right: 1px solid #222233; }

/* Box office */
.box-list { overflow-y: auto; }
.box-item {
  display: flex;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid #222233;
  font-size: 0.8rem;
}
.box-item .rank { color: var(--neon-yellow); width: 24px; font-weight: bold; }
.box-item .name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.box-item .box { color: var(--neon-red); font-weight: bold; }

/* Server - 4个仪表 - 铺满整个卡片 */
.gauge-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  flex: 1;
  padding: 0;
  margin: -4px;
}
.gauge {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-card-glow);
  border: 1px solid #333344;
  padding: 4px 2px;
  overflow: hidden;
}
.gauge svg {
  width: 95%;
  height: 60%;
  max-height: none;
}
.gauge-bg {
  fill: none;
  stroke: #333344;
  stroke-width: 8;
  stroke-linecap: round;
}
.gauge-fill {
  fill: none;
  stroke: var(--neon-cyan);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dasharray 0.5s;
  filter: drop-shadow(0 0 4px var(--neon-cyan));
}
.gauge-value {
  font-size: 1.2rem;
  color: var(--neon-cyan);
  font-weight: bold;
  margin-top: 2px;
  text-shadow: 0 0 6px var(--neon-cyan);
}
.gauge-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 2px;
}
/* NET 仪表 - 文字显示 */
.net-gauge {
  background: var(--bg-card-glow);
  padding: 8px;
}
.net-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  height: 65%;
  justify-content: center;
}
.net-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  width: 100%;
  justify-content: center;
}
.net-arrow {
  color: var(--neon-magenta);
  font-size: 1.1rem;
  font-weight: bold;
}
.net-val {
  color: var(--neon-cyan);
  font-weight: bold;
  font-size: 1rem;
}
.net-unit {
  color: var(--text-dim);
  font-size: 0.7rem;
}

/* Bikes */
.bikes-scroll { flex: 1; overflow-y: auto; }
.bikes-item {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid #222233;
  font-size: 0.75rem;
}
.bikes-item .name { color: var(--neon-cyan); }
.bikes-item .stats { color: var(--text-dim); }

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  background: var(--bg-card);
  border: 1px solid #333344;
  font-size: 0.75rem;
  color: var(--text-dim);
}
.blink { animation: blink 1s infinite; color: var(--neon-cyan); }
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0.3; }
}

/* Mobile */
@media (max-width: 768px) {
  .container { padding: 8px; gap: 8px; }
  .grid { display: flex; flex-direction: column; overflow-y: auto; }
  .card { min-height: 200px; flex: 0 0 auto; }
  .header { flex-direction: column; gap: 8px; text-align: center; }
  .logo { font-size: 1.1rem; }
  .clock { font-size: 1.4rem; }
  .weather-grid { grid-template-columns: repeat(2, 1fr); }
}

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #333344; border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--neon-cyan); }