/* 이펙트 에디터 메인 컨테이너 */
.effect-editor-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #1e1e1e;
    overflow: hidden; /* 전체 컨테이너 스크롤 방지 */
}

/* 헤더 스타일 */
.editor-header {
    background: #2d2d2d;
    padding: 3px 0px;
    border-bottom: 2px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.editor-header h1 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
}

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

/* 파티클 전용 컨트롤 */
.particle-controls {
    display: flex;
    gap: 8px;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid #555;
}

.particle-controls .btn {
    font-size: 13px;
    padding: 8px 16px;
}

/* 헤더에 있는 파티클 컨트롤만 가로 정렬 */
.header-controls .particle-controls {
    flex-direction: row;
}

.header-controls .particle-controls .btn {
    font-size: 11px;
    padding: 6px 12px;
}

/* 메인 에디터 영역 */
.editor-main {
    display: flex;
    flex-shrink: 0; /* 고정 높이 유지 */
    height: calc(100vh - 60px - 160px); /* 헤더(60px) + 푸터(160px) 높이 제외 */
    max-height: calc(100vh - 60px - 160px);
    overflow: visible; /* 패널 스크롤을 위해 visible로 변경 */
}

/* 패널 공통 스타일 */
.editor-panel {
    background: #2d2d2d;
    border-right: 1px solid #444;
    overflow-y: auto;
}

.left-panel {
    width: 380px;
    flex-shrink: 0;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    height: calc(100vh - 60px - 160px); /* 헤더(60px) + 푸터(160px) 높이 제외 */
    max-height: calc(100vh - 60px - 160px);
    min-width: 280px;
    max-width: 500px;
    border-right: 2px solid #555;
    box-sizing: border-box;
}

.left-panel::after {
    content: '';
    position: absolute;
    top: 0;
    right: -3px;
    width: 6px;
    height: 100%;
    cursor: ew-resize;
    background: transparent;
    z-index: 1;
    pointer-events: none;
    transition: background-color 0.2s ease;
}

.left-panel:hover::after {
    background: rgba(0, 122, 204, 0.3);
}

.center-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #1a1a1a;
}

.right-panel {
    width: 450px;
    flex-shrink: 0;
    position: relative;
    overflow-y: auto; /* 세로 스크롤만 허용 */
    overflow-x: hidden; /* 가로 스크롤 방지 */
    min-width: 350px;
    max-width: 600px;
    border-left: 2px solid #555;
    height: calc(100vh - 60px - 160px); /* 헤더(60px)와 푸터(160px)를 제외한 전체 높이 */
}

.right-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: -3px;
    width: 6px;
    height: 100%;
    cursor: ew-resize;
    background: transparent;
    z-index: 1;
    pointer-events: none;
    transition: background-color 0.2s ease;
}

.right-panel:hover::before {
    background: rgba(0, 122, 204, 0.3);
}

/* 패널 섹션 스타일 */
.panel-section {
    padding: 15px; /* 패딩 줄임 */
    border-bottom: 1px solid #444;
    flex-shrink: 0; /* 섹션이 압축되지 않도록 설정 */
}

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

.panel-section h3 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 속성 그룹 스타일 */
.property-group {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #1a1a1a;
    border-radius: 6px;
    border: 1px solid #333;
    flex-wrap: wrap;
}

.property-group label {
    min-width: 70px;
    font-size: 13px;
    color: #cccccc;
    font-weight: 500;
    flex-shrink: 0;
}

.property-group input[type="range"] {
    flex: 1;
    margin: 0 6px;
    min-width: 80px;
    max-width: 120px;
}

.property-group span {
    min-width: 55px;
    text-align: center;
    font-size: 10px;
    color: #00ff88;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    background: #1a1a1a;
    padding: 3px 6px;
    border-radius: 4px;
    border: 1px solid #333;
    flex-shrink: 0;
    letter-spacing: 0.5px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.property-group span:hover {
    background: #2a2a2a;
    border-color: #007acc;
    color: #ffffff;
}

/* 속성값 직접 입력 필드 */
.property-value-input {
    min-width: 55px;
    text-align: center;
    font-size: 10px;
    color: #ffffff;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    background: #007acc;
    padding: 3px 6px;
    border-radius: 4px;
    border: 2px solid #005a9e;
    flex-shrink: 0;
    letter-spacing: 0.5px;
    outline: none;
}

.property-value-input:focus {
    background: #005a9e;
    border-color: #00ff88;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
}

.reset-btn {
    min-width: 45px;
    padding: 4px 8px;
    font-size: 9px;
    background: #555;
    color: #fff;
    border: 1px solid #777;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-weight: bold;
    text-transform: uppercase;
}

.reset-btn:hover {
    background: #666;
    border-color: #888;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.reset-btn:active {
    background: #444;
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 크기 선택 스타일 */
.size-presets {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.size-option {
    background: #1a1a1a;
    border: 2px solid #444;
    border-radius: 6px;
    padding: 8px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    font-weight: 500;
}

.size-option:hover {
    border-color: #007acc;
    background: #1f1f1f;
}

.size-option.selected {
    border-color: #007acc;
    background: #2a3a4a;
    color: #007acc;
    box-shadow: 0 0 8px rgba(0, 122, 204, 0.3);
}

.custom-size {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
    font-size: 12px;
}

.custom-size label {
    color: #cccccc;
    min-width: 50px;
}

.custom-size input {
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    color: white;
    padding: 4px 6px;
    width: 60px;
    font-size: 11px;
}

.custom-size span {
    color: #888;
}

/* 컬러 코드 입력 섹션 */
.color-code-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 6px;
}

.color-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.color-input-group label {
    color: #cccccc;
    font-size: 12px;
    font-weight: 500;
    min-width: 70px;
}

#colorPicker {
    width: 40px;
    height: 30px;
    border: 1px solid #666;
    border-radius: 4px;
    background: none;
    cursor: pointer;
    padding: 0;
}

#colorCode {
    background: #2d2d2d;
    border: 1px solid #555;
    border-radius: 4px;
    color: #ffffff;
    padding: 6px 8px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    width: 80px;
    text-transform: uppercase;
}

#colorCode:focus {
    border-color: #007acc;
    outline: none;
    box-shadow: 0 0 6px rgba(0, 122, 204, 0.3);
}

.btn-apply {
    background: #28a745;
    color: white;
    border: 1px solid #1e7e34;
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-apply:hover {
    background: #218838;
    transform: translateY(-1px);
}

.color-preview {
    width: 100%;
    height: 30px;
    border: 1px solid #666;
    border-radius: 4px;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

.color-preview::after {
    content: attr(data-color);
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 9px;
    color: rgba(0, 0, 0, 0.7);
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.8);
}

/* 텍스처 업로드 영역 */
.texture-upload {
    margin-bottom: 15px;
}

.texture-preview {
    width: 100%;
    height: 120px;
    background: #1a1a1a;
    border: 2px dashed #555;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 14px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    pointer-events: auto; /* 드래그 앤 드롭 이벤트 확실히 허용 */
}

.texture-preview:hover {
    border-color: #007acc;
    background: #1f1f1f;
}

.texture-preview.drag-over {
    border-color: #007acc;
    background: #1a2a3a;
    border-style: solid;
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(0, 122, 204, 0.3);
}

.texture-preview::before {
    content: '📁 이미지를 여기에 드래그하거나 클릭하여 선택하세요';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #888;
    font-size: 14px;
    pointer-events: none; /* 이건 괜찮음 - ::before 가상 요소는 이벤트를 차단하지 않아야 함 */
    transition: opacity 0.3s ease;
}

.texture-preview.has-texture::before {
    opacity: 0;
}

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

/* 캔버스 컨테이너 */
.canvas-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    border: 1px solid #444;
    margin: 20px;
    border-radius: 8px;
    overflow: hidden; /* zoom 시 스크롤 방지 */
}

#effectCanvas {
    background: #2d2d2d;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease; /* zoom 애니메이션 */
    transform-origin: center center; /* 중앙 기준 zoom */
}

.canvas-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    color: white;
}

.frame-info {
    display: flex;
    gap: 5px;
}

/* Zoom 컨트롤 스타일 */
.canvas-zoom-controls {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.8);
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #007acc;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 20px;
}

.zoom-control-group {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

/* 인라인 Transform 버튼들 */
.transform-buttons-inline {
    display: flex;
    gap: 8px;
    align-items: center;
}

.transform-btn-small {
    background: linear-gradient(135deg, #4a4a4a, #3a3a3a);
    border: 1px solid #666;
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    position: relative;
    overflow: hidden;
}

.transform-btn-small::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.3s ease;
}

.transform-btn-small:hover::before {
    left: 100%;
}

.transform-btn-small:hover {
    background: linear-gradient(135deg, #5a5a5a, #4a4a4a);
    border-color: #007acc;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 122, 204, 0.3);
}

.transform-btn-small.active {
    background: linear-gradient(135deg, #007acc, #005a9e);
    border-color: #00aaff;
    color: white;
    box-shadow: 0 0 10px rgba(0, 122, 204, 0.5);
    transform: translateY(-1px);
}

.transform-btn-small.active .transform-icon-small {
    animation: transformPulseSmall 1.5s ease-in-out infinite;
}

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

.transform-icon-small {
    font-size: 14px;
    display: block;
    transition: transform 0.2s ease;
}

.zoom-control-group label {
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    min-width: auto;
}

.zoom-control-group input[type="range"] {
    width: 120px;
    height: 8px;
    background: #444;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    margin: 0 5px;
}

.zoom-control-group span {
    min-width: 40px;
    text-align: center;
    font-size: 11px;
    color: #00ff88;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    background: #1a1a1a;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #333;
}

.btn-reset-zoom {
    background: #666;
    color: white;
    border: 1px solid #888;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    font-weight: bold;
}

.btn-reset-zoom:hover {
    background: #777;
    border-color: #007acc;
    transform: translateY(-1px);
}

/* 캔버스 컨트롤 */
.canvas-controls {
    padding: 15px 20px;
    background: #2d2d2d;
    border-top: 1px solid #444;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-shrink: 0;
}


/* 타임라인 도구 */
.timeline-tools {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    padding: 8px;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 6px;
}

.tool-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #555;
    background: #2d2d2d;
    color: #cccccc;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 14px;
}

.tool-btn:hover {
    background: #3d3d3d;
    border-color: #007acc;
}

.tool-btn.active {
    background: #007acc;
    border-color: #005a9e;
    color: white;
}

.tool-btn span {
    pointer-events: none;
}

/* 타임라인 섹션 높이 제한 */
.timeline-section {
    max-height: none; /* 높이 제한 제거 */
    overflow: visible; /* 내용이 잘리지 않도록 변경 */
}

/* 타임라인 컨테이너 */
.timeline-container {
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 5px; /* 패널 여백만 최소로 */
    height: auto; /* 높이 원래대로 복구 */
    overflow: visible; /* 내용이 잘리지 않도록 */
}

/* 선택된 키프레임 원 애니메이션 */
.selected-keyframe {
    animation: keyframeGlow 2s ease-in-out infinite;
}

@keyframes keyframeGlow {
    0% {
        box-shadow: 0 0 8px rgba(255, 68, 68, 0.6);
        filter: brightness(1);
    }
    50% {
        box-shadow: 0 0 15px rgba(255, 68, 68, 0.9), 0 0 25px rgba(255, 68, 68, 0.4);
        filter: brightness(1.2);
    }
    100% {
        box-shadow: 0 0 8px rgba(255, 68, 68, 0.6);
        filter: brightness(1);
    }
}

#timelineCanvas {
    background: #2d2d2d;
    border-radius: 4px;
    height: 60px; /* 고정 높이 */
    width: 100%; /* 컨테이너에 맞춰 유연하게 */
}

/* 레이어 컨트롤 */
.layer-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.layer-controls .btn {
    flex: 1;
    padding: 6px 12px;
    font-size: 12px;
}

/* 레이어 리스트 */
.layer-list {
    max-height: 150px;
    overflow-y: auto;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 15px;
}

.layer-item {
    background: #3d3d3d;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.layer-item:hover {
    background: #4d4d4d;
    border-color: #007acc;
}

.layer-item.active {
    background: #007acc;
    border-color: #005a9e;
    color: white;
}

.layer-item.selected {
    border-color: #ff4444;
    border-width: 2px;
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.3);
}

/* 순서 바꾸기 모드 스타일 */
.layer-list.reorder-mode .layer-item {
    cursor: grab;
    border-style: dashed;
    transition: all 0.2s ease;
}

.layer-list.reorder-mode .layer-item:hover {
    background: #ff9500;
    color: #2d2d2d;
    border-color: #ff7700;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 149, 0, 0.4);
}

.layer-list.reorder-mode .layer-item.dragging {
    cursor: grabbing;
    opacity: 0.8;
    transform: rotate(2deg) scale(1.05);
    z-index: 1000;
}

.layer-list.reorder-mode .layer-item.drop-target {
    background: rgba(255, 149, 0, 0.2);
    border-color: #ff9500;
    border-style: solid;
}

.layer-visibility {
    width: 16px;
    height: 16px;
    border: 1px solid #666;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.layer-visibility.visible {
    background: #28a745;
    color: white;
}

.layer-visibility.hidden {
    background: #dc3545;
    color: white;
}

.layer-info {
    width: 20px;
    height: 20px;
    border: 1px solid #666;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    background: #007acc;
    color: white;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.layer-info:hover {
    background: #005a9e;
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.layer-name {
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.layer-details {
    font-size: 11px;
    color: #aaa;
}

/* 키프레임 리스트 */
.keyframe-list {
    max-height: 150px; /* 높이 줄임 */
    overflow-y: auto;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
}

.keyframe-item {
    background: #3d3d3d;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.keyframe-item:last-child {
    margin-bottom: 0;
}

.keyframe-item:hover {
    background: #4d4d4d;
    border-color: #00bfff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 191, 255, 0.3);
}

.keyframe-item.selected {
    background: #007acc;
    border-color: #005a9e;
    color: white;
    box-shadow: 0 0 10px rgba(0, 122, 204, 0.5);
    transform: translateY(-1px);
    animation: keyframePulse 2s ease-in-out infinite;
}

@keyframes keyframePulse {
    0% {
        box-shadow: 0 0 10px rgba(0, 122, 204, 0.5);
        transform: translateY(-1px) scale(1);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 122, 204, 0.8), 0 0 30px rgba(0, 122, 204, 0.4);
        transform: translateY(-1px) scale(1.02);
    }
    100% {
        box-shadow: 0 0 10px rgba(0, 122, 204, 0.5);
        transform: translateY(-1px) scale(1);
    }
}

.keyframe-item.selected .keyframe-frame {
    color: white;
    font-weight: bold;
}

.keyframe-frame {
    font-weight: bold;
    color: #007acc;
}

.keyframe-delete {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.keyframe-delete:hover {
    background: #c82333;
    transform: scale(1.05);
}

/* 이펙트 정보 */
.effect-info {
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 15px;
}

.effect-info p {
    margin-bottom: 8px;
    font-size: 14px;
}

.effect-info p:last-child {
    margin-bottom: 0;
}

.effect-info strong {
    color: #007acc;
}

/* 하단 Export 설정 */
.editor-footer {
    background: linear-gradient(to bottom, #3d3d3d, #2d2d2d); /* 그라데이션 배경 */
    border-top: 2px solid #007acc; /* 파란색 강조 테두리 */
    padding: 12px 15px; /* 패딩 조정 */
    flex-shrink: 0;
    display: flex;
    gap: 20px; /* 간격 줄임 */
    align-items: flex-start;
    min-height: 120px; /* 최소 높이 증가 */
    position: relative;
    z-index: 100;
    box-shadow: 0 -2px 8px rgba(0, 122, 204, 0.2), 0 -1px 4px rgba(0, 0, 0, 0.4);
    border-left: 2px solid #007acc;
    border-right: 2px solid #007acc;
}

.export-settings {
    flex: 1;
    min-width: 0;
}

.export-settings h3 {
    color: #ffc107; /* 노란색으로 강조 */
    font-size: 14px; /* 폰트 크기 감소 */
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    font-weight: bold;
}

.animation-settings {
    flex: 1;
    min-width: 0;
}

.animation-settings h3 {
    color: #17a2b8; /* 파란색으로 강조 */
    font-size: 14px; /* 폰트 크기 감소 */
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    font-weight: bold;
}

.export-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    justify-content: flex-start; /* 왼쪽 정렬 */
}

.export-options label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #cccccc;
    padding: 4px 8px;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.export-options label:hover {
    background: #2a2a2a;
    border-color: #007acc;
}

.export-options input[type="radio"]:checked + span {
    color: #007acc;
    font-weight: bold;
}

.export-options input[type="radio"] {
    margin: 0;
}

.export-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #cccccc;
}

.export-options input[type="radio"] {
    margin: 0;
}

.export-options input[type="number"] {
    width: 60px;
}

/* 애니메이션 설정 스타일 */
.animation-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.animation-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.animation-group label {
    color: #cccccc;
    font-size: 12px;
    font-weight: 500;
    min-width: 70px;
}

.animation-group input[type="number"] {
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    color: white;
    padding: 4px 6px;
    width: 60px;
    font-size: 12px;
}

.animation-group input[type="number"]:focus {
    border-color: #007acc;
    outline: none;
    box-shadow: 0 0 6px rgba(0, 122, 204, 0.3);
}

/* 반응형 디자인 */
@media (max-width: 1400px) {
    .left-panel {
        width: 320px;
        min-width: 250px;
        height: calc(100vh - 80px - 200px); /* 푸터 높이 조정하여 올림 */
        max-height: calc(100vh - 80px - 200px);
    }
    
    .right-panel {
        width: 400px;
        min-width: 300px;
    }
    
    .editor-main {
        height: calc(100vh - 80px - 200px); /* 푸터 높이 조정하여 올림 */
        max-height: calc(100vh - 80px - 200px);
    }
    
    .editor-footer {
        padding: 20px; /* 패딩 유지 */
        min-height: 180px; /* 최소 높이 유지 */
    }
}

@media (max-width: 1200px) {
    .left-panel {
        width: 280px;
        min-width: 220px;
        height: calc(100vh - 80px - 180px); /* 푸터 공간 조정하여 올림 */
        max-height: calc(100vh - 80px - 180px);
    }
    
    .right-panel {
        width: 350px;
        min-width: 280px;
    }
    
    .editor-main {
        height: calc(100vh - 80px - 180px); /* 푸터 공간 조정하여 올림 */
        max-height: calc(100vh - 80px - 180px);
    }
    
    .editor-footer {
        padding: 15px; /* 패딩 유지 */
        min-height: 160px; /* 최소 높이 유지 */
        flex-direction: column; /* 세로 배치로 변경 */
        gap: 15px;
    }
    
    .panel-section {
        padding: 15px;
    }
    
    .property-group {
        gap: 6px;
        padding: 8px;
    }
    
    .property-group label {
        min-width: 60px;
        font-size: 12px;
    }
    
    .property-group input[type="range"] {
        min-width: 60px;
        max-width: 100px;
    }
}

/* 스크롤바 커스터마이징 */
.editor-panel::-webkit-scrollbar {
    width: 6px;
}

.editor-panel::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.editor-panel::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}

.editor-panel::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* 모달 스타일 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow-y: auto; /* 스크롤 허용 */
}

/* 작은 화면 대응 */
@media (max-height: 700px) {
    .modal {
        align-items: flex-start;
        padding-top: 40px; /* 상단 여백 증가 */
        padding-bottom: 40px; /* 하단 여백도 추가 */
    }
    
    .modal-content {
        max-height: 85vh !important; /* 높이를 약간 줄여서 여백 확보 */
        margin-top: 0px;
        margin-bottom: 0px;
    }
}

/* 일반 화면에서도 기본 여백 추가 */
@media (min-height: 701px) {
    .modal {
        padding-top: 20px;
        padding-bottom: 20px;
    }
}

.modal-content {
    background: #2d2d2d;
    border: 2px solid #444;
    border-radius: 8px;
    padding: 25px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-content h3 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 18px;
}

.modal-content p {
    color: #cccccc;
    margin-bottom: 10px;
    line-height: 1.5;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.modal-buttons .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-buttons .btn-primary {
    background: #4a90e2;
    color: white;
}

.modal-buttons .btn-primary:hover {
    background: #357abd;
}

.modal-buttons .btn-secondary {
    background: #666;
    color: white;
}

.modal-buttons .btn-secondary:hover {
    background: #555;
}

/* 아웃라인 버튼 스타일 */
.btn-outline {
    background: #2d2d2d;
    border: 1px solid #00ff00;
    color: #00ff00;
}

.btn-outline:hover {
    background: #00ff00;
    color: #2d2d2d;
}

.btn-outline.active {
    background: #00ff00;
    color: #2d2d2d;
}

/* 레이어 순서 바꾸기 버튼 스타일 */
.btn-reorder {
    background: #2d2d2d;
    border: 1px solid #ff9500;
    color: #ff9500;
    font-size: 11px;
    padding: 6px 10px;
}

.btn-reorder:hover {
    background: #ff9500;
    color: #2d2d2d;
}

.btn-reorder.active {
    background: #ff9500;
    color: #2d2d2d;
    box-shadow: 0 0 10px rgba(255, 149, 0, 0.4);
}

/* 키프레임 정보 버튼 스타일 */
.keyframe-info {
    background: #007acc;
    border: 1px solid #005a9e;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
    margin-right: 5px;
}

.keyframe-info:hover {
    background: #005a9e;
}

/* 키프레임 모달 스타일 */
.keyframe-modal {
    max-width: 600px;
    width: 90%;
}

.keyframe-info-content {
    text-align: left;
}

.info-section {
    margin-bottom: 20px;
}

.info-section h4 {
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 16px;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
}

.info-section p {
    color: #cccccc;
    margin-bottom: 5px;
}

/* 이징 그리드 스타일 */
.easing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 10px;
}

.easing-option {
    background: #1a1a1a;
    border: 2px solid #444;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.easing-option:hover {
    border-color: #007acc;
    background: #1f1f1f;
}

.easing-option.selected {
    border-color: #007acc;
    background: #2a3a4a;
    box-shadow: 0 0 10px rgba(0, 122, 204, 0.3);
}

.easing-preview {
    width: 60px;
    height: 40px;
    margin: 0 auto 10px;
    border: 1px solid #666;
    border-radius: 4px;
    position: relative;
    background: #0a0a0a;
}

.easing-option span {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
}

/* 이징 커브 시각화 */
.linear-curve::before {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 2px;
    width: calc(100% - 4px);
    height: 2px;
    background: linear-gradient(to right, #007acc, #007acc);
}

.ease-in-curve::before {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 2px;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    background: radial-gradient(ellipse at bottom left, #007acc 20%, transparent 20%);
}

.ease-out-curve::before {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 2px;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    background: radial-gradient(ellipse at top right, #007acc 20%, transparent 20%);
}

.ease-in-out-curve::before {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 2px;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    background: 
        radial-gradient(ellipse at bottom left, #007acc 15%, transparent 15%),
        radial-gradient(ellipse at top right, #007acc 15%, transparent 15%);
}

.bounce-curve::before {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 2px;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    background: repeating-linear-gradient(
        to right,
        #007acc 0px,
        #007acc 2px,
        transparent 2px,
        transparent 8px
    );
}

.elastic-curve::before {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 2px;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    background: 
        linear-gradient(45deg, #007acc 25%, transparent 25%),
        linear-gradient(-45deg, #007acc 25%, transparent 25%);
    background-size: 8px 8px;
}

/* 토스트 메시지 스타일 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ff4444;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.success {
    background: #28a745;
}

.toast.warning {
    background: #ffc107;
    color: #212529;
}

/* 파티클 시스템 스타일 */
#particleSystemPanel {
    min-height: fit-content; /* 내용에 맞춰 높이 자동 조정 */
    overflow: visible; /* 내용이 잘리지 않도록 */
}

.collapsible-header {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    user-select: none;
}

.collapsible-header:hover {
    color: #007bff;
    background: rgba(0, 123, 255, 0.1);
    padding: 5px 10px;
    border-radius: 4px;
    margin: -5px -10px;
}

.collapse-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
    display: inline-block;
    width: 16px;
    text-align: center;
}

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

.particle-content,
.panel-content {
    overflow: visible; /* 내용이 잘리지 않도록 visible로 변경 */
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: none; /* 높이 제한 제거 */
    opacity: 1;
}

.particle-content.collapsed,
.panel-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
}

.particle-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.particle-file-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 8px;
}

.particle-file-controls .btn {
    font-size: 11px;
    padding: 6px 10px;
}

/* 파티클 모드 선택 스타일 */
.particle-mode-selection {
    margin: 12px 0;
    padding: 10px;
    background: rgba(0, 123, 255, 0.1);
    border: 1px solid rgba(0, 123, 255, 0.3);
    border-radius: 6px;
}

.particle-mode-selection h5 {
    color: #87ceeb;
    font-size: 12px;
    margin-bottom: 8px;
    font-weight: 500;
}

.mode-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mode-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #cccccc;
    font-size: 11px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.mode-options label:hover {
    background: rgba(0, 123, 255, 0.2);
}

.mode-options input[type="radio"] {
    width: 14px;
    height: 14px;
    accent-color: #007bff;
}

.mode-options input[type="radio"]:checked + span {
    color: #ffffff;
    font-weight: 500;
}

/* 재생 모드 선택 스타일 */
.particle-playback-selection {
    margin: 12px 0;
    padding: 10px;
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-radius: 6px;
}

.particle-playback-selection h5 {
    color: #28a745;
    font-size: 12px;
    margin-bottom: 8px;
    font-weight: 500;
}

.playback-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.playback-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #cccccc;
    font-size: 11px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.playback-options label:hover {
    background: rgba(40, 167, 69, 0.2);
}

.playback-options input[type="radio"] {
    width: 14px;
    height: 14px;
    accent-color: #28a745;
}

.playback-options input[type="radio"]:checked + span {
    color: #ffffff;
    font-weight: 500;
}

.once-settings {
    margin-top: 10px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.once-settings .property-group {
    margin: 0;
    padding: 6px;
    background: rgba(40, 167, 69, 0.1);
}

.btn-particle {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    border: none;
    color: white;
    transition: all 0.3s ease;
}

.btn-particle:hover {
    background: linear-gradient(135deg, #ee5a52, #dc4c42);
    transform: translateY(-1px);
}

.btn-particle.active {
    background: linear-gradient(135deg, #51cf66, #40c057);
}

.btn-particle.active:hover {
    background: linear-gradient(135deg, #40c057, #37b24d);
}

.particle-presets {
    margin-bottom: 15px;
}

.particle-presets h4 {
    color: #ffffff;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}

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

.preset-btn {
    background: linear-gradient(135deg, #495057, #6c757d);
    border: 1px solid #6c757d;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.preset-btn:hover {
    background: linear-gradient(135deg, #6c757d, #868e96);
    transform: translateY(-1px);
}

.preset-btn.active {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-color: #007bff;
}

.particle-settings {
    border-top: 1px solid #444;
    padding-top: 15px;
}

.particle-settings h4 {
    color: #ffffff;
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: 500;
}

.color-settings {
    margin: 15px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.color-settings h5 {
    color: #ffffff;
    font-size: 12px;
    margin-bottom: 8px;
    font-weight: 500;
}

.color-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.color-row label {
    color: #cccccc;
    font-size: 12px;
    flex: 1;
}

.color-row input[type="color"] {
    width: 40px;
    height: 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: none;
}

.color-row input[type="color"]::-webkit-color-swatch {
    border: 1px solid #666;
    border-radius: 3px;
}

.color-row input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
    border: none;
    border-radius: 3px;
}

.particle-settings select {
    background: #3d3d3d;
    border: 1px solid #666;
    color: #ffffff;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 12px;
    width: 100%;
    margin-top: 4px;
}

.particle-settings select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.particle-settings select option {
    background: #3d3d3d;
    color: #ffffff;
}

/* 파티클 시스템 정보 표시 */
.particle-info {
    background: rgba(0, 123, 255, 0.1);
    border: 1px solid rgba(0, 123, 255, 0.3);
    border-radius: 4px;
    padding: 8px 12px;
    margin-top: 10px;
    font-size: 11px;
    color: #87ceeb;
}

.particle-info .info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
}

.particle-info .info-item:last-child {
    margin-bottom: 0;
}

.particle-info .info-label {
    color: #b0b0b0;
}

.particle-info .info-value {
    color: #ffffff;
    font-weight: 500;
}

/* 파티클 텍스처 선택 스타일 */
.particle-texture-section {
    margin: 15px 0;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid #444;
}

.particle-texture-section h5 {
    color: #ffffff;
    font-size: 13px;
    margin-bottom: 10px;
    font-weight: 500;
}

.texture-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.texture-options select {
    background: #3d3d3d;
    border: 1px solid #666;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    width: 100%;
}

.texture-options select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.btn-upload {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-upload:hover {
    background: linear-gradient(135deg, #20c997, #17a2b8);
    transform: translateY(-1px);
}

.particle-texture-preview {
    margin-top: 10px;
    min-height: 60px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.particle-texture-preview img {
    max-width: 50px;
    max-height: 50px;
    object-fit: contain;
    image-rendering: pixelated;
}

.particle-texture-preview::before {
    content: '텍스처 미리보기';
    position: absolute;
    color: #666;
    font-size: 11px;
    pointer-events: none;
}

.particle-texture-preview.has-texture::before {
    display: none;
}

/* 성능 최적화 섹션 스타일 */
.performance-section {
    margin: 15px 0;
    padding: 12px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 6px;
}

.performance-section h5 {
    color: #ffc107;
    font-size: 13px;
    margin-bottom: 10px;
    font-weight: 500;
}

.performance-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.performance-controls label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #cccccc;
    font-size: 12px;
    cursor: pointer;
}

.performance-controls input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #ffc107;
}

.performance-controls .property-group {
    margin: 8px 0 0 0;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
}

/* 키프레임 삭제 확인 모달 스타일 */
.keyframe-delete-info {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 4px;
    padding: 12px;
    margin: 15px 0;
    font-size: 14px;
}

.keyframe-delete-info p {
    margin: 5px 0;
    color: #cccccc;
}

.keyframe-delete-info strong {
    color: #ffffff;
}

.keyframe-delete-info span {
    color: #ffc107;
    font-weight: 500;
}

.toast.info {
    background: #17a2b8;
}

/* 블렌딩 모드 그리드 스타일 */
.blending-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 10px;
}

.blending-option {
    background: #1a1a1a;
    border: 2px solid #444;
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.blending-option:hover {
    border-color: #007acc;
    background: #1f1f1f;
}

.blending-option.selected {
    border-color: #007acc;
    background: #2a3a4a;
    box-shadow: 0 0 10px rgba(0, 122, 204, 0.3);
}

.blend-preview {
    width: 50px;
    height: 30px;
    margin: 0 auto 8px;
    border: 1px solid #666;
    border-radius: 3px;
    position: relative;
    background: linear-gradient(45deg, #ff0000 50%, #0000ff 50%);
}

.blending-option span {
    color: #ffffff;
    font-size: 10px;
    font-weight: 500;
}

/* 블렌딩 모드별 미리보기 */
.normal-blend {
    background: linear-gradient(45deg, #ffffff 50%, #000000 50%);
}

.multiply-blend {
    background: linear-gradient(45deg, #800000 50%, #000000 50%);
}

.screen-blend {
    background: linear-gradient(45deg, #ffffff 50%, #8080ff 50%);
}

.overlay-blend {
    background: linear-gradient(45deg, #ff8080 50%, #404080 50%);
}

.soft-light-blend {
    background: linear-gradient(45deg, #ffb3b3 50%, #333366 50%);
}

.hard-light-blend {
    background: linear-gradient(45deg, #ff4d4d 50%, #1a1a66 50%);
}

.color-dodge-blend {
    background: linear-gradient(45deg, #ffcccc 50%, #6666ff 50%);
}

.color-burn-blend {
    background: linear-gradient(45deg, #660000 50%, #000033 50%);
}

.darken-blend {
    background: linear-gradient(45deg, #cc0000 50%, #000000 50%);
}

.lighten-blend {
    background: linear-gradient(45deg, #ffffff 50%, #4d4dff 50%);
}

.difference-blend {
    background: linear-gradient(45deg, #ffff00 50%, #ff00ff 50%);
}

.exclusion-blend {
    background: linear-gradient(45deg, #ffff80 50%, #ff80ff 50%);
}

/* 이미터 목록 스타일 */
.emitter-list-section {
    margin-top: 15px;
    margin-bottom: 20px;
    transition: height 0.3s ease;
}

.emitter-list {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 4px;
    background: #1a1a1a;
}

.emitter-item {
    transition: background-color 0.2s ease;
}

.emitter-item:hover {
    background: #555 !important;
}

.current-emitter-settings {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
    to {
        opacity: 1;
        max-height: 200px;
        padding-top: 10px;
        padding-bottom: 10px;
    }
}

/* 중복 제거됨 - 위의 .left-panel 스타일 사용 */

.left-panel::-webkit-scrollbar {
    width: 10px; /* 스크롤바를 더 넓게 */
}

.left-panel::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 5px;
    border: 1px solid #333;
}

.left-panel::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #666, #555); /* 그라데이션으로 더 보기 좋게 */
    border-radius: 5px;
    border: 1px solid #444;
}

.left-panel::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #777, #666);
    border-color: #007acc; /* 호버 시 파란색 테두리 */
}

/* 버튼 스타일 개선 */
.btn-small {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-small:hover {
    background: #0056b3;
}

/* 패널 섹션 간격 조정 */
.panel-section {
    margin-bottom: 10px; /* 마진 줄임 */
}

.panel-section:last-child {
    margin-bottom: 20px; /* 하단 여백 줄임 */
    padding-bottom: 15px; /* 패딩 줄임 */
}

/* 색상 설정 섹션 여백 */
.color-settings {
    margin: 15px 0;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 4px;
    background: #2a2a2a;
}

/* Export 설정 여백 확보 */
.export-section {
    margin-top: 20px;
    margin-bottom: 40px;
    padding: 15px;
}

/* ===================================================================
   스프라이트 애니메이션 에디터 스타일
   =================================================================== */

/* 프레임 아이템 */
.frame-item {
    display: flex;
    align-items: center;
    padding: 8px;
    margin-bottom: 8px;
    background: #2a2a2a;
    border: 2px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.frame-item:hover {
    background: #333;
    border-color: #555;
}

.frame-item.selected {
    border-color: #4CAF50;
    background: #2d4a2f;
}

.frame-item.dragging {
    opacity: 0.5;
}

.frame-item.drag-over {
    border-color: #2196F3;
}

.frame-item img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 3px;
    margin-right: 10px;
}

.frame-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.frame-number {
    font-weight: bold;
    color: #4CAF50;
}

.frame-size {
    font-size: 0.85em;
    color: #888;
}

.frame-buttons {
    display: flex;
    gap: 5px;
}

.btn-icon {
    width: 30px;
    height: 30px;
    padding: 0;
    background: #333;
    border: 1px solid #555;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.btn-icon:hover {
    background: #444;
    border-color: #777;
}

/* 타임라인 마커 */
.timeline-marker {
    position: absolute;
    width: 8px;
    height: 100%;
    background: #666;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s;
}

.timeline-marker:hover {
    background: #888;
}

.timeline-marker.active {
    background: #4CAF50;
    width: 12px;
    margin-left: -2px;
}

/* 재생 컨트롤 */
.playback-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

/* ===================================================================
   이펙트 목록 섹션 스타일
   =================================================================== */

#effectListSection {
    background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    margin-top: 10px;
}

#effectListSection h3 {
    color: #ff9500;
    border-bottom: 1px solid #3a3a3a;
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.effect-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 검색/필터 영역 */
.effect-list-search {
    display: flex;
    gap: 8px;
}

.effect-search-input {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 8px 12px;
    color: #ffffff;
    font-size: 12px;
    transition: all 0.2s ease;
}

.effect-search-input:focus {
    border-color: #ff9500;
    outline: none;
    box-shadow: 0 0 6px rgba(255, 149, 0, 0.3);
}

.effect-search-input::placeholder {
    color: #666;
}

.effect-category-filter {
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 8px 10px;
    color: #ffffff;
    font-size: 12px;
    cursor: pointer;
    min-width: 80px;
}

.effect-category-filter:focus {
    border-color: #ff9500;
    outline: none;
}

/* 이펙트 목록 컨텐츠 */
.effect-list-content {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    min-height: 120px;
    max-height: 250px;
    overflow-y: auto;
    padding: 8px;
}

.effect-list-content::-webkit-scrollbar {
    width: 6px;
}

.effect-list-content::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 3px;
}

.effect-list-content::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}

.effect-list-content::-webkit-scrollbar-thumb:hover {
    background: #ff9500;
}

/* 빈 상태 표시 */
.effect-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    color: #666;
    text-align: center;
    padding: 20px;
}

.effect-list-empty p {
    margin: 4px 0;
    font-size: 13px;
}

.effect-list-hint {
    font-size: 11px !important;
    color: #555 !important;
    margin-top: 8px !important;
}

/* 이펙트 아이템 */
.effect-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.effect-list-item:last-child {
    margin-bottom: 0;
}

.effect-list-item:hover {
    background: #333;
    border-color: #ff9500;
    transform: translateX(2px);
}

.effect-list-item.selected {
    background: rgba(255, 149, 0, 0.15);
    border-color: #ff9500;
    box-shadow: 0 0 8px rgba(255, 149, 0, 0.2);
}

.effect-list-item .effect-thumbnail {
    width: 36px;
    height: 36px;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    overflow: hidden;
}

.effect-list-item .effect-thumbnail img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.effect-list-item .effect-details {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.effect-list-item .effect-name {
    font-size: 12px;
    font-weight: 500;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.effect-list-item .effect-meta {
    font-size: 10px;
    color: #888;
    margin-top: 2px;
}

.effect-list-item .effect-category-badge {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 3px;
    background: #333;
    color: #aaa;
    flex-shrink: 0;
}

.effect-list-item .effect-category-badge.skill {
    background: rgba(0, 122, 204, 0.3);
    color: #4da6ff;
}

.effect-list-item .effect-category-badge.hit {
    background: rgba(220, 53, 69, 0.3);
    color: #ff6b7a;
}

.effect-list-item .effect-category-badge.buff {
    background: rgba(40, 167, 69, 0.3);
    color: #5fd67d;
}

.effect-list-item .effect-category-badge.environment {
    background: rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

.effect-list-item .effect-category-badge.ui {
    background: rgba(156, 39, 176, 0.3);
    color: #ce93d8;
}

/* 하단 컨트롤 */
.effect-list-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid #333;
}

.effect-list-controls .btn-sm {
    padding: 5px 10px;
    font-size: 11px;
}

.effect-list-count {
    font-size: 11px;
    color: #888;
    font-weight: 500;
}
