@import url('https://fonts.cdnfonts.com/css/techno-hideo');

:root {
  --electric-blue: #66d0ff;
  --guts-purple: #3D376B;
  --blood-red: #c71130;
  --deep-bg: rgba(8,12,20,0.95);
  --panel-bg: rgba(12,18,30,0.95);
  --highlight-yellow: #ffd700;
  --white: #ffffff;
}

/* =========================
   GLOBAL RESET
========================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Courier New", monospace;
}

body {
  padding: 20px;
  color: var(--white);
  background: url("Olivia Rodrigo Guts widget.jpg") no-repeat center center fixed;
  background-size: cover;
  position: relative;
  overflow-x: hidden;
}

/* =========================
   BACKGROUND OVERLAY
========================= */

/* Dark GUTS overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(10,10,10,0.75), rgba(0,0,0,0.85)),
    radial-gradient(circle at 50% 20%, rgba(199,17,48,0.2), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Scanline sweep */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(102,208,255,0.05) 0px,
    rgba(102,208,255,0.05) 1px,
    transparent 1px,
    transparent 3px
  );
  animation: sweep 10s linear infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes sweep {
  from { background-position: 0 0; }
  to { background-position: 0 200px; }
}

/* =========================
   MAIN FRAME
========================= */

.codec-frame {
  position: relative;
  z-index: 2; /* ABOVE background overlays */
  max-width: 650px;
  margin: auto;
  padding: 20px;
  background: var(--deep-bg);
  border: 2px solid var(--electric-blue);
  border-radius: 16px;
  box-shadow:
    0 0 25px rgba(102,208,255,0.4),
    inset 0 0 25px rgba(199,17,48,0.08);
}

/* RGB glitch inside frame */
.codec-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255,0,0,0.03), rgba(255,0,0,0.03)),
    linear-gradient(rgba(0,255,255,0.03), rgba(0,255,255,0.03));
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  animation: glitchBurst 6s infinite;
}

@keyframes glitchBurst {
  0% { opacity: 0; transform: translate(0); }
  2% { opacity: 1; transform: translate(-3px,2px); }
  3% { opacity: 0; transform: translate(2px,-1px); }
  100% { opacity: 0; transform: translate(0); }
}

/* =========================
   HEADINGS
========================= */

h1 {
  font-family: 'Techno Hideo', sans-serif;
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px var(--electric-blue);
}

h5 {
  text-align: center;
  font-size: 12px;
  margin: 10px 0 20px;
  letter-spacing: 2px;
  color: var(--electric-blue);
}

/* =========================
   PANEL BOX
========================= */

.codec-box {
  position: relative;
  background: var(--panel-bg);
  border: 2px solid var(--electric-blue);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 0 15px rgba(102,208,255,0.3);
  z-index: 2;
}

/* ensure content above tape */
.codec-box > * {
  position: relative;
  z-index: 2;
}

/* =========================
   LABEL
========================= */

.codec-label {
  position: absolute;
  top: -12px;
  left: 15px;
  font-family: 'Techno Hideo', sans-serif;
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--electric-blue);
  background: var(--deep-bg);
  padding: 2px 6px;
  z-index: 3;
}

.codec-label.red {
  color: var(--blood-red);
}

/* =========================
   PURPLE BAND-AID TAPE
========================= */

.corner-tape {
  position: absolute;
  width: 90px;
  height: 28px;
  background: linear-gradient(
    to bottom,
    rgba(120,110,190,0.95),
    rgba(90,80,160,0.95)
  );
  border-radius: 14px;
  box-shadow:
    inset 0 2px 4px rgba(255,255,255,0.25),
    inset 0 -3px 6px rgba(0,0,0,0.25),
    0 6px 10px rgba(0,0,0,0.5);
  opacity: 0.95;
  z-index: 1; /* BELOW TEXT */
}

/* middle pad */
.corner-tape::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 16px;
  background: rgba(180,170,255,0.35);
  border-radius: 8px;
  transform: translate(-50%, -50%);
}

/* texture */
.corner-tape::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(0,0,0,0.04) 0px,
    rgba(0,0,0,0.04) 2px,
    transparent 2px,
    transparent 5px
  );
  border-radius: 14px;
}

.tape-top-left {
  top: -14px;
  left: -18px;
  transform: rotate(-28deg);
}

.tape-top-right {
  top: -14px;
  right: -18px;
  transform: rotate(28deg);
}

/* =========================
   RAIDEN
========================= */

#raiden-wrapper img {
  width: 100%;
  border-radius: 10px;
  filter: contrast(1.2) grayscale(0.2);
}

/* =========================
   FORM
========================= */

.identity-box {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.identity-box input {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--guts-purple);
  background: rgba(20,20,40,0.9);
  color: white;
}

#editor {
  min-height: 120px;
  background: rgba(10,15,25,0.9);
  border-radius: 8px;
}

#counter {
  font-size: 12px;
  text-align: right;
  margin-top: 8px;
  opacity: 0.7;
}

#sendBtn {
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  font-family: 'Techno Hideo', sans-serif;
  background: var(--guts-purple);
  border: 2px solid var(--highlight-yellow);
  color: var(--highlight-yellow);
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s;
}

#sendBtn:hover {
  background: var(--highlight-yellow);
  color: var(--guts-purple);
}

/* =========================
   COMMENTS
========================= */

.comment {
  background: rgba(20,25,40,0.9);
  border-left: 3px solid var(--electric-blue);
  padding: 10px;
  margin-top: 10px;
  border-radius: 8px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 600px) {
  .identity-box {
    flex-direction: column;
  }

  h1 {
    font-size: 1.6rem;
  }
}