:root {
    --neon-green: #00ff66;
    --bg-dark: #0a0a0a;
    --panel-bg: #161616;
}

body {
    background: var(--bg-dark);
    color: #ccc;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    overflow: hidden;
}

.app-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    height: 100vh;
    gap: 10px;
    padding: 10px;
    box-sizing: border-box;
}

.panel {
    background: var(--panel-bg);
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #222;
    margin-bottom: 10px;
}

h2 {
    font-size: 0.8rem;
    color: var(--neon-green);
    letter-spacing: 2px;
    margin: 0 0 15px 0;
    border-bottom: 1px solid #333;
}

select,
button {
    width: 100%;
    padding: 10px;
    background: #000;
    color: var(--neon-green);
    border: 1px solid #333;
    margin-bottom: 10px;
    cursor: pointer;
}

button:active {
    background: var(--neon-green);
    color: #000;
}

.badge {
    font-weight: bold;
    padding: 5px;
    text-align: center;
    border-radius: 3px;
    font-size: 0.7rem;
    background: #222;
    margin-bottom: 15px;
}

.badge.active {
    background: #aa0000;
    color: white;
    animation: blink 1s infinite;
}

.waterfall-wrapper {
    background: #000;
    height: 350px;
    border: 1px solid #333;
}

#waterfall-canvas {
    width: 100%;
    height: 100%;
}

.results-wrapper {
    flex: 1;
    overflow-y: auto;
    background: var(--panel-bg);
    border: 1px solid #222;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

th {
    position: sticky;
    top: 0;
    background: #222;
    color: #888;
    text-align: left;
    padding: 10px;
}

td {
    padding: 8px 10px;
    border-bottom: 1px solid #222;
}

#console-out {
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    color: #0088ff;
    height: 300px;
    overflow-y: auto;
}

@keyframes blink {
    50% {
        opacity: 0.5;
    }
}

/* Base badge style */
.badge {
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: bold;
    font-family: monospace;
    transition: background-color 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Waiting Phase (Blue/Gray) */
.phase-waiting {
    background-color: #2c3e50;
    color: #bdc3c7;
}

/* Receiving Phase (Steady Green) */
.phase-rx {
    background-color: #1b4332;
    color: #40ff00;
    border-color: #40ff00;
}

/* Decoding Phase (Steady Amber) */
.phase-decode {
    background-color: #432818;
    color: #ff9f1c;
    border-color: #ff9f1c;
}


.control-row {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}

.control-row label {
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.checkbox-row {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-row input {
    margin: 0;
}

input[type="range"] {
    width: 100%;
    background: #333;
    cursor: pointer;
}