/* Palette sampled from the original WeatherStar 4000+ backgrounds (640x480):
   bg #1c0a57 · header #c05c03→#52263a · sides #311450→#c05c03 · panel #21285a, glow edge #2652b2
   · footer band #233270 · rule #141414/#afafaf · text #fff / #ff0 */
*{box-sizing:border-box;margin:0;padding:0}
html,body{width:100%;height:100%;background:#000;overflow:hidden;cursor:none}
body.show-cursor{cursor:default}

/* Fixed 640x480 canvas, scaled to fit the window by app.js */
#stage{
  position:absolute;left:50%;top:50%;width:640px;height:480px;
  transform-origin:center center;transform:translate(-50%,-50%) scale(1);
  background:#1c0a57;color:#fff;overflow:hidden;
  font-family:"Franklin Gothic Medium","Arial Narrow","Trebuchet MS",Arial,sans-serif;
  font-weight:700;letter-spacing:.5px;
  text-shadow:3px 3px 0 #000,-1.5px -1.5px 0 #000,0 -1.5px 0 #000,1.5px -1.5px 0 #000,1.5px 0 0 #000,1.5px 1.5px 0 #000,0 1.5px 0 #000,-1.5px 1.5px 0 #000,-1.5px 0 0 #000;
}
/* light CRT scanlines (no vignette, so the palette stays true) */
#stage::after{content:"";position:absolute;inset:0;pointer-events:none;z-index:9;
  background:repeating-linear-gradient(to bottom,transparent 0 1px,rgba(0,0,0,.1) 1px 2px);}

/* orange header band with slanted right edge (y30–90) */
#hdr{position:absolute;left:0;top:30px;width:640px;height:60px;
  background:linear-gradient(180deg,#c05c03 0%,#52263a 100%);
  clip-path:polygon(0 0,500px 0,452px 100%,0 100%);
  display:flex;align-items:center;padding-left:20px}
#title{font-size:30px;line-height:34px;color:#fff;white-space:nowrap}
#logo{position:absolute;right:10px;top:4px;font-size:15px;line-height:20px;color:#ff0;white-space:nowrap}
#clock{position:absolute;right:12px;top:36px;text-align:right;font-size:20px;line-height:24px;color:#fff}
#clock span{display:block}

/* purple→orange side bars */
.side{position:absolute;top:90px;height:310px;width:52px;background:linear-gradient(180deg,#311450,#c05c03)}
#side-l{left:0}
#side-r{right:0;left:auto;width:56px}

/* footer rule + band (y400–480) */
#ticker{position:absolute;left:0;right:0;top:400px;bottom:0;
  background:#233270;border-top:2px solid #141414;box-shadow:inset 0 2px 0 #afafaf;
  overflow:hidden;white-space:nowrap}
#ticker-text{display:inline-block;font-size:26px;line-height:76px;color:#fff;padding-left:100%;
  animation:scroll 40s linear infinite}
@keyframes scroll{to{transform:translateX(-100%)}}

/* center panel (x52–584, y90–400) with glowing blue inner edge */
#slides{position:absolute;left:52px;top:90px;width:532px;height:310px;overflow:hidden;background:#21285a;
  box-shadow:inset 0 0 0 4px #2652b2,inset 0 0 0 8px #25469b,inset 0 0 0 12px #243a83,inset 0 0 0 16px #23306e}
.slide{position:absolute;inset:0;padding:22px 26px;opacity:0;transition:opacity .6s;display:none}
.slide.active{display:block;opacity:1}

.city{font-size:28px;line-height:32px;margin-bottom:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#ff0}
.city.sub{font-size:22px;line-height:26px;margin-bottom:8px}

/* current */
#s-current{display:none}
#s-current.active{display:flex;gap:10px}
.cur-left{width:46%;position:relative}
.big-temp{font-size:66px;line-height:68px}
.cond-text{font-size:26px;line-height:30px;color:#ff0}
.cur-icon{position:absolute;left:0;top:104px;width:120px;height:104px}
.cur-icon svg{width:100%;height:100%}
.wind-row{position:absolute;left:0;bottom:0;font-size:22px;display:flex;gap:10px}
.cur-right{flex:1;min-width:0}
.kv{border-collapse:collapse;font-size:23px;width:100%}
.kv td{padding:2px 0;vertical-align:top;white-space:nowrap}
.kv td:first-child{width:50%;color:#ff0}
.kv td:last-child{text-align:right}

/* hourly */
.hourly{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.hr{text-align:center;background:rgba(0,0,40,.35);border:2px solid #25469b;padding:2px 2px 3px}
.hr .t{font-size:18px;line-height:20px;color:#ff0}
.hr svg{width:40px;height:32px}
.hr .v{font-size:22px;line-height:24px}
.hr .p{font-size:14px;line-height:16px;color:#8ffdfa}

/* daily */
.daily{display:grid;grid-template-columns:repeat(5,1fr);gap:5px}
.dy{text-align:center;background:rgba(0,0,40,.35);border:2px solid #25469b;padding:2px}
.dy .n{font-size:20px;color:#ff0}
.dy svg{width:52px;height:46px}
.dy .c{font-size:14px;line-height:15px;min-height:30px}
.dy .hi{font-size:26px;line-height:28px}
.dy .lo{font-size:22px;line-height:24px;color:#8ffdfa}
.dy .p{font-size:14px;line-height:16px;color:#8ffdfa}

.alm{font-size:25px}

#hint{position:absolute;left:8px;top:4px;font-size:14px;opacity:0;transition:opacity .5s;z-index:10;text-shadow:1px 1px 0 #000}
body.show-cursor #hint{opacity:.8}

/* ---- Original Star4000 fonts (same files the original WeatherStar 4000+ uses) ---- */
@font-face{font-family:"Star4000";src:url("fonts/star4000.woff") format("woff");font-display:swap}
@font-face{font-family:"Star4000 Extended";src:url("fonts/star4000_extended.woff") format("woff");font-display:swap}
@font-face{font-family:"Star4000 Large";src:url("fonts/star4000_large.woff") format("woff");font-display:swap}
@font-face{font-family:"Star4000 Small";src:url("fonts/star4000_small.woff") format("woff");font-display:swap}

#stage{font-family:"Star4000","Franklin Gothic Medium",Arial,sans-serif;font-weight:400;letter-spacing:0}
#title{font-family:"Star4000 Large","Franklin Gothic Medium",Arial,sans-serif;font-size:32px}
#logo{font-family:"Star4000","Franklin Gothic Medium",Arial,sans-serif;font-size:18px}
#clock{font-family:"Star4000","Franklin Gothic Medium",Arial,sans-serif;font-size:22px}
.big-temp,.city,.hr .v,.dy .hi,.dy .lo{font-family:"Star4000 Large","Franklin Gothic Medium",Arial,sans-serif}
.cond-text,.kv,.wind-row{font-family:"Star4000 Extended","Franklin Gothic Medium",Arial,sans-serif}
.hr .t,.dy .n{font-family:"Star4000 Small","Franklin Gothic Medium",Arial,sans-serif}
.dy .c,.hr .p,.dy .p,#ticker-text{font-family:"Star4000","Franklin Gothic Medium",Arial,sans-serif}
.kv td:first-child{width:auto;padding-right:10px}
.city{font-size:26px;line-height:40px}
.city.sub{font-size:24px;line-height:34px;margin-bottom:6px}
.big-temp{font-size:54px;line-height:64px;margin-top:4px}
.cond-text{line-height:30px}
.cur-icon{top:112px}
.slide{padding-top:20px}

/* GIF icons: fit each box, keep the pixel art crisp */
.cur-icon{display:flex;align-items:center;justify-content:center;width:150px;height:112px;top:100px}
.cur-icon img,.hr img,.dy img{display:block;margin:0 auto;object-fit:contain;image-rendering:pixelated}
.cur-icon img{max-width:100%;max-height:100%}
.hr img{width:auto;height:32px;max-width:44px;margin-bottom:3px}

/* almanac: smaller table + moon strip */
.alm{font-size:22px}
.alm td{padding:0}
.moons{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-top:6px;text-align:center}
.mn img{display:block;margin:0 auto;width:auto;height:56px;image-rendering:pixelated}
.mn .l{font-family:"Star4000 Small","Franklin Gothic Medium",Arial,sans-serif;font-size:18px;line-height:18px;color:#ff0}
.mn .dt{font-family:"Star4000","Franklin Gothic Medium",Arial,sans-serif;font-size:18px;line-height:20px}
.dy img{width:auto;height:46px;max-width:64px}
