/* Global box-sizing reset */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Material Icons */
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');

/* 비활성화된 버튼 스타일 */
button:disabled,
input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* 다크 모드 기본 스타일 */
:root {
    --color-action: #c2291f;
    --color-action-hover: #a81f18;
    --color-action-light: rgba(194, 41, 31, 0.1);
    --color-secondary: #4a4a4a;
    --color-secondary-hover: #5a5a5a;
    --color-success: #4caf50;
    --color-warning: #ff9800;
    --color-error: #f44336;
    --color-info: #f44336;
    --color-bg-main: #1a1a1a;
    --color-bg-card: rgba(42, 42, 42, 0.8);
    --color-bg-input: rgba(58, 58, 58, 0.6);
    --color-text-main: #ffffff;
    --color-text-sub: #cccccc;
    --color-text-muted: #888888;
    --color-border: rgba(255, 255, 255, 0.1);
    --color-border-focus: rgba(194, 41, 31, 0.3);
    
    /* 타임라인 색상 - 다크 테마에 맞춤 */
    --timeline-bg: rgba(42, 42, 42, 0.8);
    --timeline-border: rgba(255, 255, 255, 0.1);
    --point-play: #4caf50;
    --point-pause: #f44336;
    --point-start: #2196f3;
    --segment-bg: rgba(76, 175, 80, 0.15);
    --segment-border: rgba(76, 175, 80, 0.4);
    
    /* 간격 */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    
    /* 그림자 */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.3);
    --shadow-action: 0 4px 12px rgba(194, 41, 31, 0.3);
    
    /* 애니메이션 */
    --transition: 0.2s ease;
    --transition-slow: 0.3s ease;
    
    /* 둥근 모서리 */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    /* 폰트 크기 */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    
    /* 둥근 모서리 */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    /* 그림자 */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.3);
    --shadow-action: 0 4px 12px rgba(194, 41, 31, 0.3);
    
    /* 전환 효과 */
    --transition: all 0.2s ease;
    --transition-fast: all 0.1s ease;
    --transition-slow: all 0.3s ease;
    
    /* 타임라인 색상 */
    --timeline-bg: rgba(42, 42, 42, 0.8);
    --timeline-border: rgba(255, 255, 255, 0.1);
    --point-play: #4CAF50;
    --point-pause: #FF5722;
    --point-start: #2196F3;
    --segment-bg: rgba(76, 175, 80, 0.3);
    --segment-border: rgba(76, 175, 80, 0.5);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, var(--color-bg-main) 0%, #2a2a2a 100%);
    color: var(--color-text-main);
    min-height: 100vh;
}

/* Studio Sidebar Styles */
.studio-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 120px;
    height: 100vh;
    background: rgba(15, 15, 15, 0.98);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1001;
    display: flex;
    flex-direction: column;
}

.studio-sidebar-tabs {
    list-style: none;
    padding: 0;
    margin: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.studio-sidebar-tab {
    margin: 0;
    flex: 1;
    display: flex;
}

.studio-sidebar-tab a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    width: 100%;
    height: 100%;
    color: var(--color-text-sub);
    text-decoration: none;
    transition: var(--transition-slow);
    padding: var(--space-sm);
    position: relative;
    box-sizing: border-box;
}

.studio-sidebar-tab:not(:first-child) {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.studio-sidebar-tab a:hover {
    background: var(--color-action-light);
    color: var(--color-text-main);
}

.studio-sidebar-tab a.active {
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(20px);
    color: var(--color-text-main);
}

.studio-sidebar-tab .icon {
    font-size: 1.5em;
    margin-bottom: var(--space-xs);
}

.studio-sidebar-tab .text {
    font-weight: 500;
    font-size: 1rem;
    text-align: center;
    line-height: 1.1;
}

.header {
    position: absolute;
    left: 120px;
    top: 0;
    right: 0;
    height: 70px;
    background: rgba(15, 15, 15, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 1rem;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.header-link {
    color: var(--color-text-main);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: var(--text-sm);
    font-weight: 500;
}

.header-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-main);
}

.react-central-btn {
    background: var(--color-bg-card);
    color: white;
    border: 1px solid #f44336;
    border-radius: var(--radius-md);
    padding: 0 12px;
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    box-sizing: border-box;
}

.react-central-btn:hover {
    background: #f44336;
    color: white;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.react-central-btn:active {
    transform: scale(0.98);
}

.header-logo {
    width: 24px;
    height: 24px;
    background-image: url('../whitered_mini.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.header h1 {
    color: var(--color-text-main);
    font-size: 1.4em;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.02em;
}

.header p {
    color: var(--color-text-muted);
    font-size: var(--text-base);
    margin: 0;
}

.tutorial-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--color-bg-card);
    color: white;
    border: 1px solid #ff9800;
    border-radius: var(--radius-md);
    padding: 0 12px;
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    height: 36px;
    box-sizing: border-box;
}

.tutorial-btn:hover {
    background: #ff9800;
    color: white;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.tutorial-btn:active {
    transform: scale(0.98);
}

.tutorial-text {
    font-size: var(--text-sm);
    font-weight: 600;
}

.tutorial-btn .material-icons {
    color: #ff9800;
}

.react-central-btn .material-icons {
    color: #f44336;
}

.beta-tag {
    background: var(--color-action);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 4px;
    margin-top: 5px;
    margin-right: 20px;
}

.header-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.home-btn {
    background: var(--color-bg-card);
    color: white;
    border: 1px solid var(--color-action);
    border-radius: var(--radius-md);
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
}

.home-btn:hover {
    background: var(--color-action);
    color: white;
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.home-btn:active {
    transform: scale(0.98);
}

/* Adjust main content for sidebar and header */
.container {
    margin-left: 120px;
    padding-top: 90px;
    min-height: 100vh;
}

/* Main Content 스타일 - Recorder와 통일 */
.main-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 var(--space-md);
}

/* Step Progress Section - Recorder와 동일 */
.step-progress {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-sm);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: var(--space-md);
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    transition: all var(--transition);
    overflow: hidden;
}

.step-progress.collapsed {
    max-height: 0;
    margin-bottom: 0;
    padding: 0 var(--space-md);
    opacity: 0;
}

.step-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.step-item.completed {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid var(--color-success);
}

.step-item.active {
    background: rgba(194, 41, 31, 0.1);
    border: 1px solid var(--color-action);
}

.step-item.locked {
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    opacity: 0.6;
}

.step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: var(--text-sm);
}

.step-item.completed .step-number {
    background: var(--color-success);
    color: white;
}

.step-item.active .step-number {
    background: var(--color-action);
    color: white;
}

.step-item.locked .step-number {
    background: var(--color-secondary);
    color: white;
}

.step-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.step-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-text-main);
    margin: 0;
}

.step-status {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.step-arrow {
    color: var(--color-action);
    font-weight: bold;
    font-size: var(--text-lg);
}

.btn-compact {
    padding: 6px 14px !important;
    font-size: var(--text-sm) !important;
    min-height: 28px !important;
    border-radius: var(--radius-sm) !important;
}

/* 현재 단계의 버튼 스타일 */
.step-item.active .btn-compact {
    background: var(--color-action) !important;
    border-color: var(--color-action) !important;
    color: white !important;
}

.step-item.active .btn-compact:hover {
    background: #d32f2f !important;
    border-color: #d32f2f !important;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .step-progress {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .step-arrow {
        transform: rotate(90deg);
    }
}

/* 개발 모드 정보 섹션 */
.dev-info-section {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-action);
}

.dev-info-section h3 {
    color: var(--color-text-main);
    font-size: var(--text-xl);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.dev-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.info-item label {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    font-weight: 500;
}

.info-item span {
    color: var(--color-text-main);
    font-size: var(--text-sm);
    font-family: 'Courier New', monospace;
    background: var(--color-bg-input);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    word-break: break-all;
}

/* 파일 섹션 - Recorder 카드 스타일 */
.file-section {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    backdrop-filter: blur(10px);
}

.file-section h3 {
    background: var(--color-action);
    color: white;
    padding: 10px 12px;
    font-weight: 500;
    font-size: var(--text-base);
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.file-section .file-controls {
    padding: var(--space-md);
}

.file-section .reaction-url-section {
    padding: 0 var(--space-md) var(--space-md) var(--space-md);
}

.file-controls {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.file-note {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    font-style: italic;
}

/* URL Modal 스타일 */
.compact-modal {
    max-width: 600px !important;
    width: 90% !important;
}

.advanced-modal {
    max-width: 1000px !important;
    width: 60% !important;
    min-height: 50vh;
    max-height: 75vh;
    margin: 5% auto;
}

/* 반응형 디자인 */
@media (max-width: 1400px) {
    .advanced-modal {
        max-width: 1000px !important;
        width: 60% !important;
        min-height: 50vh;
    }
    
    .table-container {
        /* max-height 제거 - flex로 여백 활용 */
        min-height: 200px;
    }
    
    .table-controls {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .controls-left,
    .controls-right {
        justify-content: center;
    }
    
    .form-actions {
        flex-direction: row;
        gap: 12px;
    }
    
    .form-actions .btn {
        flex: 1;
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .advanced-modal {
        width: 90% !important;
        max-width: 1000px !important;
        height: auto;
        max-height: 85vh;
        border-radius: 8px;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-header h2, .modal-header h3 {
        font-size: 1.25rem;
    }
    
    .table-container {
        /* max-height 제거 - flex로 여백 활용 */
        min-height: 150px;
    }
    
    #timestamps-table th,
    #timestamps-table td {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .table-input {
        font-size: 0.8rem;
        padding: 6px 8px;
    }
}

.help-description {
    margin-bottom: var(--space-md);
    padding: var(--space-sm);
    background: var(--color-bg-input);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--color-action);
}

.help-description p {
    margin: 0;
    color: var(--color-text-sub);
    font-size: var(--text-sm);
    line-height: 1.4;
}

.help-note {
    margin-top: var(--space-sm);
    padding: var(--space-xs);
    background: var(--color-bg-input);
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    font-size: var(--text-xs);
    font-style: italic;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.feature-list .feature-item {
    color: var(--color-text-sub);
    font-size: var(--text-sm);
}

.url-description {
    margin-bottom: var(--space-md);
    padding: var(--space-sm);
    background: var(--color-bg-input);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--color-action);
}

.url-description p {
    margin: 0 0 var(--space-xs) 0;
    color: var(--color-text-sub);
    font-size: var(--text-sm);
    line-height: 1.4;
}

.url-description p:last-child {
    margin-bottom: 0;
}

.skip-note {
    color: var(--color-text-muted) !important;
    font-size: var(--text-xs) !important;
    font-style: italic;
}

.url-input-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.input-label {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-text-main);
}

.url-input {
    padding: var(--space-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-main);
    color: var(--color-text-main);
    font-size: var(--text-base);
    transition: border-color var(--transition-fast);
    min-height: 44px;
}

.url-input:focus {
    outline: none;
    border-color: var(--color-action);
    box-shadow: 0 0 0 2px rgba(194, 41, 31, 0.1);
}

.url-input::placeholder {
    color: var(--color-text-muted);
    opacity: 0.5;
}

.url-info {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: var(--space-xs);
}

.current-url {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    font-style: italic;
}

.current-url.has-url {
    color: var(--color-success);
    font-weight: 500;
}



.history-controls {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.btn-small {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--text-sm);
    min-height: 36px;
}

/* Add TimeBlock 버튼 - 작고 눈에 안 띄게 */
#add-timestamp-row {
    padding: 3px 8px !important;
    font-size: 10px !important;
    min-height: 22px !important;
    font-weight: 400 !important;
    background: var(--color-bg-input) !important;
    color: white !important;
    border: 2px solid rgba(194, 41, 31, 0.5) !important;
    opacity: 0.7 !important;
    transition: all 0.2s ease !important;
}

#add-timestamp-row:hover {
    opacity: 1 !important;
    color: white !important;
    background: var(--color-secondary) !important;
    border-color: rgba(194, 41, 31, 0.8) !important;
}

.btn-warning {
    background: var(--color-warning);
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background: #e68900;
}

/* 타임라인 컨테이너 */
.timeline-container {
    background: var(--color-bg-input);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    position: relative;
    overflow-x: auto;
    overflow-y: hidden; /* 세로 스크롤 완전 제거 */
    height: 153px; /* 정확한 높이: padding(48) + ruler(35) + margins(10) + track(60) */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* 시간 눈금자 컨테이너 - 프로페셔널 스튜디오 */
#time-ruler-container {
    position: relative;
    height: 35px; /* 서브 눈금을 위한 더 큰 높이 */
    margin-bottom: 5px; /* 10px → 5px 줄임 */
    background-color: #1a1a1a; /* 어두운 배경 */
    border-radius: 4px 4px 0 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* 시간 눈금자 스타일 */
.time-ruler {
    position: relative;
    width: 100%;
    height: 100%;
}

/* 메인 눈금 마커 */
.time-marker.main-marker {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background-color: rgba(255,255,255,0.8);
    z-index: 10;
}

/* 서브 눈금 마커 */
.time-marker.sub-marker {
    position: absolute;
    top: 0;
    width: 1px;
    height: 60%;
    background-color: rgba(255,255,255,0.3);
    z-index: 5;
}

/* 메인 라벨 */
.time-label.main-label {
    position: absolute;
    top: 5px;
    color: rgba(255,255,255,0.9);
    font-size: 11px;
    font-weight: 600;
    transform: translateX(-50%);
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    z-index: 10; /* 그리드보다 위에 표시 */
}

/* 타임라인 스크롤바 스타일 */
.timeline-container::-webkit-scrollbar {
    height: 8px;
}

.timeline-container::-webkit-scrollbar-track {
    background: var(--color-bg-input);
    border-radius: 4px;
}

.timeline-container::-webkit-scrollbar-thumb {
    background: var(--color-secondary);
    border-radius: 4px;
}

.timeline-container::-webkit-scrollbar-thumb:hover {
    background: var(--color-action);
}

/* 타임라인 트랙 - 프로페셔널 스튜디오 시스템 */
.timeline-track {
    position: relative;
    width: 100%;
    height: 60px; /* 클립들을 위한 적절한 높이 */
    margin-top: 5px; /* 20px → 5px 줄임 */
    background-color: #2a2a2a; /* 기본 어두운 배경 */
    border-radius: 4px;
    overflow: visible; /* Playhead가 위로 올라갈 수 있도록 변경 */
    
    /* 수평 구분선 - 트랙 안정감과 깊이감 */
    background-image: 
        linear-gradient(to bottom, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 100% 33.33%, 100% 33.33%;
    background-position: 0 0, 0 33.33%;
}

/* 클립 컨테이너 */
.timeline-clips-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* 동적 격자선 시스템 - 줌 레벨별 그리드 */
.timeline-track.zoom-level-1 {
    background-image: 
        linear-gradient(to right, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 10px 100%, 100% 33.33%, 100% 33.33%;
}

.timeline-track.zoom-level-2 {
    background-image: 
        linear-gradient(to right, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 20px 100%, 100% 33.33%, 100% 33.33%;
}

.timeline-track.zoom-level-3 {
    background-image: 
        linear-gradient(to right, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 50px 100%, 100% 33.33%, 100% 33.33%;
}

/* 스냅-핏 클립 스타일 - 프로페셔널 스튜디오 */
.timeline-clip {
    position: absolute;
    height: 90%; /* 트랙에 꽉 차게 달라붙음 */
    top: 5%; /* 위아래 여백 최소화 */
    background: linear-gradient(to right, #f44336, #d32f2f); /* 빨간색 계열 */
    border-radius: 2px; /* 더 각진 직사각형 느낌 */
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.4), /* 하단 그림자로 입체감 */
        0 0 0 1px rgba(255,255,255,0.1); /* 미세한 테두리 */
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: white;
    font-size: 12px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    transition: all 0.15s ease;
    z-index: 10;
}

.timeline-clip:hover {
    filter: brightness(1.15);
    box-shadow: 
        0 3px 6px rgba(0,0,0,0.5),
        0 0 0 1px rgba(255,255,255,0.2);
    transform: translateY(-1px); /* 살짝 떠오르는 효과 */
}

.timeline-clip:active {
    cursor: grabbing;
    transform: translateY(0);
}

/* 선택된 클립 상태 */
.timeline-clip.selected {
    filter: brightness(1.2);
    box-shadow: 
        0 0 0 2px #4CAF50, /* 선택 테두리 */
        inset 0 0 20px rgba(76, 175, 80, 0.3), /* 내부 광선 효과 */
        0 3px 8px rgba(0,0,0,0.6);
    transform: translateY(-1px);
}

/* Playhead와 툴팁 스타일 - 드래그 가능 */
.playhead-indicator {
    position: absolute;
    top: -35px; /* 시간 눈금자까지 연장 */
    left: 0;
    width: 2px;
    height: calc(100% + 35px); /* 시간 눈금자 높이만큼 추가 */
    background-color: #EF5350;
    z-index: 50;
    pointer-events: all; /* 마우스 이벤트를 받을 수 있도록 변경 */
    cursor: ew-resize;   /* 좌우 이동 커서 모양 */
    box-shadow: 0 0 8px rgba(239, 83, 80, 0.8);
}

/* 상단 삼각형 포인터 */
.playhead-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: -6px; /* 삼각형 중심 맞춤 */
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 12px solid #EF5350;
    filter: drop-shadow(0 2px 4px rgba(239, 83, 80, 0.8));
}

/* Playhead를 잡기 쉽게 하기 위한 투명한 핸들 영역 */
.playhead-indicator::after {
    content: '';
    position: absolute;
    top: -35px; /* 시간 눈금자 영역부터 */
    left: -7px; /* 중심선 기준 좌우로 7px씩, 총 14px의 핸들 영역 */
    width: 14px;
    height: calc(100% + 35px); /* 전체 높이 */
}

.drag-tooltip {
    position: absolute;
    top: -25px; /* 시간 눈금자 바로 위 */
    left: 0;
    background-color: #212121;
    color: #FFFFFF;
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #424242;
    font-size: 12px;
    z-index: 100;
    pointer-events: none;
    transform: translateX(-50%);
}

/* 타임라인 콘텐츠 */
.timeline-content {
    position: relative;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
}



/* 구간 배경 */
.timeline-segment {
    position: absolute;
    /* top, height, transform은 JavaScript에서 동적 설정 */
    background: linear-gradient(135deg, 
        var(--segment-bg), 
        rgba(76, 175, 80, 0.2),
        rgba(76, 175, 80, 0.1)
    );
    border: 2px solid var(--segment-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    box-shadow: 
        0 3px 10px rgba(76, 175, 80, 0.2),
        0 1px 3px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    box-sizing: border-box;
    backdrop-filter: blur(2px);
    min-height: 8px;
}

.timeline-segment:hover {
    background: linear-gradient(135deg, 
        rgba(76, 175, 80, 0.5), 
        rgba(76, 175, 80, 0.3),
        rgba(76, 175, 80, 0.2)
    );
    border-color: rgba(76, 175, 80, 0.7);
    box-shadow: 
        0 5px 15px rgba(76, 175, 80, 0.3),
        0 2px 5px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.timeline-segment.selected {
    background: linear-gradient(135deg, 
        rgba(76, 175, 80, 0.6), 
        rgba(76, 175, 80, 0.4),
        rgba(76, 175, 80, 0.3)
    );
    border-color: rgba(255, 255, 255, 0.9);
    border-width: 2px;
    box-shadow: 
        0 6px 20px rgba(76, 175, 80, 0.4),
        0 3px 10px rgba(255, 255, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    outline: 3px solid rgba(255, 255, 255, 0.4);
    outline-offset: 3px;
    transform: translateY(-1px);
}

.segment-info {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
}

.segment-duration {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
    background: rgba(0, 0, 0, 0.7);
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

/* 점 (이벤트) */
.timeline-point {
    position: absolute;
    /* top, width, height는 JavaScript에서 동적 설정 */
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-sizing: border-box;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(4px);
    user-select: none;
    min-width: 24px;
    min-height: 24px;
}

/* 길게 누르기 효과 */
.timeline-point.long-pressing {
    transform: scale(0.9);
    opacity: 0.8;
    cursor: grabbing !important;
    transition: var(--transition-fast);
}

.timeline-segment.long-pressing {
    transform: scale(1.05);
    opacity: 0.8;
    cursor: grabbing !important;
    transition: var(--transition-fast);
}

.timeline-point:hover {
    transform: scale(1.15) translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 1);
}

.timeline-point.selected {
    transform: scale(1.1) translateY(-1px);
    box-shadow: 
        0 6px 20px rgba(255, 255, 255, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border-width: 3px;
    border-color: rgba(255, 255, 255, 1);
    outline: 3px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

.point-text {
    font-size: 9px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.8),
        0 0 4px rgba(0, 0, 0, 0.4);
    line-height: 1;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

/* 툴팁 */
.segment-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tooltip-line {
    white-space: nowrap;
    line-height: 1.4;
}

/* 점 타입별 색상 */
.point-play {
    background: var(--point-play);
}

.point-pause {
    background: var(--point-pause);
}

.point-start {
    background: var(--point-start);
}


.point-info {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    font-size: var(--text-xs);
    color: var(--color-text-main);
    white-space: nowrap;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
    z-index: 100;
}

.timeline-point:hover .point-info {
    opacity: 1;
    top: 25px;
}

.point-time {
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

/* 시간 표시 */
.time-display {
    text-align: center;
    padding: var(--space-sm);
    background: var(--color-bg-input);
    border-radius: var(--radius-sm);
    color: var(--color-text-sub);
    font-size: var(--text-sm);
}

/* 버튼 스타일 - Recorder 스타일 적용 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
    min-height: 44px;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    transition: all 0.2s ease;
}

.btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--color-action-light);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary {
    background: var(--color-action);
    color: white;
    border-color: var(--color-action);
}

.btn-primary:hover:not(:disabled) {
    background: var(--color-action-hover);
    box-shadow: var(--shadow-action);
}

/* Export Timestamp 버튼 - 강렬한 빨간색 */
#export-btn {
    background: linear-gradient(135deg, #f44336, #d32f2f) !important;
    color: white !important;
    border: none !important;
}

#export-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #e53935, #c62828) !important;
    transform: translateY(-2px) !important;
}

#export-btn:active:not(:disabled) {
    background: linear-gradient(135deg, #d32f2f, #b71c1c) !important;
    transform: translateY(0) !important;
}

.btn-secondary {
    background: var(--color-secondary);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: var(--color-secondary-hover);
}



.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.modal-header h3 {
    color: var(--color-text-main);
    font-size: var(--text-xl);
    margin: 0;
}

.modal-close, .close-btn {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: var(--text-2xl);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover, .close-btn:hover {
    background: var(--color-bg-input);
    color: var(--color-text-main);
}

.modal-body {
    padding: var(--space-lg);
}

/* 비디오 프리뷰 모달 */
.video-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.preview-info {
    background: var(--color-bg-input);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-top: var(--space-md);
}

.preview-info h4 {
    color: var(--color-text-main);
    margin-bottom: var(--space-sm);
    font-size: var(--text-lg);
}

.preview-info p {
    margin-bottom: var(--space-sm);
    color: var(--color-text-sub);
}

.preview-info strong {
    color: var(--color-text-main);
}

/* 도움말 버튼 */
.help-btn {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--color-action);
    color: white;
    border: none;
    font-size: var(--text-xl);
    font-weight: bold;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 100;
}

.help-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-action);
}

/* 토스트 메시지 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    color: white;
    font-weight: 500;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}



.auto-play-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--text-sm);
    color: var(--color-text-sub);
    cursor: pointer;
}

.auto-play-toggle input[type="checkbox"] {
    margin: 0;
    accent-color: var(--color-action);
}

    .preview-container {
        position: relative;
        width: 100%;
        max-width: 1000px;  /* 최대 너비 조금 확대 */
        aspect-ratio: 16/9;
        background: #000;
        overflow: hidden;
        margin: 0 auto;  /* 중앙 정렬, 하단 여백 제거 */
    }

.reaction-video-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.reaction-video-container .video-title {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: var(--space-xs) var(--space-sm);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: var(--text-sm);
    font-weight: 600;
    z-index: 10;
}

#reaction-preview-player {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.original-overlay {
    position: absolute;
    top: 3%;
    right: 2%;
    width: 40%;
    height: 60%;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    z-index: 20;
    box-shadow: var(--shadow-lg);
}

.original-overlay .video-title {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: var(--space-xs) var(--space-sm);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: var(--text-xs);
    font-weight: 600;
    z-index: 10;
}

#original-preview-player {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.preview-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm);
    background: var(--color-bg-input);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--color-text-sub);
}

.preview-info span {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}



/* 줌 컨트롤 스타일 */
.zoom-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--color-bg-input);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}

.zoom-controls button {
    width: 24px;
    height: 24px;
    min-height: 24px;
    padding: 0;
    font-size: 12px;
    font-weight: bold;
}

#zoomLevel {
    font-size: 12px;
    color: var(--color-text-sub);
    min-width: 40px;
    text-align: center;
}

.zoom-hint {
    font-size: 10px;
    color: var(--color-text-muted);
    margin-left: 4px;
}

/* 통합된 시간 눈금 스타일 */
.time-ruler {
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    height: 30px;
    background: rgba(42, 42, 42, 0.9);
    border-bottom: 1px solid var(--color-border);
    pointer-events: none;
    backdrop-filter: blur(2px);
    z-index: 5;
}

.time-marker {
    position: absolute;
    top: 0;
    width: 1px;
    height: 200%;  /* 타임라인 전체 높이까지 연장 */
    background: rgba(255, 255, 255, 0.15);
    z-index: 1;
}

.time-label {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--color-text-sub);
    background: rgba(0, 0, 0, 0.8);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    font-weight: 500;
}

.segment-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    color: #4CAF50;
    font-weight: 600;
    pointer-events: none;
}

/* 통합된 모달 스타일 - Recorder 스타일 적용 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    animation: modalFadeIn 0.3s ease-out;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--color-bg-card);
    margin: 2% auto;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 1600px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

.large-modal {
    width: 70%;
    max-width: 700px;
    margin: 3% auto;
}

.extra-large-modal {
    width: 90%;
    max-width: 1200px;
    margin: 2% auto;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 36px;
    border-bottom: 2px solid rgba(194, 41, 31, 0.4);
    background: linear-gradient(135deg, rgba(194, 41, 31, 0.15), rgba(42, 42, 42, 0.95));
    border-radius: 12px 12px 0 0;
    flex-shrink: 0;
    position: relative;
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(194, 41, 31, 0.2);
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(194, 41, 31, 0.8), transparent);
}

.modal-header h2, .modal-header h3 {
    margin: 0;
    color: var(--color-text-main);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #fff, #ccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close, .modal-close, .close-btn {
    color: var(--color-text-muted);
    font-size: 1.5rem;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.close:hover, .modal-close:hover, .close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(194, 41, 31, 0.5);
    color: #fff;
    transform: scale(1.1);
}

.modal-body {
    padding: var(--space-md);
    flex: 1;
    overflow-y: auto;
}

.modal-footer {
    padding: var(--space-lg) var(--space-xl);
    border-top: 1px solid var(--color-border);
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
    background: var(--color-bg-card);
    flex-shrink: 0;
}

/* Help Modal 스타일 */
.help-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.help-section {
    display: flex;
    gap: var(--space-sm);
    align-items: flex-start;
    padding: var(--space-sm);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    transition: var(--transition);
}

.help-section:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-border-focus);
}

.help-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-bg-input), rgba(42, 42, 42, 0.8));
    border-radius: var(--radius-md);
    flex-shrink: 0;
    color: var(--color-text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.help-icon:hover {
    background: linear-gradient(135deg, rgba(194, 41, 31, 0.2), rgba(194, 41, 31, 0.1));
    border-color: rgba(194, 41, 31, 0.3);
    transform: scale(1.05);
}

.help-text {
    flex: 1;
}

.help-text h4 {
    margin: 0 0 var(--space-xs) 0;
    color: var(--color-text-main);
    font-size: var(--text-base);
    font-weight: 600;
}

.help-text ol {
    margin: 0;
    padding-left: var(--space-md);
}

.help-text ol li {
    margin-bottom: 2px;
    color: var(--color-text-sub);
    line-height: 1.4;
    font-size: var(--text-sm);
}

.help-text p {
    margin: 0 0 var(--space-xs) 0;
    color: var(--color-text-sub);
    line-height: 1.4;
    font-size: var(--text-sm);
}

/* Preview Examples */
.preview-examples {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preview-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 6px var(--space-xs);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
}

.preview-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.play-dot {
    background: var(--point-play);
    box-shadow: 0 0 4px rgba(76, 175, 80, 0.4);
}

.pause-dot {
    background: var(--point-pause);
    box-shadow: 0 0 4px rgba(244, 67, 54, 0.4);
}

/* Feature Grid */
.feature-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 6px var(--space-xs);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: var(--text-sm);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.feature-icon {
    font-size: var(--text-base);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Tips List */
.tips-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tip-item {
    padding: 6px var(--space-sm);
    background: linear-gradient(135deg, rgba(194, 41, 31, 0.1), rgba(194, 41, 31, 0.05));
    border-left: 3px solid var(--color-action);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--color-text-sub);
    font-style: italic;
    transition: var(--transition);
    font-size: var(--text-sm);
    line-height: 1.4;
}

.tip-item:hover {
    background: linear-gradient(135deg, rgba(194, 41, 31, 0.15), rgba(194, 41, 31, 0.1));
    transform: translateX(2px);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #333;
    border-radius: 8px;
    background-color: #2a2a2a;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #333;
    border-radius: 8px;
    background-color: #2a2a2a;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.form-control[type="range"] {
    padding: 8px 0;
    background: transparent;
    border: none;
    accent-color: #4CAF50;
}

.form-control[type="range"]::-webkit-slider-thumb {
    background: #4CAF50;
    border-radius: 50%;
    cursor: pointer;
}

.form-control[type="range"]::-moz-range-thumb {
    background: #4CAF50;
    border-radius: 50%;
    cursor: pointer;
}

/* Layout Settings Panel - Viewer 스타일 완전 적용 */
.overlay-settings-panel {
    position: fixed;
    top: 50%;
    right: var(--space-lg);
    transform: translateY(-50%);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-sm);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    z-index: 1000;
    max-width: 280px;
    max-height: 60vh;
    overflow-y: auto;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%) translateX(100%);
}

.overlay-settings-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.overlay-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--color-border);
}

.overlay-settings-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-text-main);
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.overlay-settings-title .material-icons {
    font-size: 20px;
    color: var(--color-text-main);
    vertical-align: middle;
}

/* Compact Controls - Viewer 스타일 (완전 동일) */
.compact-controls {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.compact-controls .input-group {
    margin-bottom: var(--space-sm);
}

.compact-controls .input-label {
    font-size: var(--text-xs);
    margin-bottom: var(--space-xs);
    color: var(--color-text-main);
    font-weight: 500;
}

.compact-controls .input {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--text-sm);
    min-height: 36px;
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-main);
    transition: border-color var(--transition-fast);
}

.compact-controls .input:focus {
    outline: none;
    border-color: var(--color-action);
    box-shadow: 0 0 0 2px rgba(194, 41, 31, 0.1);
}

.compact-controls .slider-container {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-xs);
}

.compact-controls .slider-container input[type="range"] {
    flex-grow: 1;
    height: 8px;
    background: var(--color-secondary);
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    border: none;
    padding: 0;
}

.compact-controls .slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--color-action);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.compact-controls .slider-container input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--color-action);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-sm);
}

.compact-controls .slider-value {
    min-width: 60px;
    text-align: center;
    font-weight: bold;
    color: var(--color-action);
    font-size: var(--text-lg);
}

.compact-controls .btn {
    width: 100%;
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--text-sm);
    min-height: 36px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.form-group input:invalid {
    border-color: #ff5722;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 0.85rem;
}

.form-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 32px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(42, 42, 42, 0.8), rgba(32, 32, 32, 0.9));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);
}

.form-actions .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    min-width: 100px;
    text-transform: none;
    letter-spacing: 0.3px;
}

.form-actions .btn-primary {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.form-actions .btn-primary:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.form-actions .btn-secondary {
    background: linear-gradient(135deg, #666, #555);
    color: white;
}

.form-actions .btn-secondary:hover {
    background: linear-gradient(135deg, #555, #444);
    transform: translateY(-1px);
}

/* Table Editing Styles */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(42, 42, 42, 0.6), rgba(32, 32, 32, 0.7));
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.controls-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.controls-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* 테이블 액션 영역 */
.table-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(42, 42, 42, 0.6), rgba(32, 32, 32, 0.7));
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.table-actions .btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 6px;
    background: linear-gradient(135deg, #666, #555);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.3px;
}

.table-actions .btn-small:hover {
    background: linear-gradient(135deg, #555, #444);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.auto-adjust-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ccc;
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
}

.auto-adjust-toggle input[type="checkbox"] {
    accent-color: #4CAF50;
}

.timestamp-count {
    color: #888;
    font-size: 0.9rem;
}

.table-container {
    flex: 1;
    overflow: auto;
    min-height: 200px; /* 최소 높이 설정 */
    border: 2px solid rgba(194, 41, 31, 0.2);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95), rgba(20, 20, 20, 0.98));
    backdrop-filter: blur(15px);
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.4),
        0 4px 16px rgba(194, 41, 31, 0.1);
    position: relative;
}

.table-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(194, 41, 31, 0.5), transparent);
}

#timestamps-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    font-size: 0.95rem;
    table-layout: auto;
    min-width: 100%;
}

/* Advanced Editor 테이블 컬럼 너비 최적화 - 3 30 45 45 35 10 */
.advanced-editor-content #timestamps-table th:nth-child(1), 
.advanced-editor-content #timestamps-table td:nth-child(1) { 
    width: 2px !important; 
    min-width: 2px !important; 
    max-width: 2px !important;
}   /* # - 2px */

.advanced-editor-content #timestamps-table th:nth-child(2), 
.advanced-editor-content #timestamps-table td:nth-child(2) { 
    width: 30px !important; 
    min-width: 30px !important; 
    max-width: 30px !important;
}  /* Event - 30px */

.advanced-editor-content #timestamps-table th:nth-child(3), 
.advanced-editor-content #timestamps-table td:nth-child(3) { 
    width: 35px !important; 
    min-width: 35px !important; 
    max-width: 35px !important;
}  /* Reaction - 35px */

.advanced-editor-content #timestamps-table th:nth-child(4), 
.advanced-editor-content #timestamps-table td:nth-child(4) { 
    width: 35px !important; 
    min-width: 35px !important; 
    max-width: 35px !important;
}  /* Original - 35px */

.advanced-editor-content #timestamps-table th:nth-child(5), 
.advanced-editor-content #timestamps-table td:nth-child(5) { 
    width: 35px !important; 
    min-width: 35px !important; 
    max-width: 35px !important;
}  /* Duration - 35px */

.advanced-editor-content #timestamps-table th:nth-child(6), 
.advanced-editor-content #timestamps-table td:nth-child(6) { 
    width: 10px !important; 
    min-width: 10px !important; 
    max-width: 10px !important;
}   /* Delete - 10px */

/* 기존 모달용 테이블 (Advanced Editor가 아닌 경우) */
.modal #timestamps-table th:nth-child(1), .modal #timestamps-table td:nth-child(1) { width: 3%; min-width: 40px; }   /* # */
.modal #timestamps-table th:nth-child(2), .modal #timestamps-table td:nth-child(2) { width: 22%; min-width: 150px; }  /* PLAY Time - Reaction */
.modal #timestamps-table th:nth-child(3), .modal #timestamps-table td:nth-child(3) { width: 22%; min-width: 150px; }  /* PAUSE Time - Reaction */
.modal #timestamps-table th:nth-child(4), .modal #timestamps-table td:nth-child(4) { width: 24%; min-width: 180px; }  /* Original Start */
.modal #timestamps-table th:nth-child(5), .modal #timestamps-table td:nth-child(5) { width: 24%; min-width: 180px; }  /* Original End */
.modal #timestamps-table th:nth-child(6), .modal #timestamps-table td:nth-child(6) { width: 15%; min-width: 120px; }  /* Duration */
.modal #timestamps-table th:nth-child(7), .modal #timestamps-table td:nth-child(7) { width: 10%; min-width: 80px; }   /* Delete */

/* Reaction 컬럼 스타일 (PLAY, PAUSE) */
#timestamps-table th:nth-child(2),
#timestamps-table th:nth-child(3),
#timestamps-table td:nth-child(2),
#timestamps-table td:nth-child(3) {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
    border-left: 3px solid rgba(76, 175, 80, 0.3);
    border-right: 3px solid rgba(76, 175, 80, 0.3);
}

/* Original 컬럼 스타일 (Start, End) */
#timestamps-table th:nth-child(4),
#timestamps-table th:nth-child(5),
#timestamps-table td:nth-child(4),
#timestamps-table td:nth-child(5) {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.1), rgba(244, 67, 54, 0.05));
    border-left: 3px solid rgba(244, 67, 54, 0.3);
    border-right: 3px solid rgba(244, 67, 54, 0.3);
}

#timestamps-table th {
    background: linear-gradient(135deg, rgba(194, 41, 31, 0.15), rgba(42, 42, 42, 0.95));
    color: #fff;
    padding: 16px 20px;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 150;
    border-bottom: 2px solid rgba(194, 41, 31, 0.4);
    backdrop-filter: blur(15px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Reaction 헤더 스타일 */
#timestamps-table th:nth-child(2),
#timestamps-table th:nth-child(3) {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.1));
    color: #4CAF50;
    font-weight: 700;
}

/* Original 헤더 스타일 */
#timestamps-table th:nth-child(4),
#timestamps-table th:nth-child(5) {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.2), rgba(244, 67, 54, 0.1));
    color: #f44336;
    font-weight: 700;
}

#timestamps-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #fff;
    transition: all 0.2s ease;
    vertical-align: middle;
}

#timestamps-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(76, 175, 80, 0.15), rgba(76, 175, 80, 0.05));
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
}

#timestamps-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

#timestamps-table tbody tr:nth-child(odd) {
    background: rgba(255, 255, 255, 0.01);
}

.table-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    text-align: center;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
    min-width: 120px;
}

.table-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(194, 41, 31, 0.5);
    box-shadow: 0 0 0 2px rgba(194, 41, 31, 0.2);
    outline: none;
}

.table-input:invalid {
    border-color: #ff5722;
    background: rgba(244, 67, 54, 0.1);
}

/* 시간 입력 필드 특별 스타일 */
.table-input[type="number"] {
    text-align: center;
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

.table-input[type="number"]:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(76, 175, 80, 0.5);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

/* 유효한 시간 입력 시 녹색 테두리 */
.table-input.valid {
    border-color: rgba(76, 175, 80, 0.5);
    background: rgba(76, 175, 80, 0.05);
}

/* Reaction 컬럼 입력 필드 스타일 */
#timestamps-table td:nth-child(2) .table-input,
#timestamps-table td:nth-child(3) .table-input {
    background: rgba(76, 175, 80, 0.08);
    border-color: rgba(76, 175, 80, 0.3);
    color: #4CAF50;
}

#timestamps-table td:nth-child(2) .table-input:focus,
#timestamps-table td:nth-child(3) .table-input:focus {
    background: rgba(76, 175, 80, 0.12);
    border-color: rgba(76, 175, 80, 0.6);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.3);
}

/* Original 컬럼 입력 필드 스타일 */
#timestamps-table td:nth-child(4) .table-input,
#timestamps-table td:nth-child(5) .table-input {
    background: rgba(244, 67, 54, 0.08);
    border-color: rgba(244, 67, 54, 0.3);
    color: #f44336;
}

#timestamps-table td:nth-child(4) .table-input:focus,
#timestamps-table td:nth-child(5) .table-input:focus {
    background: rgba(244, 67, 54, 0.12);
    border-color: rgba(244, 67, 54, 0.6);
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.3);
}

/* 삭제 버튼 스타일 */
.delete-btn {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 50px;
    text-align: center;
}

.delete-btn:hover {
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

/* 도구 설명 스타일 */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    pointer-events: none;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

.table-select {
    width: 100%;
    background: transparent;
    border: 1px solid transparent;
    color: #fff;
    padding: 5px;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.table-select:focus {
    background: #2a2a2a;
    border-color: #4CAF50;
    outline: none;
}

.delete-row-btn {
    background: linear-gradient(135deg, #ff5722, #d32f2f);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.delete-row-btn:hover {
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    transform: scale(1.05);
}

.row-number {
    color: #888;
    font-weight: 600;
    text-align: center;
}

.system-event-row {
    background: rgba(244, 67, 54, 0.1) !important;
    border-left: 3px solid #f44336;
}

.system-event-row:hover {
    background: rgba(244, 67, 54, 0.15) !important;
}

.system-event-row .table-input[readonly] {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
    cursor: not-allowed;
}

.system-event-row .table-select[disabled] {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
    cursor: not-allowed;
}

.system-event-row .delete-row-btn[disabled] {
    background: rgba(255, 255, 255, 0.1);
    color: #888;
    cursor: not-allowed;
}

.system-event-row .delete-row-btn[disabled]:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: none;
}

.duration-display {
    color: #4CAF50;
    font-weight: 600;
    text-align: center;
}


/* 반응형 디자인 */
@media (max-width: 768px) {
    .dev-info-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .timeline-controls {
        justify-content: center;
    }
    
    .file-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .timeline-container {
        padding: var(--space-sm);
    }
    
    .timeline-track {
        height: 60px;
    }
    

    
    .timeline-segment {
    height: 20px;
        top: 20px;
    }
    
    .help-btn {
        bottom: var(--space-md);
        right: var(--space-md);
        width: 45px;
        height: 45px;
        font-size: var(--text-lg);
    }
}

@media (max-width: 480px) {
    .simple-editor {
        padding: var(--space-md) var(--space-sm);
    }
    
    .timeline-controls {
        flex-direction: column;
    }
    
    .btn {
    width: 100%;
        margin-bottom: var(--space-xs);
    }
}

/* 접근성 유틸리티 */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

    /* Unified Editor Section */
    .unified-editor-section {
        background: var(--color-bg-card);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-md);
        overflow: hidden;
        margin-bottom: var(--space-md);
    }

    .unified-header {
        padding: 2.5px var(--space-sm);
        font-weight: 600;
        background: rgba(194, 41, 31, 0.9);
        color: white;
        font-size: var(--text-sm);
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .unified-header h3 {
        margin: 0;
        color: white;
        font-size: var(--text-sm);
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: var(--space-sm);
    }

    .header-controls {
        display: flex;
        align-items: center;
        gap: var(--space-sm);
        margin-left: auto;
        flex-wrap: wrap;
    }

    .header-controls .btn {
        background: rgba(255, 255, 255, 0.1);
        padding: 6px 12px;
        border-radius: var(--radius-sm);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        font-size: var(--text-sm);
        color: rgba(255, 255, 255, 0.9);
        transition: all var(--transition-fast);
        min-height: auto;
    }

    .header-controls .btn:hover {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.3);
    color: white;
        transform: none;
        box-shadow: none;
    }

    .header-controls .zoom-controls {
        display: flex;
        align-items: center;
        gap: var(--space-xs);
        background: rgba(255, 255, 255, 0.1);
        padding: 4px 8px;
        border-radius: var(--radius-sm);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .header-controls .zoom-controls button {
        background: transparent;
        border: none;
        color: rgba(255, 255, 255, 0.9);
        padding: 2px 6px;
        font-size: var(--text-sm);
        min-height: 24px;
        height: 24px;
    }

    .header-controls .zoom-controls button:hover {
        background: rgba(255, 255, 255, 0.2);
        border-radius: var(--radius-sm);
    color: white;
    }

    .header-controls .zoom-controls #zoomLevel {
        font-size: var(--text-sm);
        color: rgba(255, 255, 255, 0.8);
        min-width: 40px;
        text-align: center;
    }

    .header-controls .zoom-controls .zoom-hint {
        font-size: var(--text-xs);
        color: rgba(255, 255, 255, 0.6);
        margin-left: var(--space-xs);
    }

    .header-controls .history-controls {
        display: flex;
        align-items: center;
        gap: var(--space-xs);
    }

    /* Video Preview Area */
    .video-preview-area {
        padding: 0 var(--space-md) var(--space-xs) var(--space-md);
        border-bottom: 1px solid var(--color-border);
    }

    

    /* Timeline Area */
    .timeline-area {
        padding: var(--space-sm) var(--space-md) var(--space-md) var(--space-md);
    }

    .timeline-controls {
        display: flex;
        gap: var(--space-md);
        align-items: center;
        margin-bottom: var(--space-xs);
        flex-wrap: wrap;
    }

    .timeline-controls-right {
        display: flex;
        gap: var(--space-md);
        align-items: center;
        margin-left: auto;
    }

    .timeline-controls .btn {
        padding: 8px 16px;
        font-size: var(--text-sm);
        min-height: auto;
    }

    /* Sync Mode 버튼 스타일 */
    #sync-mode-btn {
        background: var(--color-bg-input);
        border: 1px solid var(--color-border);
        transition: all var(--transition);
    }

    #sync-mode-btn.active {
    background: var(--color-success);
        border-color: var(--color-success);
        color: white;
    }

    #sync-mode-btn:hover {
        background: rgba(76, 175, 80, 0.1);
        border-color: var(--color-success);
    }

    #sync-mode-btn.active:hover {
        background: #45a049;
    }

    /* Sync Mode Info Modal 스타일 */
    #sync-info-modal .modal-header h3 {
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        text-transform: none !important;
        letter-spacing: 0.3px !important;
    }

    .sync-info-content {
        color: var(--color-text-main);
    }

    .sync-info-content h4 {
        margin: 0 0 12px 0;
        font-size: var(--text-base);
        font-weight: 600;
    }

    .sync-info-content ul {
        color: var(--color-text-sub);
        font-size: var(--text-sm);
    }

    .sync-info-content ul li {
        margin-bottom: 8px;
    }

    .sync-info-content strong {
        color: var(--color-text-main);
        font-weight: 600;
    }

    .sync-mode-section {
        padding: var(--space-sm);
        background: rgba(255, 255, 255, 0.02);
        border-radius: var(--radius-sm);
        border: 1px solid var(--color-border);
    }

    .timeline-controls .zoom-controls {
        display: flex;
        align-items: center;
        gap: var(--space-xs);
        background: var(--color-bg-input);
        padding: var(--space-xs) var(--space-sm);
        border-radius: var(--radius-sm);
        border: 1px solid var(--color-border);
    }

    .timeline-controls .zoom-controls button {
        background: transparent;
        border: none;
        color: var(--color-text-main);
        padding: 4px 8px;
        font-size: var(--text-sm);
        min-height: 24px;
        height: 24px;
        border-radius: var(--radius-sm);
    }

    .timeline-controls .zoom-controls button:hover {
        background: var(--color-bg-card);
        color: var(--color-action);
    }

    .timeline-controls .zoom-controls #zoomLevel {
        font-size: var(--text-sm);
        color: var(--color-text-sub);
        min-width: 50px;
        text-align: center;
    }

    .timeline-controls .zoom-controls .zoom-hint {
        font-size: var(--text-xs);
        color: var(--color-text-muted);
        margin-left: var(--space-xs);
    }

    .timeline-controls .history-controls {
        display: flex;
        align-items: center;
        gap: var(--space-xs);
    }

    .timeline-area .timeline-container {
        background: var(--color-bg-input);
        border-radius: var(--radius-md);
        padding: var(--space-sm);
        margin-bottom: var(--space-sm);
        border: 1px solid var(--color-border);
    }

    .timeline-area .timeline-info {
        display: flex;
        justify-content: space-between;
        font-size: var(--text-sm);
        color: var(--color-text-sub);
        margin-top: var(--space-sm);
    }

    .timeline-tip {
        text-align: center;
        font-size: var(--text-sm);
        color: var(--color-text-muted);
        margin-top: var(--space-xs);
        padding: var(--space-xs) var(--space-sm);
        background: rgba(194, 41, 31, 0.1);
        border-radius: var(--radius-sm);
        border: 1px solid rgba(194, 41, 31, 0.2);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .timeline-tip .material-icons {
        font-size: 16px;
        margin-right: 8px;
        color: var(--color-text-muted);
    }

    .timeline-tip span {
        font-style: italic;
    }

        /* Responsive adjustments */
    @media (max-width: 768px) {
        .timeline-controls {
            flex-direction: column;
            align-items: stretch;
            gap: var(--space-sm);
        }

        .timeline-controls > div,
        .timeline-controls > button {
            justify-content: center;
        }
}



/* ===== PLAYHEAD 디자인 개선 ===== */
.playhead-indicator {
    position: absolute;
    top: -35px; /* 시간 눈금자 시작점에서 시작 */
    left: 0;
    width: 2px;
    height: calc(35px + 80px); /* 시간 눈금자(35px) + 타임라인 트랙(60px) + 여유(20px) = 115px */
    background-color: #EF5350;
    z-index: 50;
    pointer-events: all; /* 마우스 이벤트를 받을 수 있도록 변경 */
    cursor: ew-resize;   /* 좌우 이동 커서 모양 */
    box-shadow: 0 0 8px rgba(239, 83, 80, 0.8);
}

/* 상단 삼각형 포인터 */
.playhead-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: -6px; /* 삼각형 중심 맞춤 */
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 12px solid #EF5350;
    filter: drop-shadow(0 2px 4px rgba(239, 83, 80, 0.8));
}

/* Playhead를 잡기 쉽게 하기 위한 투명한 핸들 영역 */
.playhead-indicator::after {
    content: '';
    position: absolute;
    top: -35px; /* 시간 눈금자 시작점에서 시작 */
    left: -10px; /* 중심선 기준 좌우로 10px씩, 총 20px의 핸들 영역 */
    width: 20px;
    height: calc(35px + 80px); /* 새로운 플레이헤드 높이에 맞춤 */
    background: transparent;
    pointer-events: all;
    cursor: ew-resize;
}


/* ===== 프리롤 인디케이터 애니메이션 ===== */
@keyframes preroll-glow {
    0% { 
        box-shadow: 0 0 4px #f44336, 0 0 8px rgba(244, 67, 54, 0.3);
        filter: brightness(1.1);
    }
    50% { 
        box-shadow: 0 0 16px #f44336, 0 0 24px rgba(244, 67, 54, 0.6);
        filter: brightness(1.3);
    }
    100% { 
        box-shadow: 0 0 4px #f44336, 0 0 8px rgba(244, 67, 54, 0.3);
        filter: brightness(1.1);
    }
}

.timeline-clip.is-prerolling {
    animation: preroll-glow 1.5s infinite ease-in-out;
    border: 2px solid #f44336;
    z-index: 15; /* 다른 클립보다 위에 표시 */
}

/* Main Editor Layout */
.main-editor-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

/* Top Section: Video Player + Advanced Editor */
.top-section {
    display: flex;
    gap: var(--space-md);
    min-height: 500px;
}

/* Video Player Section */
.video-player-section {
    flex: 1;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.video-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xs) var(--space-sm);
    border-bottom: 1px solid var(--color-border);
    background: rgba(42, 42, 42, 0.95);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    min-height: 32px;
}

.video-header h3 {
    color: var(--color-text-main);
    font-size: var(--text-sm);
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-weight: 500;
}

/* Video Preview Area in Video Player Section */
.video-player-section .video-preview-area {
    flex: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #000;
}

.video-player-section .preview-container {
    width: 100%;
    height: 100%;
    position: relative;
    aspect-ratio: 16/9;
    max-width: 100%;
    max-height: 100%;
}

/* 16:9 비율 강제 적용 */
.video-player-section .preview-container::before {
    content: '';
    display: block;
    padding-top: 56.25%; /* 16:9 = 9/16 = 0.5625 */
}

.video-player-section .preview-container > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Advanced Editor Panel - Layout Container */
.advanced-editor-panel {
    width: 350px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    overflow: visible;
    flex-shrink: 0;
    max-height: 80vh; /* 화면 높이의 80%로 제한 */
}

.advanced-editor-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4px;
    border-bottom: 1px solid var(--color-border);
    background: rgba(42, 42, 42, 0.95);
    flex-shrink: 0;
    min-height: 24px;
    position: relative;
    z-index: 50;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: visible;
}

.advanced-editor-header h3 {
    color: var(--color-text-main);
    font-size: 13px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.advanced-editor-content {
    flex: 1;
    padding: 4px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 0; /* flexbox에서 스크롤이 제대로 작동하도록 */
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.advanced-editor-content::-webkit-scrollbar {
    width: 6px;
}

.advanced-editor-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.advanced-editor-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.advanced-editor-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Advanced Editor Table Container 스크롤바 스타일 */
.advanced-editor-content .table-container::-webkit-scrollbar {
    width: 6px;
}

.advanced-editor-content .table-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.advanced-editor-content .table-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.advanced-editor-content .table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Advanced Editor Table Controls */
.advanced-editor-content .table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1px 0;
    flex-shrink: 0;
}

.advanced-editor-content .controls-left {
    flex: 1;
}

.advanced-editor-content .controls-right {
    flex-shrink: 0;
    margin-left: 4px;
}

.advanced-editor-content .timestamp-count {
    font-size: 8px;
    color: var(--color-text-muted);
    font-weight: 500;
}

.advanced-editor-content .btn-small {
    padding: 1px 3px !important;
    font-size: 7px !important;
    min-height: 12px !important;
    border-radius: 2px !important;
    line-height: 1 !important;
}

/* Advanced Editor Table Styles */
.advanced-editor-content .table-container {
    flex: 1;
    border-radius: var(--radius-sm);
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    min-height: 200px; /* 최소 높이 설정 */
    display: block !important;
    visibility: visible !important;
    /* 고정 높이 제거 - flex로 여백 활용 */
}

.advanced-editor-content .add-button-container {
    padding: 12px 0;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.advanced-editor-content table {
    width: 100% !important;
    border-collapse: collapse !important;
    background: var(--color-bg-input) !important;
    table-layout: fixed !important;
}

.advanced-editor-content th {
    background: rgba(42, 42, 42, 0.9) !important;
    color: var(--color-text-main) !important;
    font-weight: 600 !important;
    padding: 4px 6px !important;
    text-align: left !important;
    font-size: 10px !important;
    border-bottom: 1px solid var(--color-border) !important;
    white-space: nowrap !important;
    line-height: 1.3 !important;
}

.advanced-editor-content td {
    padding: 3px 6px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    font-size: 10px !important;
    vertical-align: middle !important;
    line-height: 1.3 !important;
    color: var(--color-text-main) !important;
    background: var(--color-bg-input) !important;
}

.advanced-editor-content tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.advanced-editor-content input[type="number"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 2px 4px !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 3px !important;
    background: var(--color-bg-input) !important;
    color: var(--color-text-main) !important;
    font-size: 9px !important;
    text-align: center !important;
    min-height: 18px !important;
    line-height: 1.3 !important;
    box-sizing: border-box !important;
    font-family: 'Courier New', monospace !important;
}

.advanced-editor-content input[type="number"]:focus {
    outline: none;
    border-color: var(--color-action);
    box-shadow: 0 0 0 1px rgba(194, 41, 31, 0.2);
}

/* Advanced Editor에서 table-input 클래스 오버라이드 */
.advanced-editor-content .table-input {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 2px 4px !important;
    font-size: 9px !important;
    min-height: 18px !important;
    box-sizing: border-box !important;
    color: white !important;
}

/* Reaction과 Original input을 duration과 같은 스타일로 - 더 강한 우선순위 */
/* 클래스 기반 선택자로 rowspan nth-child 문제 해결 */
.advanced-editor-content #timestamps-table .play-time,
.advanced-editor-content #timestamps-table .pause-time,
.advanced-editor-content #timestamps-table .original-start,
.advanced-editor-content #timestamps-table .original-end {
    font-weight: 600 !important;
    color: white !important;
    font-size: 10px !important;
    text-align: center !important;
    font-family: 'Courier New', monospace !important;
    padding: 2px 4px !important;
    line-height: 1.3 !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    /* 스피너(화살표) 제거 - 더 강력한 방법 */
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

/* 웹킷 브라우저용 스피너 제거 - 더 강력한 방법 */
.advanced-editor-content #timestamps-table .play-time::-webkit-outer-spin-button,
.advanced-editor-content #timestamps-table .play-time::-webkit-inner-spin-button,
.advanced-editor-content #timestamps-table .pause-time::-webkit-outer-spin-button,
.advanced-editor-content #timestamps-table .pause-time::-webkit-inner-spin-button,
.advanced-editor-content #timestamps-table .original-start::-webkit-outer-spin-button,
.advanced-editor-content #timestamps-table .original-start::-webkit-inner-spin-button,
.advanced-editor-content #timestamps-table .original-end::-webkit-outer-spin-button,
.advanced-editor-content #timestamps-table .original-end::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    appearance: none !important;
    margin: 0 !important;
    display: none !important;
}

.advanced-editor-content .event-cell {
    font-weight: 600;
    color: var(--color-action);
    text-align: center;
    min-width: 30px;
    font-size: 10px;
    padding: 2px 4px;
    line-height: 1.3;
}

.advanced-editor-content .event-cell.play {
    color: var(--point-play);
}

.advanced-editor-content .event-cell.pause {
    color: var(--point-pause);
}

/* Event 버튼 스타일 */
.advanced-editor-content .event-button {
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 30px;
    text-align: center;
}

.advanced-editor-content .event-button.play {
    color: var(--point-play);
    border-color: var(--point-play);
}

.advanced-editor-content .event-button.play:hover {
    background: var(--point-play);
    color: white;
    transform: scale(1.05);
}

.advanced-editor-content .event-button.pause {
    color: var(--point-pause);
    border-color: var(--point-pause);
}

.advanced-editor-content .event-button.pause:hover {
    background: var(--point-pause);
    color: white;
    transform: scale(1.05);
}

.advanced-editor-content .duration-cell {
    font-weight: 600;
    color: var(--color-info);
    text-align: center;
    font-size: 10px;
    padding: 2px 4px;
    line-height: 1.3;
    vertical-align: middle;
}

.advanced-editor-content .row-number {
    font-weight: 600;
    color: var(--color-text-main);
    text-align: center;
    font-size: 10px;
    vertical-align: middle;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.advanced-editor-content .duration-cell {
    font-weight: 600;
    color: var(--color-info);
    text-align: center;
    font-size: 10px;
    padding: 2px 4px;
    line-height: 1.3;
    vertical-align: middle;
    border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.advanced-editor-content .delete-cell {
    text-align: center;
    width: 20px;
    vertical-align: middle;
    border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Delete 헤더는 보이되 텍스트만 공백 */
.advanced-editor-content #timestamps-table th:nth-child(6) {
    display: table-cell !important;
    visibility: visible !important;
}

/* Delete 셀은 보이게 하기 */
.advanced-editor-content .delete-cell {
    display: table-cell !important;
    visibility: visible !important;
}

.advanced-editor-content .btn-delete {
    background: transparent;
    color: #f44336;
    border: none;
    border-radius: 3px;
    padding: 3px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    min-height: 18px;
    min-width: 18px;
    line-height: 1.3;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.advanced-editor-content .btn-delete::before {
    content: "close";
    font-family: 'Material Icons';
    font-size: 16px;
    color: #f44336;
}

.advanced-editor-content .btn-delete:hover {
    background: #f44336;
    color: white;
    transform: scale(1.05);
}

.advanced-editor-content .btn-delete:hover::before {
    color: white;
}

/* 휴지통 버튼 호버 시 delete 텍스트 툴팁 - JavaScript로 처리 */
.delete-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 10000;
    pointer-events: none;
    transform: translate(-50%, -100%);
    margin-top: -8px;
}

/* Play/Pause Row Grouping */
.advanced-editor-content .play-row {
    background: rgba(76, 175, 80, 0.1);
    border-left: 3px solid var(--point-play);
}

.advanced-editor-content .pause-row {
    background: rgba(244, 67, 54, 0.1);
    border-left: 3px solid var(--point-pause);
}

.advanced-editor-content .pause-row td:first-child {
    border-left: none;
}

.advanced-editor-content .pause-row .event-cell {
    padding-left: 20px;
}

/* Advanced Editor Actions - 제거됨 (Add 버튼이 table-container 내부로 이동) */

.advanced-editor-content .auto-adjust-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    color: var(--color-text-sub);
    cursor: pointer;
    line-height: 1.2;
}

.advanced-editor-content .form-actions {
    flex-shrink: 0;
    padding: 6px 0;
    display: flex;
    gap: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 4px;
}

.advanced-editor-content .form-actions .btn {
    flex: 1;
    padding: 6px 12px;
    font-size: 12px;
    min-height: 24px;
    line-height: 1.2;
    font-weight: 600;
}

/* Timeline Area - Separate */
.timeline-area {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--space-sm);
    overflow: visible;
}

.timeline-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 2px 8px;
    border-bottom: 1px solid var(--color-border);
    background: rgba(42, 42, 42, 0.95);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    margin: calc(-1 * var(--space-sm)) calc(-1 * var(--space-sm)) var(--space-xs) calc(-1 * var(--space-sm));
    flex-shrink: 0;
    min-height: 20px;
    position: relative;
    z-index: 50;
}

.timeline-header h3 {
    color: var(--color-text-main);
    font-size: 13px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

/* Info Icon Styles */
.info-icon {
    font-size: 10px;
    color: #ff9800;
    cursor: help;
    margin-left: 4px;
    opacity: 0.8;
    transition: all 0.2s ease;
    font-weight: 600;
    background: rgba(255, 152, 0, 0.1);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    position: relative;
}

.info-icon:hover {
    opacity: 1;
    color: #ff9800;
    background: rgba(255, 152, 0, 0.2);
    transform: scale(1.1);
}

/* Custom Tooltip */
.info-icon::after {
    content: "";
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(45, 45, 45, 0.98), rgba(35, 35, 35, 0.98));
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: normal;
    white-space: pre-line;
    line-height: 1.5;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10000;
    pointer-events: none;
    border: 1px solid rgba(255, 152, 0, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    min-width: 320px;
    max-width: 400px;
}

/* Advanced Editor info content */
.advanced-editor-header .info-icon::after {
    content: "1. Enter time values to adjust timeblocks\A 2. Click Preview to check sync points\A 3. Save changes to apply to timeline\A * Add or delete timeblocks as needed";
}

/* Timeline Editor info content */
.timeline-header .info-icon::after {
    content: "1. Drag timeblocks to adjust timeline\A 2. Click blocks to preview sync points\A * Enable Sync Mode: one drag moves all subsequent blocks";
}

.info-icon::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(45, 45, 45, 0.98);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10000;
}

.info-icon:hover::after,
.info-icon:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .advanced-editor-panel {
        width: 320px;
    }
}

@media (max-width: 1000px) {
    .advanced-editor-panel {
        display: none; /* Advanced Editor 숨김 */
    }
    
    .top-section {
        justify-content: center;
    }
}

/* 모바일 환경에서 Advanced Editor 패널 최적화 */
@media (max-width: 1200px) and (min-width: 1001px) {
    .advanced-editor-panel {
        max-height: 70vh; /* 모바일에서는 조금 더 작게 */
    }
    
    .advanced-editor-content .table-container {
        min-height: 180px; /* 모바일에서 최소 높이만 설정 */
        /* 고정 높이 제거 - flex로 여백 활용 */
    }
}

@media (max-width: 768px) {
    .main-editor-layout {
        gap: var(--space-sm);
    }
    
    .top-section {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .video-player-section {
        flex: none;
    }
}

/* ===== Onboarding Modal Styles ===== */
.onboarding-content {
    max-width: 700px;
    width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.onboarding-content::-webkit-scrollbar {
    display: none;
}

.onboarding-content {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.onboarding-intro {
    text-align: center;
    margin-bottom: 30px;
}

.intro-subtitle {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px 0;
}

.intro-description {
    font-size: 16px;
    color: #ccc;
    margin: 0;
}

.highlight {
    color: #ff9800;
}

.progress-stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 0 20px;
}

.stepper-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.stepper-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 15px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: #333;
    z-index: 1;
}

.stepper-item.active:not(:last-child)::after {
    background: #ff9800;
}

.stepper-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #333;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
}

.stepper-item.active .stepper-icon {
    background: #ff9800;
    color: #fff;
}

.stepper-label {
    font-size: 12px;
    color: #666;
    text-align: center;
}

.stepper-item.active .stepper-label {
    color: #ff9800;
}

.onboarding-steps {
    margin-bottom: 30px;
}

.onboarding-step {
    display: none;
}

.onboarding-step.active {
    display: block;
}

.step-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.step-number {
    font-size: 18px;
    font-weight: 700;
    color: #ff9800;
    margin-right: 10px;
}

.step-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.step-content {
    padding-left: 28px;
}

.step-description {
    font-size: 14px;
    line-height: 1.6;
    color: #ccc;
    margin: 0;
}

.modal-footer {
    border-top: 1px solid #333;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.step-navigation {
    display: flex;
    align-items: center;
    gap: 16px;
}

.step-counter {
    font-size: 12px;
    color: #666;
    margin: 0 8px;
}

.modal-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-link {
    background: none;
    border: none;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 0;
    text-decoration: underline;
    margin-right: auto;
}

.btn-link:hover {
    color: #999;
}

.btn-primary {
    background: #ff9800;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
}

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

.btn-primary:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #333;
    color: #fff;
    border: 1px solid #555;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
}

.btn-secondary:hover:not(:disabled) {
    background: #444;
    border-color: #666;
}

.btn-secondary:disabled {
    background: #222;
    border-color: #333;
    color: #555;
    cursor: not-allowed;
}
