Files
HexTrails/labs/car-loop/style.css

66 lines
14 KiB
CSS

:root{font-family:"Arial Rounded MT Bold",-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:#58616f;background:#f5f6f8;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,a,input,select{-webkit-tap-highlight-color:transparent}button,select{font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #259ef8;outline-offset:4px}button:disabled{opacity:.45;cursor:default}[hidden]{display:none!important}a{color:inherit;text-decoration:none}.lab-header{height:68px;margin:0 38px;border-bottom:1px solid #dfe3e8;display:flex;align-items:center;justify-content:space-between;font-size:11px}.lab-header>a:first-child{font-size:17px;letter-spacing:2px;font-weight:700;color:#536073}.lab-header span{font-size:10px;color:#98a1af;margin-left:9px}.lab-header>a:last-child{color:#7b8797}.workspace{max-width:1080px;margin:28px auto;display:flex;align-items:flex-start;justify-content:center;gap:60px;padding:0 24px}.inspector{width:244px;flex-shrink:0;padding-top:22px}.eyebrow{font-size:9px;letter-spacing:2px;font-weight:700;color:#4386b8}h1{font-size:34px;color:#334053;letter-spacing:-1px;margin:14px 0}.intro{font-size:13px;line-height:1.9;color:#8992a0;margin-bottom:25px}.section-title{display:block;font-size:11px;color:#929ba8;margin:22px 0 10px}.switch{display:grid;grid-template-columns:1fr 1fr;gap:8px}.switch button{border:1px solid #dde4ed;border-radius:10px;background:#fff;padding:12px 4px;font-size:12px;color:#7c8797;display:flex;align-items:center;justify-content:center;gap:7px;min-height:44px}.switch button.active{background:#e7f0fb;color:#2177c5;border-color:#bcd4f0;font-weight:700}.shape{display:inline-block;width:13px;height:13px;background:currentColor}.shape.square{border-radius:3px}.shape.hex{clip-path:polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%)}select{width:100%;background:#fff;border:1px solid #dde4ed;color:#65748a;border-radius:8px;padding:12px 9px;font-size:12px}.actions{display:flex;gap:8px;margin:12px 0}.actions button{width:50%;padding:10px 4px;min-height:42px;border:1px solid #dfe4eb;border-radius:8px;background:#fff;color:#718095;font-size:12px}.primary{height:49px;width:100%;border:0;color:white;font-weight:800;font-size:17px;text-shadow:0 1px 2px #268117;box-shadow:inset 0 3px #ffffff55;clip-path:polygon(6% 0,94% 0,100% 50%,94% 100%,6% 100%,0 50%);background:linear-gradient(#5BEA25,#31CB16);margin:7px 0 16px}.primary:hover{filter:brightness(1.05)}.check{display:flex;align-items:center;gap:7px;font-size:11px;color:#7c8899;margin:5px 0 18px}input{accent-color:#4787ED}details{border-top:1px solid #e0e5eb;font-size:11px;padding:13px 0;color:#7d8999}summary{cursor:pointer;font-size:12px}details p{line-height:1.9}#car-list{display:flex;flex-wrap:wrap;gap:5px;margin-top:10px}#car-list button{background:#fff;border:1px solid #dbe2ec;color:#63758f;border-radius:7px;padding:8px;font-size:11px}.footnote{font-size:10px;color:#8994a2;border-top:1px solid #dfe4eb;padding-top:17px;margin-top:5px;line-height:1.9}.footnote p{color:#929baa;font-size:10px}.live-dot,.travel-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#73bf67;margin-right:5px}.travel-dot{background:#4787ED}.preview-area{width:min(560px,calc((100dvh - 290px)*768/740));min-width:420px}.preview-label,.preview-footer{display:flex;justify-content:space-between;font-size:9px;letter-spacing:1.2px;color:#929baa;margin:0 2px 11px}.preview-footer{margin-top:15px;font-size:9px;letter-spacing:.2px}.stage{background:linear-gradient(#e4e4e5 0,#f2f2f4 180px);position:relative;border-radius:20px;overflow:hidden;box-shadow:0 18px 52px #3b4b6417;padding-top:22px}.ice{position:absolute;top:-22px;left:-3%;width:106%;height:65px;opacity:.36;background:repeating-conic-gradient(#d9e5e9 0 25%,#eaf4f6 0 50%) 0/65px 65px;filter:blur(3px);transform:rotate(-6deg)}.game-hud{position:relative;display:flex;align-items:center;justify-content:space-between;margin:0 16px;height:61px;background:#b2b4b8;border:3px solid #c5c7ca;border-radius:18px;padding:5px 10px;box-shadow:0 3px 2px #72778225}.level-progress{font-size:12px;color:#fff;font-weight:700}.level-progress>div{display:flex;align-items:center;margin-top:3px}.level-progress b{display:inline-block;width:20px;height:22px;background:#e5e7eb;color:#969ba5;clip-path:polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%);text-align:center;line-height:22px;font-size:12px}.level-progress b.current{background:#50b8f3;color:white}.level-progress i{width:7px;height:3px;background:white}.remaining{position:absolute;top:4px;left:50%;transform:translateX(-50%);width:112px;background:#f7f9fd;border-radius:10px;text-align:center;height:47px;padding-top:3px;box-shadow:inset 0 1px #fff}.remaining span{display:block;font-size:11px;color:#679bbc;font-weight:700}.remaining strong{display:block;font-size:24px;line-height:25px;color:#62635e}.reset-icon{width:38px;height:40px;padding:7px;border:0;border-radius:10px;color:#5f5c5d;background:#f7f9fd;box-shadow:0 2px #8e929950}.reset-icon svg{width:100%;height:100%}.trip-hud{display:flex;justify-content:center;gap:28px;margin-top:13px;font-size:10px;color:#9198a2}.trip-hud strong{font-size:12px;color:#656d79;margin-left:4px}.arrival-mark{color:#65b747}.meter{height:3px;margin:9px 50px 0;background:#dde1e7;border-radius:3px;overflow:hidden}.meter i{height:100%;display:block;width:0;background:#5ea9ee;transition:width .2s}canvas{width:100%;height:auto;display:block;touch-action:manipulation;margin-top:-22px}.status{text-align:center;min-height:34px;line-height:1.7;font-size:10px;padding:0 17px;color:#8a92a0;margin-top:-12px}.controls{display:flex;justify-content:center;gap:23px;padding:8px 15px 22px}.controls button{position:relative;width:65px;height:65px;display:grid;place-items:center;padding:3px 6px 7px;border:3px solid #d0d1d4;border-radius:50%;background:#e4e6e9;box-shadow:inset 0 0 0 3px #fafafa,0 2px 3px #7772;overflow:visible}.controls svg{width:47px;height:47px}.controls small{position:absolute;left:50%;bottom:-7px;transform:translateX(-50%);width:68px;height:23px;line-height:18px;border:2px solid #d0d1d4;background:#f0f1f3;color:#747980;font-size:10px;font-weight:700;border-radius:7px;white-space:nowrap;box-shadow:inset 0 1px #fff}.win{position:absolute;inset:0;background:radial-gradient(ellipse at 50% 55%,#40c8fe,#0c61e8);z-index:4;display:flex;align-items:center;flex-direction:column;justify-content:center;color:white;overflow:hidden}.win>*:not(.sunburst){position:relative}.win h2{font-size:38px;text-shadow:0 3px #1264a166;margin:0 0 9px}.win p{font-size:13px;color:#d6f9ff;letter-spacing:2px}.win-medal{display:grid;place-items:center;width:113px;height:113px;margin:38px 0 23px;border-radius:50%;border:8px solid #ffe770;background:#ffd02c;box-shadow:0 6px #eaa116,inset 0 0 0 5px #f1b00b;color:#fff7c0;font-size:64px;text-shadow:0 3px #d48a08}.win strong{font-size:16px;color:#fff39c}.gold-button{margin-top:44px;width:159px;height:50px;border:0;border-radius:14px;background:linear-gradient(#ffdf29,#ffc000);box-shadow:inset 0 3px #fff785,0 4px #e9a300;color:#754c00;font-size:18px;font-weight:800}.sunburst{position:absolute;inset:-50%;background:repeating-conic-gradient(#d0ffff00 0deg 16deg,#d0ffff48 17deg 30deg);mask-image:radial-gradient(circle,#000 0,transparent 65%);animation:spin 40s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media(max-width:760px){.lab-header{height:48px;margin:0 16px}.lab-header>a:first-child{font-size:13px}.lab-header>a:last-child{font-size:10px}.lab-header span{display:none}.workspace{flex-direction:column;align-items:center;margin:12px auto;padding:0 12px;gap:13px}.inspector{width:100%;max-width:440px;padding:0;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap}.eyebrow,.intro,.inspector>.section-title{display:none}h1{font-size:21px;margin:8px 0}.switch{width:216px;gap:6px}.switch button{font-size:11px;padding:8px 4px;min-height:39px}.settings-body{order:2;width:100%;margin-top:7px;display:grid;grid-template-columns:1fr 1fr;gap:6px 12px}.settings-body>.section-title,.settings-body>.check,.guide,.car-access,.footnote{display:none}.settings-body select{font-size:11px;padding:7px;min-height:37px}.settings-body .actions{margin:0;gap:5px}.actions button{font-size:10px;padding:7px 2px;min-height:37px}.primary{grid-column:1/-1;height:36px;font-size:14px;margin:2px 0 0;max-width:210px;justify-self:center}.preview-area{width:100%;min-width:0;max-width:440px}.preview-label{margin-bottom:7px;font-size:8px}.stage{border-radius:16px;padding-top:18px}.preview-footer{font-size:8px;margin-bottom:12px}.status{font-size:10px}.controls{padding-bottom:20px;gap:25px}.game-hud{margin:0 12px}.win h2{font-size:33px}}@media(prefers-reduced-motion:reduce){.sunburst{animation:none}.meter i{transition:none}}
.speed-control{display:block;color:#788697;font-size:11px;margin:1px 0 16px}.speed-control>span{display:flex;justify-content:space-between;margin-bottom:7px}.speed-control output{color:#4387c1;font-weight:700}.speed-control input{width:100%;height:14px;margin:0;accent-color:#4787ed}@media(max-width:760px){.primary{grid-column:auto;width:100%;height:38px;margin:0}.speed-control{margin:0;align-self:center;padding:0 6px}.speed-control>span{font-size:10px;margin:0 0 2px}.speed-control input{height:12px}}
/* Desktop levels use the viewport as the board surface. */
.desktop-level{height:100dvh;overflow:hidden}
.desktop-level .lab-header,.desktop-level .preview-label,.desktop-level .preview-footer,.desktop-level .ice{display:none}
.desktop-level .workspace{width:100%;height:100dvh;max-width:none;margin:0;padding:8px;gap:8px;align-items:stretch}
.desktop-level .inspector{width:210px;min-height:0;padding:12px;background:#fff;border-radius:12px;position:relative}
.desktop-level .eyebrow,.desktop-level .intro,.desktop-level .footnote,.desktop-level .guide,.desktop-level .car-access{display:none}
.desktop-level h1{font-size:25px;margin:0 0 14px}
.desktop-level .section-title{margin:12px 0 8px}
.desktop-level .preview-area{flex:1;width:0;min-width:0;max-width:none;height:100%}
.desktop-level .stage{height:100%;padding:0;border-radius:12px;background:#f2f2f4;box-shadow:none}
.desktop-level .board-scroll{position:absolute;inset:0;overflow:hidden;display:flex;align-items:center;justify-content:center;container-type:size}
.desktop-level canvas{width:min(100cqw,calc(100cqh * var(--board-aspect,.956521739)));height:auto;margin:0;flex-shrink:0}
.desktop-level .game-hud{position:absolute;top:8px;left:8px;z-index:1;width:200px;height:48px;margin:0;padding:4px 7px;border-width:2px;border-radius:12px}
.desktop-level .level-progress{font-size:10px}
.desktop-level .level-progress>div{display:none}
.desktop-level .remaining{position:static;transform:none;width:52px;height:36px;padding-top:0}
.desktop-level .remaining span{font-size:9px}
.desktop-level .remaining strong{font-size:20px;line-height:22px}
.desktop-level .reset-icon{width:29px;height:32px;padding:5px}
.desktop-level .trip-hud{position:absolute;top:60px;left:15px;z-index:1;margin:0;gap:12px}
.desktop-level .meter{position:absolute;top:80px;left:12px;width:190px;margin:0;z-index:1}
.desktop-level .controls{position:absolute;bottom:12px;right:12px;gap:10px;padding:0;z-index:1}
.desktop-level .controls button{width:52px;height:52px}
.desktop-level .controls svg{width:38px;height:38px}
.desktop-level .controls small{font-size:9px;width:57px;height:20px;line-height:16px}
.desktop-level .status{position:absolute;bottom:10px;left:12px;max-width:calc(100% - 215px);min-height:0;margin:0;padding:0;text-align:left;font-size:10px;pointer-events:none}
@media(max-width:760px){
.desktop-level .workspace{flex-direction:column;padding:4px;gap:4px}
.desktop-level .inspector{width:100%;max-width:none;padding:6px;display:flex;gap:6px;flex-shrink:0}
.desktop-level h1,.desktop-level .section-title,.desktop-level .check{display:none}
.desktop-level .switch{width:180px}
.desktop-level .switch button{min-height:30px;padding:5px}
.desktop-level .settings-body{display:flex;flex:1;flex-wrap:wrap;gap:5px;margin:0;width:auto;order:0}
.desktop-level select{width:150px;min-height:30px;padding:4px}
.desktop-level .actions{display:none}
.desktop-level .primary{width:108px;height:30px;font-size:12px}
.desktop-level .speed-control{width:100px;padding:0;margin:0}
.desktop-level .preview-area{width:100%;height:0;min-height:0}
.desktop-level .board-scroll{inset:84px 0 74px;align-items:flex-start}
.desktop-level .status{bottom:80px;max-width:200px}
}
@media(max-height:600px) and (min-width:761px){
.desktop-level .inspector{width:185px;padding:8px}
.desktop-level h1{font-size:20px;margin-bottom:5px}
.desktop-level .section-title{margin:6px 0}
.desktop-level .check{display:none}
.desktop-level .primary{height:35px;margin:4px 0 8px}
}
#mode{margin-bottom:8px}#run-icon{display:none}.batch-mode #hint-icon{display:none}.batch-mode #run-icon{display:block}
#batch-help{font-size:12px;line-height:1.8;color:#7f8b9c;margin-top:18px}#batch-help strong{color:#457fb7;font-size:12px}#batch-help p{margin:9px 0}
.batch-hud{position:absolute;top:96px;left:15px;z-index:1;display:flex;flex-wrap:wrap;gap:6px 12px;max-width:205px;font-size:12px;color:#5e738b}
#turn-count{font-weight:700;color:#357dc2}#batch-result{width:100%;font-size:11px;color:#8993a1}
.batch-mode .board-scroll{inset:0 0 106px}
.batch-mode .controls{left:50%;right:auto;bottom:15px;transform:translateX(-50%);gap:24px}
.batch-mode .controls button{width:60px;height:60px}.batch-mode .controls svg{width:44px;height:44px}
.batch-mode .controls small{width:67px}.batch-mode #hint{border-color:#b5d3ed;background:#e1effc}
.batch-mode .status{bottom:84px;left:12px;max-width:none;width:calc(100% - 24px);text-align:center}
.batch-mode .guide,.batch-mode .car-access,.batch-mode .check{display:none}
@media(max-width:760px){#mode{width:185px;margin:0;font-size:11px;min-height:30px;padding:5px}.batch-mode #batch-help{display:none}.batch-mode .board-scroll{inset:138px 0 110px}.batch-mode .controls{gap:22px}}
.batch-hud[data-phase="blocked"] #batch-result{color:#b27639;font-weight:700}.batch-hud[data-phase="ready"] #batch-result{color:#348666;font-weight:700}.batch-hud[data-phase="running"] #batch-result{color:#357dc2;font-weight:700}