/* ==========================================================================
   VHSCaster15 v2.0 – Stylesheet
   ========================================================================== */

.vhsc-wrapper {
  --vhsc-accent:    #c8a84b;
  --vhsc-body-dark: #1a1a1e;
  --vhsc-body-mid:  #252528;
  --vhsc-body-light:#2f2f34;
  --vhsc-recess:    #0d0d10;
  --vhsc-led-red:   #ff2222;
  --vhsc-screen-bg: #001400;
}

.vhsc-wrapper { display:flex; justify-content:center; align-items:center; padding:48px 24px; box-sizing:border-box; user-select:none; }
.vhsc-scene   { perspective:900px; perspective-origin:50% 40%; }

/* ---- Recorder ---- */
.vhsc-recorder {
  position:relative; width:400px; max-width:100%;
  transform-style:preserve-3d; will-change:transform;
  filter: drop-shadow(0 24px 48px rgba(0,0,0,.80)) drop-shadow(0 4px 8px rgba(0,0,0,.60));
}

/* ---- Monitor ---- */
.vhsc-monitor-section { display:flex; justify-content:center; padding:0 28px; }
.vhsc-monitor {
  width:100%;
  background:linear-gradient(160deg,var(--vhsc-body-mid) 0%,var(--vhsc-body-dark) 60%);
  border-radius:10px 10px 0 0; padding:10px 10px 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), inset 0 -1px 0 rgba(0,0,0,.4);
}
.vhsc-screen-bezel {
  background:#080810; border-radius:7px 7px 0 0; padding:7px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.9), inset 0 2px 8px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.03);
}
.vhsc-screen {
  position:relative; width:100%; padding-top:75%;
  background:var(--vhsc-screen-bg); border-radius:3px; overflow:hidden; cursor:pointer;
  box-shadow: inset 0 0 60px rgba(0,0,0,.6);
  transition:box-shadow .4s ease;
}
.vhsc-screen::before {
  content:''; position:absolute; inset:0; pointer-events:none; z-index:12; border-radius:3px;
  background:repeating-linear-gradient(0deg,transparent 0px,transparent 2px,rgba(0,0,0,.14) 2px,rgba(0,0,0,.14) 4px);
}
.vhsc-screen::after {
  content:''; position:absolute; top:-30%; left:-15%; width:55%; height:90%; pointer-events:none; z-index:13;
  background:radial-gradient(ellipse at center,rgba(255,255,255,.03) 0%,transparent 70%);
  transform:rotate(-35deg);
}
.vhsc-webgl-canvas { position:absolute; inset:0; width:100%!important; height:100%!important; z-index:3; border-radius:3px; display:block; }
.vhsc-video-el,.vhsc-image-el { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:2; border-radius:3px; }
.vhsc-wrapper.vhsc-playing .vhsc-screen { box-shadow: inset 0 0 40px rgba(0,0,0,.3), 0 0 30px rgba(0,255,80,.12); }

/* Screen idle text */
.vhsc-screen-idle { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; z-index:10; pointer-events:none; transition:opacity .4s ease; }
.vhsc-idle-press  { font-family:'Courier New',monospace; font-size:10px; letter-spacing:4px; color:rgba(0,220,80,.35); text-transform:uppercase; }
.vhsc-idle-icon   { font-size:22px; color:rgba(0,220,80,.25); animation:vhsc-idle-pulse 2s ease-in-out infinite; }
@keyframes vhsc-idle-pulse { 0%,100%{opacity:.25} 50%{opacity:.6} }
.vhsc-screen-hint { position:absolute; bottom:6px; right:8px; font-size:14px; color:rgba(255,255,255,.2); z-index:14; opacity:0; transition:opacity .3s ease; pointer-events:none; }
.vhsc-wrapper.vhsc-playing .vhsc-screen-hint { opacity:1; }
.vhsc-wrapper.vhsc-playing .vhsc-screen-idle { opacity:0; }

/* ---- NEW: Intro overlay ---- */
.vhsc-intro-overlay {
  position:absolute; inset:0; z-index:20; background:#000;
  display:flex; align-items:center; justify-content:center;
}
.vhsc-intro-canvas { position:absolute; inset:0; width:100%; height:100%; display:block; }

/* ---- NEW: Channel badge ---- */
.vhsc-channel-badge {
  position:absolute; top:8px; left:8px; z-index:15;
  font-family:'Courier New',monospace; font-size:13px; font-weight:bold;
  color:rgba(255,255,100,.9); text-shadow:0 0 8px rgba(255,255,0,.6);
  letter-spacing:2px; pointer-events:none;
  padding:2px 6px; background:rgba(0,0,0,.4); border-radius:2px;
}

/* ---- NEW: Pause timecode ---- */
.vhsc-pause-timecode {
  position:absolute; bottom:10px; left:50%; transform:translateX(-50%);
  z-index:15; font-family:'Courier New',monospace; font-size:11px;
  color:rgba(255,255,255,.85); background:rgba(0,0,0,.6);
  padding:2px 8px; border-radius:2px; letter-spacing:2px;
  pointer-events:none;
  text-shadow:0 0 4px rgba(255,255,255,.4);
}

/* ---- Monitor base ---- */
.vhsc-monitor-base { display:flex; align-items:center; justify-content:space-between; padding:5px 12px 6px; background:linear-gradient(180deg,var(--vhsc-body-mid) 0%,var(--vhsc-body-dark) 100%); border-bottom:2px solid rgba(0,0,0,.5); }
.vhsc-monitor-base-label { font-family:'Courier New',monospace; font-size:9px; letter-spacing:3px; color:var(--vhsc-accent); opacity:.6; font-weight:bold; }
.vhsc-monitor-dial { width:12px; height:12px; border-radius:50%; background:radial-gradient(circle at 35% 35%,var(--vhsc-body-light),var(--vhsc-recess)); box-shadow:inset 0 1px 2px rgba(0,0,0,.6),0 1px 0 rgba(255,255,255,.05); }

/* ---- Body ---- */
.vhsc-body { position:relative; background:linear-gradient(180deg,var(--vhsc-body-dark) 0%,#141416 100%); border-radius:0 0 8px 8px; padding:12px 14px 10px; box-shadow:inset 0 1px 0 rgba(255,255,255,.04),inset 0 -2px 6px rgba(0,0,0,.4),0 4px 12px rgba(0,0,0,.5); }
.vhsc-body-ridge { height:3px; margin:-12px -14px 10px; background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.04) 20%,rgba(255,255,255,.07) 50%,rgba(255,255,255,.04) 80%,transparent 100%); border-bottom:1px solid rgba(0,0,0,.3); }

/* ---- Cassette area ---- */
.vhsc-cassette-area { display:flex; align-items:center; gap:10px; margin-bottom:9px; }
.vhsc-cassette-slot { flex:1; height:34px; background:var(--vhsc-recess); border-radius:3px; position:relative; overflow:hidden; box-shadow:inset 0 3px 8px rgba(0,0,0,.8),inset 0 0 0 1px rgba(0,0,0,.6),0 1px 0 rgba(255,255,255,.04); }
.vhsc-slot-door { position:absolute; inset:0; background:linear-gradient(180deg,var(--vhsc-body-light) 0%,var(--vhsc-body-mid) 100%); transform-origin:top center; z-index:5; border-radius:2px; box-shadow:0 2px 4px rgba(0,0,0,.5); overflow:hidden; touch-action:none; }
.vhsc-door-ribs { display:flex; gap:4px; padding:8px 10px 0; justify-content:center; }
.vhsc-door-ribs span { flex:1; height:2px; max-width:22px; background:rgba(0,0,0,.25); border-radius:1px; }
.vhsc-door-grip { position:absolute; bottom:4px; left:50%; transform:translateX(-50%); width:40px; height:4px; border-radius:2px; background:rgba(0,0,0,.3); }
.vhsc-cassette { position:absolute; left:6px; right:6px; top:4px; bottom:4px; z-index:3; touch-action:none; }
.vhsc-cassette-body { width:100%; height:100%; background:linear-gradient(180deg,#2c2c32 0%,#1e1e22 100%); border-radius:2px; display:flex; align-items:center; padding:0 6px; gap:6px; box-shadow:inset 0 1px 0 rgba(255,255,255,.06); }
.vhsc-cassette-window { flex:0 0 50px; height:16px; background:rgba(0,0,0,.6); border-radius:2px; display:flex; align-items:center; justify-content:space-around; padding:0 4px; }
.vhsc-reel { width:12px; height:12px; border-radius:50%; background:radial-gradient(circle at 40% 35%,#3a3a40,#111); box-shadow:inset 0 1px 2px rgba(0,0,0,.6); }
.vhsc-cassette-label { font-family:'Courier New',monospace; font-size:7px; letter-spacing:1px; color:rgba(200,168,75,.5); font-weight:bold; flex:1; text-align:right; }
.vhsc-counter-panel { flex:0 0 72px; height:34px; background:#050508; border-radius:3px; display:flex; align-items:center; justify-content:center; box-shadow:inset 0 2px 6px rgba(0,0,0,.7),0 1px 0 rgba(255,255,255,.03); border:1px solid rgba(0,0,0,.5); }
.vhsc-counter { font-family:'Courier New',monospace; font-size:11px; color:rgba(255,80,0,.7); letter-spacing:1px; text-shadow:0 0 6px rgba(255,80,0,.4); }

/* ---- Vents ---- */
.vhsc-vents { display:flex; gap:3px; margin-bottom:10px; padding:0 2px; }
.vhsc-vent  { flex:1; height:5px; background:var(--vhsc-recess); border-radius:1px; box-shadow:inset 0 2px 3px rgba(0,0,0,.8),0 1px 0 rgba(255,255,255,.03); }

/* ---- Controls ---- */
.vhsc-controls-bar { display:flex; align-items:center; gap:8px; }
.vhsc-led-group  { display:flex; flex-direction:column; align-items:center; gap:2px; flex-shrink:0; }
.vhsc-led        { width:8px; height:8px; border-radius:50%; background:var(--vhsc-led-red); opacity:.25; box-shadow:0 0 5px rgba(255,34,34,.3); transition:opacity .2s,box-shadow .2s; }
.vhsc-led-label  { font-family:'Courier New',monospace; font-size:6px; letter-spacing:1px; color:rgba(255,80,80,.4); }
.vhsc-wrapper.vhsc-playing .vhsc-led { opacity:1; box-shadow:0 0 10px rgba(255,34,34,.8),0 0 4px rgba(255,34,34,1); animation:vhsc-led-pulse 1s ease-in-out infinite; }
@keyframes vhsc-led-pulse { 0%,100%{opacity:1} 50%{opacity:.55} }
.vhsc-btn-group  { display:flex; gap:5px; flex:1; }
.vhsc-btn { flex:1; height:26px; min-width:28px; background:linear-gradient(180deg,var(--vhsc-body-light) 0%,var(--vhsc-body-mid) 100%); border:1px solid rgba(0,0,0,.6); border-bottom:3px solid rgba(0,0,0,.5); border-radius:3px; color:var(--vhsc-accent); font-size:10px; cursor:pointer; transition:transform .08s,border-bottom-width .08s,background .12s; display:flex; align-items:center; justify-content:center; box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 1px 3px rgba(0,0,0,.4); outline:none; }
.vhsc-btn:hover { background:linear-gradient(180deg,#3a3a40 0%,var(--vhsc-body-light) 100%); }
.vhsc-btn:active,.vhsc-btn.vhsc-pressed { transform:translateY(2px); border-bottom-width:1px; }
.vhsc-btn-play { background:linear-gradient(180deg,#263026 0%,#1a211a 100%); color:#6dcf6d; }
.vhsc-brand-label { text-align:right; margin-top:6px; line-height:1; }
.vhsc-brand-name  { font-family:'Arial Narrow',Arial,sans-serif; font-size:9px; font-weight:bold; letter-spacing:2px; color:var(--vhsc-accent); opacity:.6; text-transform:uppercase; }
.vhsc-brand-num   { font-family:'Arial Narrow',Arial,sans-serif; font-size:12px; font-weight:bold; color:var(--vhsc-accent); opacity:.9; }

/* ---- CSS fallback ---- */
.vhsc-no-webgl .vhsc-image-el,.vhsc-no-webgl .vhsc-video-el { display:block!important; }
.vhsc-no-webgl.vhsc-playing .vhsc-image-el { animation:vhsc-css-jitter .12s steps(2) infinite; filter:contrast(1.1) saturate(1.15) brightness(.92); }
.vhsc-no-webgl.vhsc-playing .vhsc-video-el { filter:contrast(1.1) saturate(1.1) brightness(.94); animation:vhsc-css-jitter .15s steps(2) infinite; }
@keyframes vhsc-css-jitter { 0%{transform:translate(0,0) skewX(0deg)} 20%{transform:translate(-1px,0) skewX(-.2deg)} 60%{transform:translate(1px,0) skewX(.15deg)} 80%{transform:translate(-.5px,1px) skewX(-.1deg)} }

/* ---- Lightbox ---- */
.vhsc-lightbox { display:none; position:fixed; inset:0; z-index:999999; align-items:center; justify-content:center; }
.vhsc-lightbox.vhsc-lb-open { display:flex; }
.vhsc-lb-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.96); }
.vhsc-lb-split-left,.vhsc-lb-split-right { position:absolute; top:0; bottom:0; width:50%; background:#050508; z-index:1; }
.vhsc-lb-split-left  { left:0;  transform-origin:left center; }
.vhsc-lb-split-right { right:0; transform-origin:right center; }
.vhsc-lb-container { position:relative; z-index:2; width:min(88vw,960px); }
.vhsc-lb-inner { background:#050508; border:1px solid rgba(255,255,255,.08); border-radius:4px; overflow:hidden; box-shadow:0 32px 80px rgba(0,0,0,.9); }
.vhsc-lb-screen { position:relative; width:100%; padding-top:56.25%; background:#000; overflow:hidden; }
.vhsc-lb-canvas,.vhsc-lb-video,.vhsc-lb-image { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; display:block; }
.vhsc-lb-scanlines { position:absolute; inset:0; background:repeating-linear-gradient(0deg,transparent 0px,transparent 2px,rgba(0,0,0,.12) 2px,rgba(0,0,0,.12) 4px); pointer-events:none; z-index:5; }
.vhsc-lb-bar { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; border-top:1px solid rgba(255,255,255,.06); background:#070709; }
.vhsc-lb-title { font-family:'Courier New',monospace; font-size:10px; letter-spacing:3px; color:rgba(200,168,75,.5); text-transform:uppercase; }
.vhsc-lb-close { background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12); border-radius:3px; color:rgba(255,255,255,.7); font-size:11px; padding:5px 14px; cursor:pointer; letter-spacing:1px; transition:background .2s,color .2s; outline:none; }
.vhsc-lb-close:hover { background:rgba(180,0,0,.4); color:#fff; border-color:rgba(255,0,0,.3); }

/* ==========================================================================
   REMOTE CONTROL WIDGET
   ========================================================================== */
.vhsc-remote {
  --vhsc-accent: #c8a84b;
  display:inline-flex; flex-direction:column; align-items:center;
  width:120px; padding:14px 10px 18px;
  background:linear-gradient(180deg,#1e1e22 0%,#141416 100%);
  border-radius:10px 10px 40px 40px;
  box-shadow:
    0 8px 32px rgba(0,0,0,.7),
    inset 0 1px 0 rgba(255,255,255,.06),
    inset 0 -2px 4px rgba(0,0,0,.4);
  gap:8px;
}
.vhsc-remote--minimal {
  background:#1a1a1e; border-radius:6px; padding:10px;
}

/* IR emitter */
.vhsc-rmt-top   { display:flex; justify-content:center; margin-bottom:2px; }
.vhsc-rmt-ir    { width:10px; height:10px; border-radius:50%; background:radial-gradient(circle,#441800,#1a0800); box-shadow:0 0 6px rgba(200,80,0,.3); }

/* Brand */
.vhsc-rmt-brand { font-family:'Arial Narrow',Arial,sans-serif; font-size:8px; letter-spacing:2px; color:var(--vhsc-accent); opacity:.5; text-transform:uppercase; font-weight:bold; text-align:center; }
.vhsc-rmt-brand span { font-size:10px; opacity:.9; }

/* Display */
.vhsc-rmt-display { width:90%; background:#050508; border-radius:3px; padding:4px 6px; text-align:center; box-shadow:inset 0 2px 4px rgba(0,0,0,.8); border:1px solid rgba(0,0,0,.5); }
.vhsc-rmt-ch-num  { display:block; font-family:'Courier New',monospace; font-size:14px; color:rgba(255,80,0,.75); text-shadow:0 0 6px rgba(255,80,0,.4); letter-spacing:1px; }
.vhsc-rmt-status  { display:block; font-family:'Courier New',monospace; font-size:8px; color:rgba(255,255,255,.2); letter-spacing:1px; min-height:10px; }

/* Button rows */
.vhsc-rmt-row        { display:flex; gap:5px; width:100%; justify-content:center; }
.vhsc-rmt-transport  { display:grid; grid-template-columns:repeat(4,1fr); gap:4px; width:100%; }
.vhsc-rmt-ch-row     { display:grid; grid-template-columns:1fr 1fr; gap:5px; }

/* Buttons */
.vhsc-rmt-btn {
  background:linear-gradient(180deg,var(--vhsc-body-light,#2f2f34) 0%,var(--vhsc-body-mid,#252528) 100%);
  border:1px solid rgba(0,0,0,.6); border-bottom:2px solid rgba(0,0,0,.5);
  border-radius:3px; color:var(--vhsc-accent); font-size:9px; cursor:pointer;
  padding:5px 2px; transition:transform .08s,border-bottom-width .08s; outline:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.07); width:100%;
  display:flex; align-items:center; justify-content:center;
}
.vhsc-rmt-btn:active,.vhsc-rmt-btn.vhsc-rmt-pressed { transform:translateY(1px); border-bottom-width:1px; }
.vhsc-rmt-btn:hover { background:linear-gradient(180deg,#3a3a40 0%,#2f2f34 100%); }
.vhsc-rmt-btn--wide { width:100%; font-size:9px; letter-spacing:1px; color:rgba(200,168,75,.8); }
.vhsc-rmt-play  { color:#6dcf6d; background:linear-gradient(180deg,#263026 0%,#1a211a 100%); }
.vhsc-rmt-ch-up,.vhsc-rmt-ch-dn { font-size:8px; letter-spacing:.5px; }

/* Grip texture */
.vhsc-rmt-grip { display:flex; flex-direction:column; gap:3px; width:60%; margin-top:4px; }
.vhsc-rmt-grip-line { height:2px; background:rgba(0,0,0,.3); border-radius:1px; box-shadow:0 1px 0 rgba(255,255,255,.03); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width:520px) {
  .vhsc-recorder { width:300px; }
  .vhsc-monitor-section { padding:0 16px; }
  .vhsc-door-ribs,.vhsc-cassette-window { display:none; }
  .vhsc-vents,.vhsc-brand-label { display:none; }
  .vhsc-counter-panel { flex:0 0 58px; }
  .vhsc-btn { height:22px; font-size:9px; min-width:22px; }
}
@media (max-width:360px) { .vhsc-recorder { width:260px; } }
@media (prefers-reduced-motion:reduce) {
  .vhsc-idle-icon,.vhsc-wrapper.vhsc-playing .vhsc-led { animation:none; opacity:.4; }
}
