/* ============ SHOWCASE TEMPLATE v3 ============ */
*{box-sizing:border-box;margin:0;padding:0}
body{min-height:100vh;background:radial-gradient(ellipse at 30% 20%,#0a1a0a 0%,transparent 60%),radial-gradient(ellipse at 70% 80%,#1a0a1a 0%,transparent 60%),#0a0a0f;font-family:'Segoe UI',sans-serif;display:grid;place-items:center;padding:20px;overflow:hidden}
.wrap{width:100%;max-width:460px;display:flex;flex-direction:column;align-items:center;gap:18px;position:relative;transition:max-width .4s}
.wrap.wide{max-width:820px}
.ratio-btn{position:absolute;top:-6px;right:0;z-index:20;padding:6px 14px;border:1px solid rgba(0,255,65,.4);border-radius:20px;background:rgba(0,0,0,.6);color:#00ff41;font-family:'Consolas',monospace;font-size:11px;font-weight:700;cursor:pointer;transition:.2s}
.ratio-btn:hover{background:rgba(0,255,65,.2)}
.shimmer-title{font-size:2rem;font-weight:800;letter-spacing:1px;text-align:center;background:linear-gradient(90deg,#00ff41,#00e5ff,#00ff41);background-size:300% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:shimmer 7s ease-in-out infinite;filter:drop-shadow(0 4px 12px rgba(0,0,0,.6))}
@keyframes shimmer{0%{background-position:0% 50%}50%{background-position:100% 50%}100%{background-position:0% 50%}}

.device{width:100%;display:flex;flex-direction:column;align-items:center}
.frame{position:relative;width:100%;padding:12px;background:#15151b;border-radius:38px;box-shadow:0 0 0 2px rgba(0,255,65,.35),0 0 40px rgba(0,255,65,.15),0 30px 80px rgba(0,0,0,.7);transition:border-radius .4s,padding .4s}
.notch{position:absolute;top:12px;left:50%;transform:translateX(-50%);width:86px;height:18px;background:#000;border:1px solid #1a1a22;border-top:none;border-radius:0 0 12px 12px;z-index:20;display:flex;align-items:center;justify-content:flex-end;padding-right:10px}
.notch::after{content:"";width:6px;height:6px;border-radius:50%;background:#123a2a;box-shadow:0 0 4px #00ff41}
.stand-neck,.stand-base{display:none}
.device.wide .frame{padding:10px;border-radius:16px}
.device.wide .notch{display:none}
.device.wide .stand-neck{display:block;width:70px;height:46px;background:linear-gradient(#2a2a30,#15151b)}
.device.wide .stand-base{display:block;width:230px;height:14px;background:linear-gradient(#3a3a40,#15151b);border-radius:8px;box-shadow:0 10px 30px rgba(0,0,0,.6)}
.frame-inner{position:relative;background:#050508;border-radius:26px;overflow:hidden;height:calc(100vh - 170px);max-height:calc(94vw * 16 / 9);aspect-ratio:9/16;display:flex;flex-direction:column;margin:0 auto}
.device.wide .frame-inner{aspect-ratio:16/9;height:auto;max-height:70vh;border-radius:10px}

.stage{flex:0 0 42%;background:#000;display:flex;justify-content:center;align-items:center;padding:20px;position:relative;overflow:hidden}
.stage::before{content:"";position:absolute;inset:0;background-image:linear-gradient(rgba(0,255,65,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(0,255,65,.05) 1px,transparent 1px);background-size:28px 28px;pointer-events:none}
.btn-wrap{position:relative;z-index:2;width:100%;height:100%;display:grid;place-items:center;opacity:0;transform:translateY(10px);transition:opacity .6s,transform .6s}
.btn-wrap.show{opacity:1;transform:translateY(0)}
.divider{height:2px;background:linear-gradient(90deg,transparent,rgba(0,255,65,.3),transparent);flex-shrink:0}
.code-area{flex:1;background:#0a0f0a;position:relative;overflow:hidden;padding:14px 16px}
.code-inner{font-family:'Consolas','Courier New',monospace;font-size:.82rem;line-height:1.5;color:#b8ffc9;white-space:pre-wrap;word-break:break-word;height:100%;overflow:hidden}
.code-inner .kw{color:#00e5ff}.code-inner .str{color:#f1fa8c}.code-inner .num{color:#00ff41}
.code-inner .cmt{color:#3a7a3a;font-style:italic}.code-inner .fn{color:#00ff41}.code-inner .prop{color:#00e5ff}
.cursor{display:inline-block;width:8px;height:1em;background:#00ff41;vertical-align:-2px;margin-left:2px;animation:blink 1s steps(1) infinite}
@keyframes blink{50%{opacity:0}}
.arrow{position:absolute;top:36%;transform:translateY(-50%);width:36px;height:36px;border:1px solid rgba(0,255,65,.3);background:rgba(0,0,0,.6);color:#00ff41;font-size:1.3rem;border-radius:50%;cursor:pointer;z-index:10;opacity:0;transition:opacity .25s,background .25s,transform .25s;backdrop-filter:blur(6px)}
.frame-inner:hover .arrow{opacity:1}
.arrow:hover{background:rgba(0,255,65,.3);transform:translateY(-50%) scale(1.1)}
.arrow.left{left:10px}.arrow.right{right:10px}
.brand{position:absolute;bottom:10px;right:14px;font-size:11px;font-weight:800;letter-spacing:3px;color:rgba(0,255,65,.3);z-index:5}

/* ============ 01 MATRIX DECODE BAR ============ */
.ld{width:100%;max-width:280px;font-family:'Consolas',monospace}
.ld-head{display:flex;justify-content:space-between;font-size:11px;color:#00ff41;letter-spacing:2px;margin-bottom:6px;text-shadow:0 0 6px rgba(0,255,65,.5)}
.ld-bar{height:18px;border:1px solid rgba(0,255,65,.4);border-radius:4px;background:#0a0f0a;overflow:hidden}
.ld-fill{height:100%;width:0;background:linear-gradient(90deg,#003b12,#00ff41);box-shadow:0 0 14px rgba(0,255,65,.5);transition:width .2s;overflow:hidden;white-space:nowrap}
.ld-fill span{font-size:11px;line-height:18px;color:#b8ffc9;letter-spacing:2px}
.ld-sub{font-size:9px;color:#3a7a3a;margin-top:6px;letter-spacing:1px}
.ld.done .ld-fill{background:#00ff41}

/* ============ 02 TERMINAL BLOCK LOADER ============ */
.term{width:100%;max-width:280px;background:#050505;border:1px solid rgba(0,255,65,.3);border-radius:8px;overflow:hidden;font-family:'Consolas',monospace}
.term-head{background:#0f1a0f;color:#00ff41;font-size:10px;padding:6px 10px;letter-spacing:1px;border-bottom:1px solid rgba(0,255,65,.2)}
.term-body{padding:10px;font-size:10px;line-height:1.7;color:#b8ffc9;min-height:130px;white-space:pre-wrap}

/* ============ 03 GLITCH UPLOAD BAR ============ */
.gp{width:100%;max-width:280px;font-family:'Consolas',monospace}
.gp-head{display:flex;justify-content:space-between;font-size:11px;color:#00e5ff;letter-spacing:2px;margin-bottom:6px}
.gp-bar{height:10px;background:#0a0a12;border:1px solid rgba(0,229,255,.4);border-radius:3px;overflow:hidden}
.gp-fill{height:100%;width:0;background:#00e5ff;box-shadow:0 0 10px #00e5ff,2px 0 0 #ff00ff,-2px 0 0 #00ff41;transition:width .15s}
.gp.glitch .gp-fill{animation:gp-gl .12s steps(2) infinite}
.gp.glitch .gp-head{animation:gp-gl .12s steps(2) infinite}
@keyframes gp-gl{50%{transform:translateX(3px) skewX(-12deg);filter:hue-rotate(90deg)}}
.gp-line{font-size:9px;color:#3a6a7a;margin-top:6px}

/* ============ 04 HEX DUMP LOADER ============ */
.hex{width:100%;max-width:280px;font-family:'Consolas',monospace}
.hex-grid{display:grid;grid-template-columns:repeat(10,1fr);gap:4px;margin-bottom:10px}
.hex-grid span{font-size:9px;color:#274;text-align:center;padding:3px 0;border:1px solid rgba(0,255,65,.12);border-radius:3px;transition:.2s}
.hex-grid span.on{color:#00ff41;border-color:rgba(0,255,65,.6);text-shadow:0 0 6px rgba(0,255,65,.6);background:rgba(0,255,65,.08)}
.hex-head{display:flex;justify-content:space-between;font-size:11px;color:#00ff41;letter-spacing:2px;margin-bottom:6px}
.hex-bar{height:8px;background:#0a0f0a;border:1px solid rgba(0,255,65,.4);border-radius:3px;overflow:hidden}
.hex-fill{height:100%;width:0;background:#00ff41;box-shadow:0 0 10px rgba(0,255,65,.6);transition:width .2s}

/* ============ 05 BOTTOM STREAM BAR ============ */
.stream-wrap{width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;position:relative;font-family:'Consolas',monospace}
.stream-screen{text-align:center;margin-bottom:40px}
.stream-title{font-size:14px;color:#00ff41;letter-spacing:4px;text-shadow:0 0 10px rgba(0,255,65,.5)}
.stream-meta{font-size:10px;color:#3a7a3a;margin-top:6px}
.stream-bar{position:absolute;bottom:0;left:0;right:0;height:6px;background:#0a0f0a}
.stream-fill{height:100%;width:0;background:linear-gradient(90deg,#00ff41,#00e5ff);box-shadow:0 0 12px rgba(0,255,65,.6);position:relative;transition:width .2s}
.stream-packet{position:absolute;right:-3px;top:-3px;width:12px;height:12px;border-radius:50%;background:#fff;box-shadow:0 0 12px #00ff41;animation:sp-pulse 1s infinite}
@keyframes sp-pulse{50%{transform:scale(1.4)}}
.stream-status{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);font-size:9px;color:#5a7a5a;letter-spacing:1px;white-space:nowrap}

/* mobile */
@media (max-width:480px){
  body{padding:10px}.wrap{max-width:100%;gap:12px}
  .shimmer-title{font-size:1.5rem;background:linear-gradient(90deg,#00ff41,#b8ffc9,#00ff41);-webkit-background-clip:text;background-clip:text}
  .code-inner{font-size:.75rem}
  .code-inner .kw,.code-inner .prop{color:#7dff9b}
  .arrow{width:32px;height:32px;font-size:1.1rem}
  .frame-inner:hover .arrow,.arrow{opacity:.7}
}

.demo-banner{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);background:linear-gradient(135deg,#00ff41 0%,#00e5ff 100%);color:#000;padding:14px 28px;border-radius:60px;font-weight:800;font-size:15px;text-decoration:none;z-index:9999;box-shadow:0 10px 30px rgba(0,255,65,.4);white-space:nowrap;transition:all .25s ease;font-family:'Segoe UI',sans-serif;animation:demoBannerPulse 2.5s ease-in-out infinite}
.demo-banner:hover{transform:translateX(-50%) translateY(-3px) scale(1.05)}
@keyframes demoBannerPulse{0%,100%{box-shadow:0 10px 30px rgba(0,255,65,.4)}50%{box-shadow:0 10px 30px rgba(0,255,65,.65),0 0 25px rgba(0,229,255,.4)}}
@media (max-width:480px){.demo-banner{font-size:13px;padding:12px 22px;bottom:12px}}