:root {
    --bg-blue: #181926;
    --line-blue: #364a8b;
    --bocchi-pink: #fa75a7;
    --nijika-yellow: #eec643;
    --ryo-blue: #00aaff;
    --kita-red: #e04444;
    --text-main: #cad3f5;
}

body {
    background-color: var(--bg-blue);
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    margin: 0;
    overflow-x: hidden;
    min-height: 100vh;
}

.cable-line {
    position: absolute;
    left: 40px;
    top: 0; bottom: 0;
    width: 4px;
    background: var(--line-blue);
    z-index: 0;
    box-shadow: 0 0 5px var(--bg-blue);
}

.noise-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 999;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.grid-background {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image:
        linear-gradient(var(--line-blue) 1px, transparent 1px),
        linear-gradient(90deg, var(--line-blue) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.2;
    z-index: -1;
}

.schematic-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    border-left: 2px dashed var(--bocchi-pink);
    margin-left: max(20px, calc(50% - 400px));
}

.blueprint-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid var(--text-main);
    padding-bottom: 20px;
    margin-bottom: 40px;
}

.spec-box {
    font-size: 0.7rem;
    color: var(--ryo-blue);
    line-height: 1.4;
}

.label { color: var(--text-main); opacity: 0.6; }

h1 {
    font-size: 3rem;
    margin: 0;
    color: var(--bocchi-pink);
    text-transform: uppercase;
    letter-spacing: -2px;
    position: relative;
}

.signal-text {
    font-size: 3rem;
    margin: 0;
    color: var(--bocchi-pink);
    text-transform: uppercase;
    letter-spacing: -2px;
    cursor: default;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.signal-text:hover {
    color: var(--kita-red);
    text-shadow:
        0 0 10px rgba(224, 68, 68, 0.8),
        0 0 30px rgba(224, 68, 68, 0.4);
}

.amp-head-nav {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 900px;
    height: 100px;
    margin: 0 auto 50px auto;
    padding: 0 40px;
    box-sizing: border-box;
    background-color: #242530;
    background-image: linear-gradient(100deg, rgba(255,255,255,0.05) 0%, transparent 100%);
    border-top: 2px solid #585b70;
    border-bottom: 2px solid #181825;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    border-radius: 4px;
}

.patch-bay {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 10px;
}

.jack-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.jack-socket {
    width: 14px;
    height: 14px;
    background: #111;
    border: 3px solid #6c7086;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 2px rgba(0,0,0,0.5);
    transition: 0.2s;
}

.jack-hole {
    width: 8px;
    height: 8px;
    background: #000;
    border-radius: 50%;
}

.jack-label {
    margin-top: 8px;
    font-size: 0.6rem;
    color: var(--text-main);
    letter-spacing: 1px;
    opacity: 0.7;
}

.jack-container:hover .jack-socket {
    border-color: var(--bocchi-pink);
}

.jack-container:hover .jack-label {
    color: var(--bocchi-pink);
    opacity: 1;
}

.jack-container.active .jack-socket {
    border-color: var(--kita-red);
    box-shadow: 0 0 10px var(--kita-red);
    background: #300;
}

.jack-container.active .jack-label {
    color: var(--kita-red);
    font-weight: bold;
    opacity: 1;
}

.led-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--kita-red);
    box-shadow: 0 0 10px var(--kita-red);
    border: none;
    margin: 0;
}

.jack-container.active {
    cursor: default;
}

.patch-cable-visual {
    position: relative;
    width: 80px;
    height: 25px;
    margin-top: -15px;
    pointer-events: none;
}

.cable-arch {
    width: 100%;
    height: 100%;
    border-top: 4px solid var(--bocchi-pink);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    position: relative;
    filter: drop-shadow(0 4px 2px rgba(0,0,0,0.5));
}

.cable-arch::before, .cable-arch::after {
    content: '';
    position: absolute;
    bottom: -4px;
    width: 6px;
    height: 12px;
    background: #888;
    border: 1px solid #333;
}

.cable-arch::before { left: -4px; transform: rotate(-15deg); }
.cable-arch::after { right: -4px; transform: rotate(15deg); }

.amp-controls {
    display: flex;
    align-items: center;
    gap: 30px;
    height: 100%;
}

.amp-vent {
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0.5;
}

.vent-slit {
    width: 60px;
    height: 4px;
    background: #000;
    border-radius: 2px;
    box-shadow: 0 1px 0 rgba(255,255,255,0.1);
}

.serial-plate {
    border: 1px solid #777;
    background: #111;
    padding: 5px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: inset 0 0 10px #000;
}

.brand {
    font-family: 'Permanent Marker', cursive;
    color: var(--bocchi-pink);
    font-size: 0.9rem;
    line-height: 1;
}

.model {
    font-family: monospace;
    color: #888;
    font-size: 0.6rem;
    letter-spacing: 2px;
}

.power-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.power-switch {
    width: 12px;
    height: 24px;
    background: #888;
    border: 2px solid #555;
    position: relative;
    box-shadow: 0 5px 5px rgba(0,0,0,0.5);
}

.power-switch.on::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 8px; height: 8px;
    background: var(--kita-red);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--kita-red);
}

.control-label {
    font-size: 0.6rem;
    color: var(--text-main);
    opacity: 0.5;
}

.rack-screw {
    position: absolute;
    width: 12px; height: 12px;
    background: #181825;
    border-radius: 50%;
    border: 1px solid #45475a;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 1px 1px 2px #000;
}

.rack-screw::before, .rack-screw::after {
    content: '';
    position: absolute;
    background: #45475a;
}
.rack-screw::before { width: 8px; height: 2px; transform: rotate(45deg); }
.rack-screw::after { width: 2px; height: 8px; transform: rotate(45deg); }

.top-left { top: 10px; left: 10px; }
.top-left-1 { bottom: 100px; left: 10px; }
.top-right-1 { bottom: 100px; right: 5px; }
.top-right { top: 10px; right: 10px; }
.bottom-left { bottom: 10px; left: 10px; }
.bottom-left-1 { bottom: 10px; left: 10px; }
.bottom-right-1 { bottom: 10px; right: 5px; }
.bottom-right { bottom: 10px; right: 10px; }

.pedalboard {
    position: relative;
    padding-left: 5px;
    display: flex;
    flex-direction: column;
}

.pedal-box {
    background: rgba(24, 25, 38, 0.9);
    border: 2px solid var(--text-main);
    margin-bottom: 40px;
    padding: 20px;
    position: relative;
    transition: transform 0.2s;
    width: 92%;
}

.pedal-box:hover {
    transform: scale(1.02);
    border-color: var(--bocchi-pink);
    box-shadow: 5px 5px 0 var(--ryo-blue);
}

.screw {
    position: absolute;
    width: 10px;
    height: 10px;
    color: #555;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.top-left { top: 5px; left: 5px; }
.top-right { top: 5px; right: 5px; }
.bottom-left { bottom: 5px; left: 5px; }
.bottom-right { bottom: 5px; right: 5px; }

.pedal-display {
    background: #000;
    color: var(--nijika-yellow);
    padding: 5px 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    border: 1px solid #333;
    display: inline-block;
    margin-bottom: 15px;
}

.pedal-title {
    margin: 0;
    font-size: 1.8rem;
}

.pedal-title a {
    color: var(--text-main);
    text-decoration: none;
    font-family: 'Teko', monospace;
    font-size: 2.2rem;
    letter-spacing: 1px;
    display: inline-block;
    transition: transform 0.1s, color 0.1s;
    line-height: 0.9;
}

.pedal-title a:hover {
    color: var(--kita-red);
    text-shadow:
        3px 3px 0px var(--bg-blue),
        6px 6px 0px var(--ryo-blue);
    transform: translate(-2px, -2px);
}

.pedal-title a::before {
    content: "▶";
    font-family: monospace;
    color: var(--nijika-yellow);
    position: absolute;
    left: -25px;
    opacity: 0;
    transition: opacity 0.1s;
}

.pedal-title a:hover::before {
    opacity: 1;
}

.pedal-box:hover .pedal-title a {
    color: var(--bocchi-pink);
    text-shadow: 2px 2px 0 var(--ryo-blue);
}

.tags {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--ryo-blue);
}

.stomp-switch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid #555;
    background-color: #333;
    position: absolute;
    bottom: 20px;
    right: 20px;
    box-shadow: inset 2px 2px 5px #000;
}

.pedal-box:hover .stomp-switch {
    background: var(--kita-red);
    box-shadow: 0 0 10px var(--kita-red);
    border-color: var(--kita-red);
}

.transport-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 5px;
    padding: 20px 40px;
    background-color: #242530;
    background-image: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, transparent 100%);
    border-top: 2px solid #585b70;
    border-bottom: 2px solid #181825;
    border-radius: 4px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    z-index: 10;
}

.bocchi-sticker {
    position: absolute;
    left: 40px;
    transform: rotate(-12deg);
}

.bocchi-sticker img {
    width: 40px;
}

.dip-switch-block {
    position: absolute;
    bottom: 20px;
    right: 60px;
    width: 60px;
    height: 30px;
    background: var(--kita-red);
    border: 1px solid #990000;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding: 2px;
    box-shadow:
        inset 0 0 5px rgba(0,0,0,0.5),
        2px 2px 5px rgba(0,0,0,0.5);
    transform: rotate(90deg);
    z-index: 1;
}

.dip-switch {
    width: 8px;
    height: 16px;
    background: #e0e0e0;
    border-radius: 1px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.masking-tape {
    position: absolute;
    bottom: 30px;
    left: 130px;
    width: 90px;
    height: 25px;
    background: #f0e6d2;
    transform: rotate(-3deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.4);
    opacity: 0.9;
    z-index: 4;
}

.masking-tape::before { left: -1px; }
.masking-tape::after { right: -1px; }

.masking-tape span {
    font-family: 'Permanent Marker', cursive;
    font-size: 0.6rem;
    color: #333;
    transform: rotate(2deg);
}

.kessoku-sticker {
    position: absolute;
    right: 0px;
    bottom: 0px;
}

.kessoku-sticker img {
    width: 80px;
}

.tape-btn {
    width: 60px;
    height: 40px;
    background: linear-gradient(to bottom, #333, #222);
    border: none;
    border-radius: 2px;
    color: #888;
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    box-shadow:
        0 4px 0 #111,
        0 5px 5px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.1);
    transition: all 0.1s;
}

.tape-btn:hover {
    background: linear-gradient(to bottom, #444, #333);
    color: #fff;
    text-shadow: 0 0 5px #fff;
}

.tape-btn:active {
    transform: translateY(4px);
    box-shadow:
        0 0 0 #111,
        inset 0 2px 5px rgba(0,0,0,0.8);
    background: #111;
    color: var(--kita-red);
}

.tape-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: translateY(2px);
    box-shadow: 0 2px 0 #111;
}

.icon {
    display: block;
    line-height: 1;
    letter-spacing: -2px;
    font-weight: bold;
}

.cassette-display {
    position: relative;
    width: 160px;
    height: 80px;
    background: #333;
    border-radius: 6px;
    padding: 2px;
    box-shadow:
        inset 0 0 10px #000,
        0 2px 5px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #444;
}

.cassette-housing {
    width: 100%; height: 100%;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.2);

    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.02) 2px,
        rgba(0,0,0,0.02) 4px
    );
}

.cassette-label-area {
    width: 100%;
    height: 35px;
    border-bottom: 2px solid #b0b0b0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    box-sizing: border-box;
    background: var(--nijika-yellow);
}

.tape-name {
    font-family: 'Permanent Marker', cursive;
    font-size: 0.6rem;
    color: var(--ryo-blue);
    text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
}

.bank-readout {
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
    font-size: 0.8rem;
    color: #333;
    padding: 2px 6px;
    border-radius: 2px;
    transform: rotate(-2deg);
    box-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.tape-window {
    width: 120px;
    height: 35px;
    background: #2a2a2a;
    border-radius: 10px;
    margin-top: 8px;
    margin-bottom: 4px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    box-shadow: inset 0 2px 5px #000;
    border: 1px solid #555;
}

.magnetic-tape {
    position: absolute;
    bottom: 7x; left: 25px; right: 25px;
    height: 20px;
    background: #111;
    border-top: 1px solid #444;
    z-index: 0;
}

.spool {
    width: 24px;
    height: 24px;
    background: #cdd6f4;
    border-radius: 50%;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 2px #000;
}

.spool-teeth {
    width: 100%; height: 100%;
    border-radius: 50%;
    background: repeating-conic-gradient(
        #fff 0% 10%,
        #ccc 10% 20%
    );
    border: 2px solid #fff;
}

.spool::after {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    background: #2a2a2a;
    border-radius: 50%;
}

.tape-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    background: #181825;
    padding: 5px 10px;
    border-radius: 2px;
    border: 1px solid #111;
    box-shadow: inset 0 0 10px #000;
}

.label {
    font-size: 0.4rem;
    color: #6c7086;
    letter-spacing: 1px;
    font-family: sans-serif;
    text-transform: uppercase;
}

.counter-window {
    background-color: #000;
    color: var(--nijika-yellow);
    text-shadow: 0 0 2px var(--nijika-yellow);
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    padding: 2px 8px;
    border-radius: 1px;
    letter-spacing: 2px;
    border: 1px solid #333;
}

.schematic-footer {
    margin-top: 50px;
    border-top: 1px dashed var(--text-main);
    padding-top: 20px;
    text-align: center;
    font-size: 0.7rem;
    opacity: 0.5;
}

.monitor-screen {
    background: #0d0d15;
    border: 2px solid #585b70;
    border-radius: 4px;
    padding: 40px;
    margin: 0 auto;
    position: relative;
    box-sizing: inset 0 0 20px #000;
    overflow: hidden;
}

.screen-glare {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 10;
    opacity: 0.3;
}

.markdown-body {
    position: relative;
    z-index: 2;
    color: #cdd6f4;
    line-height: 1.6;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3 {
    font-family: 'Teko', sans-serif;
    color: var(--bocchi-pink);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px dashed #333;
    padding-bottom: 5px;
}

.markdown-body h1 { font-size: 2.5rem; color: var(--kita-red); }
.markdown-body h2 { font-size: 2rem; }
.markdown-body p { margin-bottom: 20px; font-size: 1.1rem; }

.markdown-body a {
    color: var(--ryo-blue);
    text-decoration: none;
    border-bottom: 1px solid var(--ryo-blue);
}
.markdown-body a:hover {background: var(--ryo-blue); color: #000; }

.markdown-body pre {
    background: #181825;
    border: 1px solid #444;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    border-left: 3px solid var(--nijika-yellow);
}

.markdown-body code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.1);
    padding: 2px 5px;
    border-radius: 2px;
}

.markdown-body pre code {
    background: transparent;
    padding: 0;
}

.markdown-body img {
    max-width: 100%;
    border: 2px solid #444;
    margin: 20px 0;
}

@media (max-width: 600px) {
    h1 { font-size: 2rem; }
    .schematic-container { border-left: none; margin-left: 0; }
    .amp-controls { display: none; }
    .amp-head-nav { justify-content: center; }
}