/* UI Editor 전용 스타일 */

.ui-editor-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* 헤더 */
.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2d2d2d;
    padding: 10px 20px;
    border-bottom: 2px solid #007acc;
    flex-shrink: 0;
}

.editor-header h1 {
    font-size: 24px;
    font-weight: 600;
}

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

.canvas-size-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.canvas-size-control input[type="number"] {
    width: 80px;
}

.theme-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-selector label {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.theme-selector select {
    min-width: 150px;
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 4px;
    color: white;
    padding: 6px 10px;
    font-size: 13px;
    cursor: pointer;
}

.theme-selector select:focus {
    border-color: #007acc;
    outline: none;
}

.template-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.template-selector select {
    min-width: 200px;
}

/* 메인 에디터 영역 */
.editor-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* 패널 공통 스타일 */
.editor-panel {
    display: flex;
    flex-direction: column;
    background: #252525;
    border-right: 1px solid #3e3e3e;
    overflow: hidden;
    transition: all 0.3s ease;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #2d2d2d;
    border-bottom: 1px solid #3e3e3e;
    flex-shrink: 0;
}

.panel-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.btn-toggle {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    min-width: 30px;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-toggle:hover {
    background: #3e3e3e;
    border-radius: 4px;
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    padding-bottom: 70px; /* 슬라이드쇼 버튼 공간 확보 */
}

/* 왼쪽 패널: 슬라이드 페이지 목록 */
.left-panel {
    position: relative;
    width: 280px;
    min-width: 280px;
}

.left-panel.collapsed {
    width: 50px;
    min-width: 50px;
}

.left-panel.collapsed .panel-content {
    display: none;
}

.left-panel.collapsed .panel-header {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.left-panel.collapsed .panel-header h3 {
    display: none;
}

.left-panel.collapsed .btn-toggle {
    transform: rotate(180deg);
    writing-mode: horizontal-tb;
}

.page-controls {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.page-controls .btn {
    flex: 1;
    min-width: 80px;
}

.thumbnail-size-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #3e3e3e;
}

.thumbnail-size-control label {
    font-size: 13px;
    white-space: nowrap;
}

.thumbnail-size-control input[type="range"] {
    flex: 1;
}

.thumbnail-size-control span {
    font-size: 12px;
    min-width: 40px;
}

/* 페이지 목록 */
.page-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.page-item {
    background: #2d2d2d;
    border: 2px solid #3e3e3e;
    border-radius: 6px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.page-item:hover {
    border-color: #007acc;
    background: #333;
}

.page-item.active {
    border-color: #007acc;
    background: #1a3a52;
}

.page-item.disabled {
    opacity: 0.5;
    position: relative;
}

.page-item.disabled::after {
    content: '✖';
    position: absolute;
    top: 10px;
    right: 10px;
    color: #ff4444;
    font-size: 20px;
    font-weight: bold;
    z-index: 10;
}

.page-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #1e1e1e;
    border: 1px solid #3e3e3e;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.page-thumbnail-content {
    width: 100%;
    height: 100%;
    transform-origin: top left;
}

.page-info {
    margin-top: 8px;
    font-size: 13px;
}

.page-name {
    font-weight: 600;
    color: #fff;
}

.page-size {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

.page-settings-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #007acc, #00d2ff);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 122, 204, 0.3);
    z-index: 10;
}

.page-settings-btn:hover {
    background: linear-gradient(135deg, #0056a3, #00a8cc);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 4px 12px rgba(0, 122, 204, 0.5);
}

.page-settings-btn:active {
    transform: scale(0.95) rotate(90deg);
}

/* 중앙 패널: UI 캔버스 */
.center-panel {
    flex: 1;
    border-right: 1px solid #3e3e3e;
    background: #1e1e1e;
}

.canvas-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.canvas-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: 
        repeating-linear-gradient(
            0deg,
            #2a2a2a 0px,
            #2a2a2a 1px,
            transparent 1px,
            transparent 20px
        ),
        repeating-linear-gradient(
            90deg,
            #2a2a2a 0px,
            #2a2a2a 1px,
            transparent 1px,
            transparent 20px
        );
    background-size: 20px 20px;
}

.canvas-container.space-pressed {
    cursor: grab !important;
}

.canvas-container.panning {
    cursor: grabbing !important;
}

.canvas-container.space-pressed * {
    cursor: grab !important;
}

.canvas-container.panning * {
    cursor: grabbing !important;
}

.ui-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    background: #ffffff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    border: 3px solid #007acc;
    outline: 2px solid #00d4ff;
    outline-offset: -5px;
    transform-origin: center center;
    will-change: transform;
    /* margin은 JS에서 동적으로 설정 */
}

.ui-canvas.panning {
    cursor: grabbing !important;
}

.ui-canvas.space-pressed {
    cursor: grab !important;
}

.canvas-info {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 100;
}

.canvas-zoom-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: #2d2d2d;
    border-top: 1px solid #3e3e3e;
    flex-shrink: 0;
}

.canvas-zoom-controls label {
    font-size: 13px;
}

.canvas-zoom-controls input[type="range"] {
    flex: 1;
    max-width: 200px;
}

.canvas-zoom-controls span {
    font-size: 12px;
    min-width: 40px;
}

.canvas-zoom-controls .btn-sm {
    min-width: 80px;
}

.zoom-divider {
    width: 1px;
    height: 24px;
    background: #3e3e3e;
    margin: 0 5px;
}

/* UI Box 스타일 */
.ui-box {
    position: absolute;
    border: 2px solid transparent;
    cursor: move;
    transition: border-color 0.2s ease;
    box-sizing: border-box;  /* 9-slice border가 박스 내부에 포함되도록 */
}

/* Box 내용물 컨테이너 (blur 적용 대상) */
.box-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    box-sizing: border-box;
    
    /* 9-slice 렌더링 품질 향상 */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.ui-box:hover {
    border-color: #007acc;
}

.ui-box.selected {
    border-color: #00ff88;
    box-shadow: 0 0 0 1px #00ff88;
}

.ui-box.drag-over {
    border-color: #ff4444 !important;
    box-shadow: 0 0 0 3px #ff4444 !important;
    background-color: rgba(255, 68, 68, 0.1) !important;
}

.ui-box.above-selected {
    border-color: #00ffff !important;
    box-shadow: 0 0 0 2px #00ffff !important;
    opacity: 0.5 !important;
    pointer-events: auto !important;
}

.ui-box.below-selected {
    border-color: #ff00ff !important;
    box-shadow: 0 0 0 2px #ff00ff !important;
}

.ui-box.locked {
    border-color: #ffcaca !important;
    box-shadow: 0 0 0 2px #ffcaca !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.ui-box.locked.selected {
    border-color: #ffcaca !important;
    box-shadow: 0 0 0 3px #ffcaca !important;
    pointer-events: auto !important;
}

.ui-box.has-link {
    cursor: pointer;
}

.ui-box.has-link::after {
    content: '🔗';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 4px;
    border-radius: 3px;
}

/* Box ID 라벨 */
.box-id-label {
    position: absolute;
    top: 2px;
    left: 2px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    pointer-events: none;
    z-index: 10000;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Box 텍스트 */
.box-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    padding: 10px;
    word-wrap: break-word;
    overflow: hidden;
    white-space: pre-wrap;  /* 줄바꿈 유지 */
    word-break: break-word;  /* 긴 단어 자동 줄바꿈 */
}

/* 9-Slice 가이드 라인 */
.slice-guide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10001;
}

.slice-line {
    position: absolute;
    background: #00ff00;
    opacity: 0.7;
}

.slice-line-h {
    width: 100%;
    height: 2px;
    left: 0;
}

.slice-line-v {
    height: 100%;
    width: 2px;
    top: 0;
}

/* Resize 핸들 */
.resize-handle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #00ff88;
    border: 1px solid #fff;
    border-radius: 50%;
    z-index: 10;
}

.resize-handle.nw {
    top: -4px;
    left: -4px;
    cursor: nw-resize;
}

.resize-handle.ne {
    top: -4px;
    right: -4px;
    cursor: ne-resize;
}

.resize-handle.sw {
    bottom: -4px;
    left: -4px;
    cursor: sw-resize;
}

.resize-handle.se {
    bottom: -4px;
    right: -4px;
    cursor: se-resize;
}

.resize-handle.n {
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    cursor: n-resize;
}

.resize-handle.s {
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    cursor: s-resize;
}

.resize-handle.w {
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    cursor: w-resize;
}

.resize-handle.e {
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    cursor: e-resize;
}

/* Rotate 핸들 */
.rotate-handle {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: #007acc;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: grab;
    z-index: 10;
}

.rotate-handle:active {
    cursor: grabbing;
}

.rotate-handle::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 10px;
    background: #007acc;
}

/* 오른쪽 패널: 속성 */
.right-panel {
    width: 400px;
    min-width: 400px;
    border-right: none;
}

.right-panel.collapsed {
    width: 50px;
    min-width: 50px;
}

.right-panel.collapsed .panel-content {
    display: none;
}

.right-panel.collapsed .panel-header {
    flex-direction: column;
    padding: 10px 5px;
}

.right-panel.collapsed .panel-tabs {
    display: none;
}

.right-panel.collapsed .btn-toggle {
    transform: rotate(180deg);
}

/* 속성 섹션 */
.property-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #3e3e3e;
}

.property-section h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #fff;
}

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

.property-group label {
    font-size: 13px;
    color: #ccc;
    min-width: 80px;
}

.property-group input[type="number"]:not([style*="width"]),
.property-group input[type="text"]:not([style*="width"]) {
    width: 100%;
}

.property-group input[type="range"] {
    flex: 1;
    max-width: 150px;
    margin-right: 8px;
}

.property-group span {
    font-size: 12px;
    color: #888;
}

.property-group label:has(input[type="checkbox"]) {
    min-width: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.box-add-section {
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #3e3e3e;
}

/* 박스 목록 */
.box-list-section {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #3e3e3e;
}

.collapsible-header {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    padding: 8px 0;
    margin: 0;
    font-size: 14px;
}

.collapsible-header:hover {
    background: #2a2a2a;
    border-radius: 4px;
    padding: 8px 4px;
}

.collapse-icon {
    font-size: 12px;
    transition: transform 0.2s ease;
    display: inline-block;
}

.collapse-icon.collapsed {
    transform: rotate(-90deg);
}

.collapsible-header {
    cursor: pointer;
    user-select: none;
}

.collapsible-header:hover {
    opacity: 0.8;
}

.box-list-content {
    margin-top: 10px;
}

.box-list-item {
    background: #2a2a2a;
    border: 1px solid #3e3e3e;
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.box-list-item:hover {
    background: #333;
    border-color: #007acc;
}

.box-list-item.active {
    background: #1a3a52;
    border-color: #007acc;
}

.box-list-item-id {
    font-weight: 600;
    color: #fff;
    font-family: 'Courier New', monospace;
}

.box-list-item-info {
    font-size: 11px;
    color: #888;
    margin-top: 4px;
}

.property-section-content {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.property-section-content.collapsed {
    max-height: 0 !important;
    padding: 0;
    margin: 0;
}

.no-selection {
    text-align: center;
    padding: 20px;
    color: #888;
}

.no-selection p {
    margin: 0;
}

/* 텍스처 컨트롤 */
.texture-controls {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 12px;
}

.texture-info {
    font-size: 12px;
}

.texture-info p {
    margin-bottom: 8px;
    color: #ccc;
}

.texture-preview {
    width: 100%;
    height: 150px;
    background: #1e1e1e;
    border: 1px solid #3e3e3e;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.texture-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.texture-preview:empty::after {
    content: '텍스처 없음';
    color: #666;
    font-size: 12px;
}

/* 탭 시스템 */
.panel-tabs {
    display: flex;
    gap: 5px;
    flex: 1;
}

.panel-tab {
    background: #1e1e1e;
    border: none;
    color: #ccc;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.panel-tab:hover {
    background: #2a2a2a;
    color: #fff;
}

.panel-tab.active {
    background: #252525;
    color: #fff;
    border-bottom: 2px solid #007acc;
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* CSS Editor 스타일 */
.css-editor-container,
.effect-editor-container {
    padding: 15px;
}

.css-editor-container h3,
.effect-editor-container h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007acc;
}

/* CSS Editor - 선택된 Box 정보 (최상단) */
.css-selected-box-info {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: 2px solid #00d2ff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.css-box-info-header {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 600;
}

.css-box-info-id {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    font-family: 'Courier New', monospace;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    word-break: break-all;
}

.css-box-info-count {
    font-size: 12px;
    color: #00ff88;
    font-weight: 500;
}

.css-editor-container h4,
.effect-editor-container h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #fff;
}

.css-category-section,
.css-preset-section,
.css-editor-section,
.css-effects-section,
.css-animation-section,
.effect-load-section,
.effect-info-section,
.effect-preview-section,
.effect-apply-section,
.effect-settings-section,
.effect-library-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #3e3e3e;
}

.css-category-select,
.css-effect-select {
    width: 100%;
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 4px;
    color: white;
    padding: 8px 10px;
    font-size: 13px;
    cursor: pointer;
}

.preset-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.css-code-editor {
    width: 100%;
    min-height: 200px;
    background: #1e1e1e;
    border: 1px solid #444;
    border-radius: 4px;
    color: #d4d4d4;
    padding: 12px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    margin-bottom: 10px;
}

.css-code-editor:focus {
    outline: none;
    border-color: #007acc;
}

.css-editor-controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* CSS Property Groups */
.css-property-group {
    margin-bottom: 10px;
    padding: 10px;
    background: #2a2a2a;
    border-radius: 4px;
    border: 1px solid #3e3e3e;
}

.css-property-group h5 {
    font-size: 12px;
    font-weight: 600;
    color: #00d2ff;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.property-section-content {
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.property-section-content.collapsed {
    max-height: 0 !important;
    padding: 0;
    margin: 0;
}

.css-property-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

.css-property-item label {
    min-width: 150px;
    max-width: 150px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ccc;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    flex-shrink: 0;
}

.css-property-item .css-prop-enable {
    width: 14px;
    height: 14px;
    margin: 0;
}

.css-property-item .css-prop-value {
    flex: 1;
    background: #1e1e1e;
    border: 1px solid #444;
    border-radius: 3px;
    color: white;
    padding: 5px 10px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
}

.css-property-item .css-prop-value:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.css-property-item .css-prop-value:focus {
    border-color: #007acc;
    outline: none;
}

/* Effect Editor 스타일 */
.effect-info-display {
    background: #1e1e1e;
    border: 1px solid #3e3e3e;
    border-radius: 4px;
    padding: 15px;
    font-size: 12px;
    color: #ccc;
}

.effect-info-display p {
    margin: 5px 0;
}

.effect-info-display strong {
    color: #fff;
    font-weight: 600;
}

.effect-preview-canvas {
    width: 100%;
    height: 200px;
    background: #1e1e1e;
    border: 1px solid #3e3e3e;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 10px;
}

.effect-preview-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}

.effect-library-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.effect-library-item {
    background: #2a2a2a;
    border: 1px solid #3e3e3e;
    border-radius: 4px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.effect-library-item:hover {
    background: #333;
    border-color: #007acc;
}

.effect-library-item.selected {
    background: #1a3a52;
    border-color: #007acc;
}

.effect-library-item-name {
    font-weight: 600;
    color: #fff;
    font-size: 13px;
    margin-bottom: 4px;
}

.effect-library-item-path {
    font-size: 11px;
    color: #888;
    font-family: 'Courier New', monospace;
}

/* Sound Editor 스타일 */
.sound-editor-container {
    padding: 15px;
}

.sound-editor-container h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007acc;
}

/* 선택된 Box 정보 (최상단) */
.sound-selected-box-info {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: 2px solid #00d2ff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.sound-box-info-header {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 600;
}

.sound-box-info-id {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    font-family: 'Courier New', monospace;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    word-break: break-all;
}

.sound-box-info-count {
    font-size: 12px;
    color: #00ff88;
    font-weight: 500;
}

.sound-editor-container h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #fff;
}

.sound-load-section,
.sound-info-section,
.sound-preview-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #3e3e3e;
}

.sound-events-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #3e3e3e;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sound-events-section h4 {
    margin-bottom: 5px;
}

.sound-library-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #3e3e3e;
}

.sound-drop-zone {
    background: #1e1e1e;
    border: 2px dashed #555;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sound-drop-zone:hover {
    border-color: #007acc;
    background: #252525;
}

.sound-drop-zone.drag-over {
    border-color: #00d2ff;
    background: #2a3a4a;
    transform: scale(1.02);
}

.drop-zone-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.drop-zone-text {
    font-size: 13px;
    color: #fff;
    font-weight: 500;
    margin-bottom: 5px;
}

.drop-zone-hint {
    font-size: 11px;
    color: #888;
}

.sound-info-display {
    background: #1e1e1e;
    border: 1px solid #3e3e3e;
    border-radius: 4px;
    padding: 15px;
    font-size: 12px;
    color: #ccc;
}

.sound-info-display p {
    margin: 5px 0;
}

.sound-info-display strong {
    color: #fff;
    font-weight: 600;
}

.sound-preview-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sound-preview-controls > button {
    flex: 1;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #2a2a2a;
    border-radius: 4px;
}

.volume-control label {
    font-size: 12px;
    min-width: 60px;
}

.volume-control input[type="range"] {
    flex: 1;
}

.volume-control span {
    font-size: 12px;
    min-width: 40px;
    text-align: right;
}

.sound-event-item {
    background: #2a2a2a;
    border: 1px solid #3e3e3e;
    border-radius: 4px;
    padding: 6px 8px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sound-event-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: wrap;
}

.sound-event-header label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #fff;
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.sound-event-header strong {
    color: #00d2ff;
    font-size: 11px;
    font-weight: 600;
}

.sound-event-header > div {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
}

.sound-event-header .btn-sm {
    padding: 3px 8px;
    font-size: 10px;
    min-width: 40px;
    flex: 0 0 auto;
}

.sound-event-path {
    font-size: 9px;
    color: #888;
    font-family: 'Courier New', monospace;
    padding: 3px 6px;
    background: #1e1e1e;
    border-radius: 3px;
    border: 1px solid #3e3e3e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sound-library-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sound-library-item {
    background: #2a2a2a;
    border: 1px solid #3e3e3e;
    border-radius: 4px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sound-library-item:hover {
    background: #333;
    border-color: #007acc;
}

.sound-library-item.selected {
    background: #1a3a52;
    border-color: #007acc;
}

.sound-library-item-name {
    font-weight: 600;
    color: #fff;
    font-size: 13px;
    margin-bottom: 4px;
}

.sound-library-item-category {
    font-size: 10px;
    color: #00d2ff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.sound-library-item-path {
    font-size: 11px;
    color: #888;
    font-family: 'Courier New', monospace;
}

/* 슬라이드쇼 컨트롤 - Footer 고정 */
.slideshow-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    border-top: 2px solid #007acc;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    flex-shrink: 0;
}

.btn-play {
    width: 100%;
    padding: 10px 15px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    background: linear-gradient(135deg, #007acc, #00d2ff) !important;
    border: none !important;
    border-radius: 6px !important;
    color: white !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 3px 8px rgba(0, 122, 204, 0.4) !important;
}

.btn-play:hover {
    background: linear-gradient(135deg, #0056a3, #00a8cc) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 122, 204, 0.6) !important;
}

.btn-play:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(0, 122, 204, 0.4) !important;
}

/* 슬라이드쇼 모달 */
.slideshow-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.98);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.slideshow-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
}

.slideshow-canvas {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease;
}

.slideshow-page-container {
    position: relative;
    background: #ffffff;
    box-shadow: 0 0 50px rgba(0, 210, 255, 0.5);
    border: 2px solid rgba(0, 210, 255, 0.3);
    
    /* 9-slice 렌더링 최적화 */
    image-rendering: auto;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: grayscale;
    transform-style: preserve-3d;
}

.slideshow-zoom-controls {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 10001;
}

.slideshow-zoom-select {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(0, 210, 255, 0.5);
    border-radius: 25px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
}

.slideshow-zoom-select:hover {
    border-color: #00d2ff;
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.4);
}

.slideshow-zoom-select:focus {
    outline: none;
    border-color: #00ff88;
}

.slideshow-zoom-select option {
    background: #1e1e1e;
    color: white;
}

.slideshow-controls-overlay {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 10001;
}

.slideshow-nav-btn {
    background: linear-gradient(135deg, #007acc, #00d2ff);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 122, 204, 0.4);
}

.slideshow-nav-btn:hover {
    background: linear-gradient(135deg, #0056a3, #00a8cc);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 204, 0.6);
}

.slideshow-nav-btn:active {
    transform: translateY(0);
}

.slideshow-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.slideshow-page-info {
    color: white;
    font-size: 16px;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}

.slideshow-close-btn {
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.slideshow-close-btn:hover {
    background: rgba(220, 53, 69, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.6);
}

/* CSS 애니메이션 정의 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(20px); opacity: 0; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes scale {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* 반응형 조정 */
@media (max-width: 1400px) {
    .left-panel {
        width: 240px;
        min-width: 240px;
    }
    
    .right-panel {
        width: 360px;
        min-width: 360px;
    }
    
    .panel-tabs {
        flex-wrap: wrap;
    }
    
    .panel-tab {
        font-size: 11px;
        padding: 6px 10px;
    }
}

