/* === BASE === */
body {
    margin: 0;
    background-color: #000;
    font-family: 'Segoe UI', 'Roboto', monospace;
    overflow: hidden;
    color: #fff;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: #020202;
}

/* === UI PANEL === */
#ui-layer {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 10;
    background: rgba(10, 10, 10, 0.96);
    border: 1px solid #333;
    padding: 20px;
    width: 380px;
    border-radius: 12px;
    box-shadow: 0 10px 60px rgba(0, 0, 0, 0.95);
    transition: all 0.3s ease-out;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#ui-layer.hidden {
    transform: translateY(120%);
    opacity: 0;
    pointer-events: none;
}

#ui-layer.auto-active {
    border-color: #00ff41;
}

#ui-layer.auto-active .manual-group {
    opacity: 0.6;
    pointer-events: none;
}

/* HEADER */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

h1 {
    font-size: 14px;
    margin: 0;
    color: #fff;
    letter-spacing: 2px;
    font-weight: 800;
    text-transform: uppercase;
}

.logic-tag {
    font-size: 9px;
    background: #222;
    color: #888;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    border: 1px solid #333;
    min-width: 80px;
    text-align: center;
    transition: 0.3s;
}

.logic-tag.active {
    color: #00f0ff;
    border-color: #00f0ff;
    background: rgba(0, 240, 255, 0.1);
}

/* BPM & PLAYER */
.top-row {
    display: flex;
    gap: 10px;
}

.bpm-box {
    background: #080808;
    border: 1px solid #222;
    border-radius: 6px;
    padding: 5px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

.bpm-val {
    font-size: 18px;
    font-weight: 900;
    color: #00f0ff;
}

.bpm-lbl {
    font-size: 8px;
    color: #555;
    text-transform: uppercase;
}

.player-box {
    flex: 1;
    background: #080808;
    border: 1px solid #222;
    border-radius: 6px;
    padding: 5px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.time-text {
    font-size: 9px;
    color: #666;
    text-align: right;
    margin-bottom: 2px;
}

input[type=range].seek-bar {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
    cursor: pointer;
}

input[type=range].seek-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 8px;
    width: 8px;
    background: #00f0ff;
    border-radius: 50%;
    margin-top: -3px;
}

input[type=range].seek-bar::-webkit-slider-runnable-track {
    width: 100%;
    height: 2px;
    background: #444;
}

.btn-row {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}

.btn-mini {
    background: #222;
    border: 1px solid #333;
    color: #ccc;
    font-size: 9px;
    padding: 6px;
    flex: 1;
    cursor: pointer;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: bold;
}

.btn-mini:hover {
    background: #444;
    color: #fff;
}

.btn-mini.play {
    background: #003366;
    color: #fff;
    border-color: #0066ff;
}

/* FX GRID */
.effects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 10px;
}

.fx-toggle {
    background: #111;
    border: 1px solid #333;
    padding: 8px;
    border-radius: 4px;
    font-size: 9px;
    text-transform: uppercase;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
    transition: 0.2s;
}

.fx-toggle:hover {
    background: #1a1a1a;
}

/* Level Bar (Visual Feedback of Fade) */
.fx-level-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: #00f0ff;
    transition: width 0.05s linear;
    opacity: 0.7;
}

/* CONTROLS */
.controls-row {
    display: flex;
    gap: 10px;
}

.btn-auto {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid #444;
    color: #666;
    padding: 10px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
}

.btn-auto.active {
    background: #00ff41;
    color: #000;
    border-color: #00ff41;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
}

.btn-hide {
    width: 40px;
    background: transparent;
    border: 1px solid #333;
    color: #888;
    cursor: pointer;
    border-radius: 4px;
}

.btn-hide:hover {
    color: #fff;
    border-color: #fff;
}

input[type="file"] {
    display: none;
}

.kb-hint {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 10px;
    color: #333;
    user-select: none;
}

.beat-flash {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: #333;
    border-radius: 50%;
}

.beat-flash.on {
    background: #00ff41;
    box-shadow: 0 0 8px #00ff41;
}
