/* OFDM Cyclic Prefix Trade-off – Canvas-based visualization. Local scope. */
.cp1-container {
    display: grid;
    grid-template-columns: 200px 1fr;
    grid-template-rows: auto 1fr auto;
    gap: 12px;
    max-width: 800px;
    min-height: 480px;
    font-family: 'Courier New', Courier, monospace;
    background: #0a0a0a;
    color: #c0c0c0;
    border-radius: 8px;
    padding: 12px;
    box-sizing: border-box;
}

.cp1-container * {
    box-sizing: border-box;
}

.cp1-sidebar {
    grid-column: 1;
    grid-row: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #111;
    border-radius: 6px;
    padding: 10px;
    border: 1px solid #333;
}

.cp1-sidebar h3 {
    margin: 0 0 6px 0;
    font-size: 12px;
    font-weight: 600;
    color: #7aa2f7;
    border-bottom: 1px solid #333;
    padding-bottom: 4px;
}

.cp1-control-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 11px;
}

.cp1-control-row label {
    min-width: 72px;
    color: #a0a0a0;
}

.cp1-sidebar select {
    flex: 1;
    min-width: 0;
    padding: 4px 6px;
    font-size: 11px;
    font-family: 'Courier New', Courier, monospace;
    background: #1a1a1a;
    color: #c0c0c0;
    border: 1px solid #444;
    border-radius: 4px;
    cursor: pointer;
}

.cp1-sidebar select:hover,
.cp1-sidebar select:focus {
    border-color: #7aa2f7;
    outline: none;
}

.cp1-sidebar input[type="range"] {
    flex: 1;
    min-width: 60px;
    height: 5px;
    background: #1a1a1a;
    border-radius: 2px;
    -webkit-appearance: none;
    appearance: none;
}

.cp1-sidebar input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #7aa2f7;
    border-radius: 50%;
    cursor: pointer;
}

.cp1-sidebar input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #7aa2f7;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.cp1-value {
    font-size: 11px;
    color: #9ece6a;
    min-width: 40px;
    text-align: right;
}

.cp1-check-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #a0a0a0;
}

.cp1-check-row input {
    cursor: pointer;
    accent-color: #7aa2f7;
}

.cp1-run-pause {
    width: 100%;
    padding: 6px 10px;
    font-size: 12px;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 600;
    background: #1a1a1a;
    color: #c0c0c0;
    border: 1px solid #444;
    border-radius: 4px;
    cursor: pointer;
}

.cp1-run-pause:hover {
    background: #252525;
    border-color: #7aa2f7;
    color: #7aa2f7;
}

.cp1-circular-wrap {
    width: 100%;
    height: 100px;
    min-height: 80px;
    background: #111;
    border-radius: 6px;
    border: 1px solid #333;
    overflow: hidden;
    display: none;
}

.cp1-circular-wrap.visible {
    display: block;
}

.cp1-circular-wrap canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.cp1-main {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.cp1-panel {
    background: #111;
    border-radius: 6px;
    border: 1px solid #333;
    overflow: hidden;
    position: relative;
}

.cp1-panel-title {
    font-size: 11px;
    color: #7aa2f7;
    padding: 6px 10px;
    border-bottom: 1px solid #333;
    background: #0d0d0d;
}

.cp1-panel canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.cp1-panel-a-wrap {
    height: 520px;
    min-height: 420px;
}

.cp1-panel-b-wrap {
    height: 180px;
    min-height: 140px;
}

.cp1-panel-c-wrap {
    height: 140px;
    min-height: 100px;
}

.cp1-metrics {
    font-size: 10px;
    font-family: 'Courier New', Courier, monospace;
    background: #1a1a1a;
    border-radius: 4px;
    padding: 8px;
    border: 1px solid #333;
    color: #a0a0a0;
    line-height: 1.5;
}

.cp1-metrics span {
    color: #9ece6a;
}

@media (max-width: 600px) {
    .cp1-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr;
    }
    .cp1-sidebar {
        grid-column: 1;
        grid-row: 1;
    }
    .cp1-main {
        grid-column: 1;
        grid-row: 2 / -1;
    }
}
