body {
        background: #0a0a0a;
        color: white;
        font-family: 'Segoe UI', sans-serif;
        display: flex;
        flex-direction: column;
        height: 100vh;
        margin: 0;
        overflow: hidden;
}

.main-layout {
        display: flex;
        flex: 1;
        overflow: hidden;
        padding: 10px;
        gap: 10px;
}

.left-panel {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 10px;
}

#freqCanvas {
        width: 100%;
        height: 80px;
        background: #000;
        border: 1px solid #333;
        border-radius: 5px;
}

.wave-container {
        position: relative;
        width: 100%;
        height: 140px;
        background: #111;
        border: 1px solid #444;
        border-radius: 8px;
        cursor: pointer;
        overflow: hidden;
}

#waveCanvas {
        width: 100%;
        height: 100%;
}

#playhead-wave {
        position: absolute;
        top: 0;
        left: 0;
        width: 3px;
        height: 100%;
        background: #ffffff;
        z-index: 5;
        box-shadow: 0 0 10px #fff;
        pointer-events: none;
}

.settings-panel {
        background: #1e1e1e;
        padding: 15px;
        border-radius: 8px;
        border: 1px solid #333;
}

.setting-group {
        margin-bottom: 8px;
        display: flex;
        align-items: center;
        gap: 12px;
}

.setting-group input {
        width: 80px;
        padding: 6px;
        background: #000;
        color: #fff;
        border: 1px solid #555;
        border-radius: 4px;
        outline: none;
}

.chart-screen {
        width: 340px;
        background: #050505;
        border: 2px solid #333;
        position: relative;
        overflow-y: scroll;
        display: block;
}

.lane-container {
        width: 100%;
        position: relative;
        background-color: #050505;
        background-repeat: repeat-y;
        background-position: bottom;
}

.lane-wrapper {
        display: flex;
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
}

.lane {
        flex: 1;
        border-right: 1px solid rgba(255, 255, 255, 0.05);
        position: relative;
}

.chart-note {
        position: absolute;
        width: 92%;
        left: 4%;
        height: 12px;
        background: #00ffcc;
        border-radius: 2px;
        box-shadow: 0 0 10px #00ffcc;
        z-index: 3;
        cursor: grab;
}

.chart-note.selected {
        border: 2px solid #fff;
        box-shadow: 0 0 20px #fff;
        z-index: 10;
        background: #ff00ff;
}

.chart-note.is-long {
        background: linear-gradient(to top, #00ffcc, #0088ff);
        border-radius: 10px;
        box-shadow: 0 0 15px #0088ff;
}

#chart-playhead {
        position: absolute;
        width: 100%;
        height: 4px;
        background: #ffaa00;
        z-index: 10;
        left: 0;
        box-shadow: 0 0 15px #ffaa00;
        pointer-events: none;
}

.bottom-panel {
        height: 180px;
        padding: 15px;
        background: #111;
        border-top: 2px solid #222;
        box-sizing: border-box;
}

#chart-output {
        width: 100%;
        height: 60px;
        background: #050505;
        color: #0f0;
        border: 1px solid #333;
        font-family: 'Consolas', monospace;
        font-size: 11px;
        margin-top: 8px;
        padding: 5px;
}

.controls {
        display: flex;
        gap: 10px;
        align-items: center;
        flex-wrap: wrap;
}

button {
        padding: 8px 15px;
        cursor: pointer;
        border-radius: 6px;
        border: none;
        font-weight: bold;
        font-size: 13px;
        transition: 0.2s;
}

button:disabled {
        opacity: 0.3;
        cursor: not-allowed;
}

/* 곡 선택 모달 스타일 */
#song-select-modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.9);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        z-index: 1000;
}

.modal-content {
        background: #111;
        border: 2px solid #00ffcc;
        padding: 30px;
        border-radius: 15px;
        width: 450px;
        text-align: center;
}

.song-list-scroll {
        max-height: 300px;
        overflow-y: auto;
        margin: 20px 0;
        background: #000;
        border-radius: 8px;
}

.song-item {
        padding: 15px;
        border-bottom: 1px solid #222;
        cursor: pointer;
        transition: 0.2s;
        text-align: left;
}

.song-item:hover {
        background: #1a1a1a;
        color: #00ffcc;
}

.btn-nav {
        background: #555;
        color: white;
        margin-bottom: 5px;
}

.btn-nav:hover {
        background: #ff4444;
}

.file-label {
        padding: 8px 15px;
        background: #ffaa00;
        border-radius: 6px;
        cursor: pointer;
        font-weight: bold;
        font-size: 13px;
        display: inline-block;
}

.file-label.disabled {
        opacity: 0.3;
        cursor: not-allowed;
        pointer-events: none;
}

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


/* 키 설정 버튼 그룹 */
.key-config-group {
        display: flex;
        gap: 5px;
}

/* 개별 키 버튼 */
.key-btn {
        width: 30px;
        height: 30px;
        padding: 0;
        background: #333;
        border: 1px solid #555;
        color: #fff;
        font-family: monospace;
        font-size: 14px;
        cursor: pointer;
}

/* 마우스 올렸을 때 */
.key-btn:hover {
        border-color: #00ffcc;
        color: #00ffcc;
}

/* 키 입력 대기 중일 때 (활성화) */
.key-btn.active {
        background: #00ffcc;
        color: #000;
        border-color: #fff;
        animation: blink 0.5s infinite alternate;
}

@keyframes blink {
        from {
                opacity: 1;
        }

        to {
                opacity: 0.5;
        }
}


/* 세로형 설정 그룹 */
.setting-group-vertical {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    width: 100%;
}

.group-label {
    font-size: 12px;
    color: #ccc;
    margin-bottom: 5px;
}

/* 디바이저 버튼 컨테이너 */
.divisor-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.divisor-row {
    display: flex;
    gap: 4px;
}

/* 개별 버튼 스타일 */
.divisor-btn {
    flex: 1;
    background: #333;
    border: 1px solid #555;
    color: #fff;
    padding: 6px 0;
    font-size: 11px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.divisor-btn:hover {
    background: #444;
}

/* 활성화된 버튼 (선택됨) */
.divisor-btn.active {
    background: #00ffcc;
    color: #000;
    font-weight: bold;
    border-color: #00ffcc;
}

/* 배속 슬라이더 스타일 */
input[type=range] {
    width: 100%;
    accent-color: #00ffcc; /* 크롬/엣지 슬라이더 색상 */
    cursor: pointer;
}