/* 전역 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0e27;
    color: #e0e0e0;
    overflow: hidden;
}

/* 헤더 */
header {
    background: linear-gradient(135deg, #1a1f3a 0%, #2d3561 100%);
    padding: 1rem 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo i {
    font-size: 2rem;
    color: #00ff88;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
}

.header-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 0.75rem;
    color: #8892b0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #00ff88;
    font-family: 'Courier New', monospace;
}

/* 메인 컨테이너 */
.main-container {
    display: flex;
    height: calc(100vh - 80px);
}

/* 사이드바 */
.sidebar {
    width: 320px;
    background: #151932;
    padding: 1.5rem;
    overflow-y: auto;
    border-right: 2px solid #2d3561;
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: #0a0e27;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #2d3561;
    border-radius: 4px;
}

.sidebar-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #2d3561;
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-section h3 {
    color: #00ff88;
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-section h3 i {
    font-size: 1.2rem;
}

/* 파일 업로드 */
.file-upload-area {
    margin-bottom: 1rem;
}

.file-info {
    font-size: 0.75rem;
    color: #8892b0;
    margin-top: 0.5rem;
    text-align: center;
}

/* 버튼 스타일 */
.btn-primary,
.btn-secondary,
.btn-view {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #00ff88 0%, #00d4aa 100%);
    color: #0a0e27;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.4);
}

.btn-secondary {
    background: #2d3561;
    color: #e0e0e0;
    margin-bottom: 0.75rem;
}

.btn-secondary:hover {
    background: #3d4571;
}

.btn-view {
    background: #1a1f3a;
    color: #8892b0;
    font-size: 0.85rem;
    padding: 0.6rem;
    margin-bottom: 0.5rem;
}

.btn-view:hover {
    background: #2d3561;
    color: #00ff88;
}

/* 컨트롤 그룹 */
.control-group {
    margin-bottom: 1.25rem;
}

.control-group label {
    display: block;
    color: #8892b0;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.control-group input[type="range"] {
    width: calc(100% - 60px);
    height: 6px;
    background: #2d3561;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #00ff88;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 255, 136, 0.5);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #00ff88;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 255, 136, 0.5);
    border: none;
}

.value-display {
    display: inline-block;
    width: 50px;
    text-align: right;
    color: #00ff88;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    margin-left: 0.5rem;
}

.control-group select {
    width: 100%;
    padding: 0.5rem;
    background: #2d3561;
    color: #e0e0e0;
    border: 1px solid #3d4571;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
}

.control-group select:focus {
    outline: none;
    border-color: #00ff88;
}

.control-group input[type="color"] {
    width: 100%;
    height: 40px;
    border: 2px solid #2d3561;
    border-radius: 6px;
    cursor: pointer;
    background: #2d3561;
}

.control-group input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #00ff88;
}

/* 뷰 버튼 */
.view-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* 정보 그리드 */
.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.info-item {
    background: #1a1f3a;
    padding: 0.75rem;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-label {
    color: #8892b0;
    font-size: 0.85rem;
}

.info-value {
    color: #00ff88;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* 뷰어 컨테이너 */
.viewer-container {
    flex: 1;
    position: relative;
    background: #0a0e27;
}

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

.viewer-overlay {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(21, 25, 50, 0.9);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #2d3561;
    backdrop-filter: blur(10px);
}

.controls-hint {
    font-size: 0.85rem;
}

.controls-hint p {
    color: #8892b0;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.controls-hint p:last-child {
    margin-bottom: 0;
}

.controls-hint i {
    color: #00ff88;
    width: 20px;
}

/* 반응형 디자인 */
@media (max-width: 1024px) {
    .sidebar {
        width: 280px;
    }
}

@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 40vh;
    }
    
    .viewer-container {
        height: 60vh;
    }
    
    .header-stats {
        gap: 1rem;
    }
    
    .logo h1 {
        font-size: 1.2rem;
    }
}
