/* 기본 리셋 및 공통 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1e1e1e;
    color: #ffffff;
    overflow-x: hidden; /* 가로 스크롤만 숨김 */
    overflow-y: auto; /* 세로 스크롤은 허용 (푸터 표시를 위해) */
}

/* 버튼 스타일 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin: 2px;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: #007acc;
    color: white;
}

.btn-primary:hover {
    background: #005a9e;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #1e7e34;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}

.btn-control {
    background: #495057;
    color: white;
    padding: 6px 12px;
    font-size: 12px;
}

.btn-control:hover {
    background: #343a40;
}

/* 입력 필드 스타일 (고정밀도 슬라이더) */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: #444;
    border-radius: 6px;
    height: 10px;
    outline: none;
    margin: 8px 0;
    border: 1px solid #666;
    cursor: crosshair; /* 정밀 조작 커서 */
    --slider-progress: 50%;
}

input[type="range"]::-webkit-slider-track {
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #007acc 0%, #007acc var(--slider-progress), #444 var(--slider-progress), #444 100%);
    border-radius: 6px;
    height: 10px;
    border: 1px solid #666;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background: #007acc;
    border: 3px solid #ffffff;
    border-radius: 50%;
    cursor: grab;
    height: 24px;
    width: 24px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    transition: all 0.15s ease;
    position: relative;
}

input[type="range"]::-moz-range-track {
    background: linear-gradient(to right, #007acc 0%, #007acc var(--slider-progress), #444 var(--slider-progress), #444 100%);
    border-radius: 6px;
    height: 10px;
    border: 1px solid #666;
}

input[type="range"]::-moz-range-thumb {
    background: #007acc;
    border: 3px solid #ffffff;
    border-radius: 50%;
    cursor: grab;
    height: 24px;
    width: 24px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

input[type="range"]:hover::-webkit-slider-thumb {
    background: #005a9e;
    transform: scale(1.2);
    border-color: #00ff88; /* 호버 시 초록색 테두리 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

input[type="range"]:hover::-moz-range-thumb {
    background: #005a9e;
    transform: scale(1.2);
    border-color: #00ff88;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

input[type="range"]:active::-webkit-slider-thumb {
    background: #004080;
    transform: scale(1.3);
    cursor: grabbing;
    border-color: #ffff00; /* 드래그 시 노란색 테두리 */
    box-shadow: 0 0 15px rgba(0, 122, 204, 0.8);
}

input[type="range"]:active::-moz-range-thumb {
    background: #004080;
    transform: scale(1.3);
    cursor: grabbing;
    border-color: #ffff00;
    box-shadow: 0 0 15px rgba(0, 122, 204, 0.8);
}

input[type="range"]:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.3);
    border-radius: 6px;
}

input[type="range"]:focus::-webkit-slider-thumb {
    background: #005a9e;
    box-shadow: 0 0 0 4px rgba(0, 122, 204, 0.4), 0 3px 8px rgba(0, 0, 0, 0.4);
}

input[type="range"]:focus::-moz-range-thumb {
    background: #005a9e;
    box-shadow: 0 0 0 4px rgba(0, 122, 204, 0.4), 0 3px 8px rgba(0, 0, 0, 0.4);
}

input[type="number"] {
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 4px;
    color: white;
    padding: 4px 8px;
    width: 80px;
}

input[type="number"]:focus {
    border-color: #007acc;
    outline: none;
}

/* 파일 업로드 스타일 */
.file-input {
    display: none;
}

.file-label {
    background: #007acc;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-block;
    transition: background 0.2s ease;
}

.file-label:hover {
    background: #005a9e;
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: #2d2d2d;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 400px;
    text-align: center;
}

.progress-bar {
    background: #444;
    border-radius: 10px;
    height: 20px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-fill {
    background: #007acc;
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

/* 스크롤바 스타일 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #2d2d2d;
}

::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #777;
}
