/* Tailwind CSS와 함께 사용하기 위한 커스텀 스타일 */
/* ─── 삼성 테마 색상 토큰 (일원화) ─────────────────────────────── */
:root {
    /* 삼성 브랜드 */
    --samsung-blue:      #1428A0;
    --samsung-blue-dark: #0d1c70;

    /* 브랜드 포인트 (교체 대상) */
    --brand-primary:     var(--samsung-blue);   /* 로고, REC 강조, 포커스 링 */
    --progress-active:   var(--samsung-blue);   /* 기존 var(--progress-active) 대체 (진행 표시) */
    --progress-inactive: #e2e8f0;

    /* 기존에 참조만 되고 정의가 없던 변수 복구 */
    --primary-color:     var(--samsung-blue);
    --primary-color-rgb: 20, 40, 160;
    --text-color:        #111827;
    --border-color:      #e5e7eb;

    /* 기능별 구분색 — 유지 (기능 구분 목적) */
    --btn-script: #00a884;
    --btn-script-hover: #008f70;
    --btn-audio: #2563eb;
    --btn-audio-hover: #1d4ed8;
    --btn-video: #7e22ce;
    --btn-video-hover: #6b21a8;
    --btn-merge: #65a30d;
    --btn-merge-hover: #4d7c0f;
}

body {
    font-family: 'KoPubWorld Dotum', sans-serif;
}
 /* 버튼과 타이틀에 폰트 웨이트 조정 */
 h1, h2, h3, button, .font-bold {
    font-family: 'KoPubWorld Dotum', sans-serif;
    font-weight: 700; /* Bold 웨이트 적용 */
}

/* 가벼운 텍스트에 적용 */
.text-sm, .text-xs, footer {
    font-family: 'KoPub Dotum', sans-serif;
    font-weight: 300; /* Light 웨이트 적용 */
}

/* Tailwind에서 색상 변수 사용 */
.text-primary {
    color: var(--primary-color);
}

.bg-primary {
    background-color: var(--primary-color);
}

.border-primary {
    border-color: var(--primary-color);
}

/* 드래그 앤 드롭 영역 스타일 */
.drop-zone--over {
    border-style: solid;
    background-color: rgba(0, 135, 247, 0.1);
}

/* 스피너 애니메이션 */
.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--progress-active); /* 파란색 로딩 스피너 */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.audio-status .spinner {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
#progress-bar {
    position: relative;
    height: 8px;
    border-radius: 4px;
    margin-top: 50px; /* 진행 바 위치 조정 */
    background-color: #e2e8f0;
}

#progress-bar > div {
    background-color: var(--progress-active);
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.step-indicators {
    top: -6px; /* 진행 바 위에 위치 */
}

.step-circle {
    width: 20px;
    height: 20px;
    font-size: 12px;
    border: 2px solid white;
    transition: all 0.3s ease;
}

.step-circle:first-child {
    margin-left: -10px; /* 왼쪽 끝에 위치 */
}

.step-circle:last-child {
    margin-right: -10px; /* 오른쪽 끝에 위치 */
}
#status-text{
    display: none;
}
#progress-percentage{
    font-weight: 500;
}
/* 진행 단계 스타일 */
/* 수정된 진행 단계 스타일 - 2단계에 맞게 조정 */
.progress-steps {
    height: 60px; /* 말풍선 영역 높이 */
    margin-top: 40px;
}
.step-bubbles {
    position: absolute;
    display: flex;
    justify-content: space-between;
    width: 100%;
    top: 40px;
    left: 0;
    padding: 0;
}

/* 말풍선 개별 스타일 개선 */
.step-bubble {
    position: relative;
    display: inline-block;
    text-align: center;
}
.step-bubble.step-1 {
    position: absolute;
    left: 30%;
    transform: translateX(-50%);
}
.step-bubble.step-1 .bubble-content {
    border-color: var(--progress-active);
    color: var(--progress-active);
}
.step-bubble.step-1 .bubble-content::before {
    border-color: var(--progress-active);
}

.step-bubble.step-1 .bubble-pointer {
    border-color: var(--progress-active);
}
.step-bubble.step-2 {
    position: absolute;
    right: 30%;
    transform: translateX(50%);
}
.bubble-content {
    position: relative;
    display: inline-block;
    padding: 8px 25px;
    background-color: white;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    color: #718096;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    z-index: 2;
}
.bubble-content::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 16px;
    height: 16px;
    background-color: white;
    border-left: 2px solid #e2e8f0;
    border-top: 2px solid #e2e8f0;
    z-index: 1;
    transition: all 0.3s ease;
}
.bubble-pointer {
    position: absolute;
    top: -8px; /* 화살표 위치 조정 */
    width: 16px;
    height: 16px;
    background-color: white;
    border-left: 2px solid #e2e8f0;
    border-top: 2px solid #e2e8f0;
    transform: rotate(45deg);
    z-index: 1;
}
.bubble-arrow {
    position: relative;
    margin-top: -1px; /* 화살표 위치 미세 조정 */
    z-index: 1;
}

/* 말풍선 위치 조정 */
.step-1 {
    left: 10%; /* 첫 번째 말풍선 위치 */
}

.step-2 {
    right: 10%; /* 두 번째 말풍선 위치 */
}

/* 진행 바 애니메이션 조정 */
@keyframes progress {
    0% { width: 0%; }
    100% { width: 100%; }
}

.progress-animation {
    animation: progress 2s linear forwards;
}
/* 활성화된 단계 스타일 */
.step-bubble.active .bubble-content {
    background-color: var(--progress-active);
    border-color: var(--progress-active);
    color: white;
}
.step-bubble.active .bubble-content::before {
    background-color: var(--progress-active);
    border-color: var(--progress-active);
}
.step-bubble.active .bubble-pointer {
    background-color: var(--progress-active);
    border-color: var(--progress-active);
}
.step-bubble.step-1:not(.active) .bubble-content {
    border-color: var(--progress-active);
    color: #ffffff;
}

.step-bubble.step-1:not(.active) .bubble-pointer {
    border-color: var(--progress-active);
}
.step-bubble.active .bubble-arrow {
    background-color: var(--progress-active);
    border-color: var(--progress-active);
}

/* 완료된 단계 스타일 */
.step-bubble.completed .bubble-content {
    background-color: var(--progress-active);
    border-color: var(--progress-active);
    color: white;
}

.step-bubble.completed .bubble-content::before {
    background-color: var(--progress-active);
    border-color: var(--progress-active);
}

.step-bubble.completed .bubble-pointer {
    background-color: var(--progress-active);
    border-color: var(--progress-active);
}

.step-bubble.completed .bubble-arrow {
    background-color: var(--progress-active);
    border-color: var(--progress-active);
}

/* 상세 로그 버튼 */

#show-logs {
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s;
    display: inline-flex;
}

#show-logs:hover {
    background-color: #f3f4f6;
}
.logs-container {
    transition: all 0.3s ease;
}
/* 플로팅 버튼 */
.floating-buttons {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.floating-button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 18px;
}

.floating-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.floating-button:active {
    transform: translateY(0) scale(0.95);
}


.edit-button {
    background-color: #8b5cf6; /* 보라색 */
    color: white;
}

.edit-button:hover {
    background-color: #7c3aed; /* 조금 더 진한 보라색 */
}

/* 저장 버튼 - 녹색 계열 */
.save-button {
    background-color: #10b981; /* 에메랄드 그린 */
    color: white;
}

.save-button:hover {
    background-color: #059669; /* 조금 더 진한 녹색 */
}

/* 취소 버튼 - 빨간색 계열 */
.cancel-button {
    background-color: #ef4444 !important; /* 빨간색 */
    color: white !important;
}

.cancel-button:hover {
    background-color: #dc2626 !important; /* 조금 더 진한 빨간색 */
}

.edit-mode {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    line-height: 1.6;
    font-size: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: border-color 0.3s;
    overflow: hidden; /* 스크롤바 제거 */
    resize: none; /* 수동 리사이징 비활성화 */
}

.edit-mode:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 오디오 플레이어 스타일 */
.audio-player {
    display: flex;
    align-items: center;
    gap: 10px;
}

.audio-player audio {
    flex: 1;
    height: 40px;
}

.audio-label {
    color: var(--text-color);
    font-size: 0.9em;
    white-space: nowrap;
}

/* 병합된 오디오 컨테이너 */
.merged-audio-container {
    margin: 0 0 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.merged-audio-container h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
    font-weight: 600;
}

.merged-audio-container audio {
    width: 100%;
    height: 40px;
}
.view-mode {
    white-space: pre-wrap;  /* 줄바꿈과 공백을 그대로 유지 */
    word-wrap: break-word;  /* 긴 단어가 있을 경우 자동으로 줄바꿈 */
    /* 추가 스타일 */
    font-family: 'KoPubWorld Dotum', sans-serif;
    padding: 5px;  
  }
  
/* 슬라이드 미리보기 이미지 효과 */
.slide-thumbnail {
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.transition-all{
    background-color: burlywood;
}

/* 애니메이션 효과 */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 추가할 CSS 스타일 */
/* 분석 방법 탭 스타일 */
.analysis-tabs {
    position: relative;
    padding: 0.5rem 0;
}

.tab-item {
    position: relative;
}

.tab-btn {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 40px;
}

/* 육각형 탭 스타일 */
.hexagon {
    position: absolute;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    transition: all 0.3s ease;
    z-index: 10;
}

.tab-btn.square-btn {
    position: relative;
    width: auto;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.square-btn .icon-wrapper {
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px; /* 아이콘과 텍스트 사이 간격 */
}

.square-btn .circle-icon {
    position: relative;
    left: 0;
    top: 0;
    transform: none;
    width: 24px;
    height: 24px;
}

/* 탭 텍스트 위치 조정 */
.tab-btn.square-btn .tab-text {
    position: relative;
    font-size: 0.85rem;
    white-space: nowrap;
    display: inline-block;
}

/* 비활성화된 체크 아이콘 색상 수정 */
.tab-btn:not(.active) .check-icon {
    background-color: #e2e8f0; /* 회색 배경 */
    border: 2px solid #cbd5e0; /* 연한 회색 테두리 */
}

.tab-btn:not(.active) .check-icon i {
    color: #a0aec0; /* 회색 아이콘 */
}

/* 호버 효과 향상 */
.tab-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 다른 탭 아이템들과의 간격 조정 */
.analysis-tabs {
    margin-bottom: 1.5rem;
}

/* 호버 효과 향상 */
.tab-btn.rounded-full:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.circle-btn .icon-wrapper {
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-btn .circle-icon {
    position: relative;
    left: 0;
    top: 0;
    transform: none;
}

.step-number {
    position: absolute;
    top: 0;
    transform: translateY(-50%);
    z-index: 10;
}
.step-number.step-1 {
    left: 30%; /* 왼쪽 말풍선과 동일 위치 */
    top: 2%;
    transform: translateX(-50%) translateY(-50%);
}

.step-number.step-2 {
    right: 30%; /* 오른쪽 말풍선과 동일 위치 */
    top: 2%;
    transform: translateX(50%) translateY(-50%);
}
.progress-container {
    position: relative;
    padding: 0 80px;
    margin-top: 30px;
    height: 180px;
}
.circle-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-icon i {
    color: #dd6b20; /* 오렌지 색상 */
    font-size: 0.8rem;
}

/* 둥근 탭 스타일 */
.tab-text {
    display: inline-block;
    text-align: center;
    position: relative;
    font-size: 0.85rem;
    letter-spacing: -0.02em;
    white-space: nowrap;
}



/* 둥근 버튼의 텍스트 위치 조정 */
.tab-btn.rounded-full .tab-text {
    flex: 1;
    text-align: center;
    margin-right: 20px; /* 체크 아이콘 공간 확보 */
}

/* 버튼 내부 요소 배치 개선 */
.tab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}


.tab-btn.rounded-full {
    border-radius: 999px;
    padding: 0.5rem 2rem;
    position: relative;
}

.check-icon {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-color: #dd6b20;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.check-icon i {
    color: white;
    font-size: 0.7rem;
}

/* 활성화된 탭 */
.tab-btn.active {
    font-weight: 600;
}

/* 비활성화된 체크 아이콘 (맥락기반 접근) */
.tab-btn:not(.active) .check-icon {
    background-color: transparent;
    border: 2px solid #90cdf4; /* 하늘색 테두리 */
}

/* 구분점 스타일 */
.tab-separator {
    color: #cbd5e0;
    font-size: 1rem;
    margin: 0 0.1rem;
}

/* 탭 상호작용 */
.tab-btn:hover:not(.hexagon) {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}


/* 반응형 디자인 */
@media (max-width: 768px) {
    .slide-content-wrapper {
        flex-direction: column;
    }
    
    .slide-preview, .slide-content-container {
        width: 100%;
    }
    
    .slide-preview {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 10px;
    }
    
    .results-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .floating-buttons {
        right: 10px;
        bottom: 10px;
    }
}
/* styles.css에 추가할 새로운 스타일 */

/* 학문적 옵션을 위한 스타일 */
.options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.options > div {
    min-width: 200px;
}



.academic-mode .slide-header {
    background-color: rgba(139, 92, 246, 0.1); /* 연한 보라색 배경 */
}

/* 분석 방식 선택시 시각적 표시 */
select.analysis-select option[value="academic"] {
    background-color: rgba(139, 92, 246, 0.1);
}

/* 업데이트된 선택 박스 스타일 */
.difficulty-select, .analysis-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}

/* 학문적 난이도를 위한 특별한 배지 */
.academic-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background-color: rgba(139, 92, 246, 0.2);
    color: #6d28d9;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* 반응형 조정 */
@media (max-width: 768px) {
    .options {
        flex-direction: column;
        align-items: stretch;
    }
    
    .options > div {
        width: 100%;
    }
}

.video-container {
    margin-bottom: 15px;
}

.video-player video {
    width: 100%;
    max-height: 300px;
    background-color: #000;
}

.full-video-container {
    margin: 0 0 30px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.full-video-container h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-weight: 600;
}

.full-video-container .video-wrapper {
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.video-buttons-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 비디오 썸네일 효과 */
.video-thumbnail {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.video-thumbnail::after {
    content: '\f04b';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background-color: rgba(0,0,0,0.6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.video-thumbnail:hover::after {
    opacity: 1;
    background-color: rgba(var(--primary-color-rgb), 0.8);
}

@media (max-width: 768px) {
    .video-buttons-group {
        margin-top: 10px;
        margin-left: 0;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .results-header .flex.gap-4 {
        flex-direction: column;
        width: 100%;
    }
}

.slide-header-right {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.generate-video-button {
    background-color: #28a745;
}

.generate-video-button:hover {
    background-color: #218838;
}

.generate-video-button.completed {
    background-color: #17a2b8;
}

.generate-video-button.completed:hover {
    background-color: #138496;
}

.generate-audio-button {
    background-color: #007bff; /* 기본 파란색 */
}

.generate-audio-button:hover {
    background-color: #0069d9; /* hover 시 조금 더 어두운 파란색 */
}

.generate-audio-button.completed {
    background-color: #6610f2; /* 완료 시 보라빛 파란색 */
}

.generate-audio-button.completed:hover {
    background-color: #520dc2; /* 완료 상태 hover 시 더 어두운 색 */
}

/* styles.css에 추가할 자막 관련 스타일 */

/* 자막 관련 스타일 */
.subtitles-download {
    display: flex;
    align-items: center;
}

.subtitles-download a {
    margin-left: 10px;
    transition: all 0.3s ease;
}

.subtitles-download a:hover {
    transform: translateY(-2px);
}

/* 오디오 플레이어 스타일 개선 */
.audio-player {
    margin-bottom: 15px;
}

.audio-player .audio-actions {
    display: flex;
    align-items: center;
}

.audio-player audio {
    width: 100%;
    height: 40px;
}

/* 비디오 플레이어에 자막 표시 */
video::cue {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 16px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    line-height: 1.5;
}

/* 비디오 플레이어 액션 버튼 스타일 */
.video-actions {
    display: flex;
    align-items: center;
}

.video-actions a {
    transition: all 0.3s ease;
}

.video-actions a:hover {
    transform: translateY(-2px);
}

/* 자막 아이콘 스타일 */
.fa-closed-captioning {
    margin-right: 4px;
}

/* 모던한 버튼 디자인 */
.action-button {
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    min-width: 150px;
}

.action-button:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.action-button:active {
    transform: translateY(0);
}

.action-button i {
    font-size: 1.125rem;
    margin-right: 0.5rem;
}

/* 결과 헤더 레이아웃 개선 */
.results-header {
    margin-bottom: 2rem;
}

/* 자막 다운로드 버튼 스타일 */
.subtitles-download a {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
    color: var(--primary-color);
}

.subtitles-download a:hover {
    background-color: rgba(0, 135, 247, 0.1);
}

/* 오디오/비디오 컨테이너 개선 */
.merged-audio-container, 
.full-video-container {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.merged-audio-container h3,
.full-video-container h3 {
    display: flex;
    align-items: center;
    color: #2563eb;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.merged-audio-container h3 i,
.full-video-container h3 i {
    margin-right: 0.5rem;
}

.video-wrapper {
    overflow: hidden;
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* 반응형 조정 */
@media (max-width: 768px) {
    .action-button {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

.action-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* 툴팁 스타일 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 220px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
    pointer-events: none;
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* 상태 표시 배지 */
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.5rem;
    white-space: nowrap;
}

.status-badge.pending {
    background-color: rgba(234, 179, 8, 0.2);
    color: rgb(161, 98, 7);
}

.status-badge.completed {
    background-color: rgba(16, 185, 129, 0.2);
    color: rgb(6, 95, 70);
}


.action-buttons-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 24px auto;
}

 /* 모바일 화면에서는 2열로 표시 */
 @media (max-width: 768px) {
    .action-buttons-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .uniform-button {
        min-width: 100%; /* 모바일에서는 전체 너비 사용 */
    }
}

/* 작은 화면에서는 1열로 표시 */
@media (max-width: 480px) {
    .action-buttons-container {
        grid-template-columns: 1fr;
    }
}

/* 통일된 버튼 스타일 */
.uniform-button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    min-width: 349px; /* 모든 버튼의 최소 너비 통일 */
    padding: 0 16px;
    font-size: 16px;
    font-weight: 500;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

/* 버튼 색상 변수는 상단 :root 로 통합됨 (중복 제거) */

/* 버튼 유형별 색상 */
.btn-script {
    background-color: var(--btn-script);
}

.btn-script:hover:not(:disabled) {
    background-color: var(--btn-script-hover);
}

.btn-audio {
    background-color: var(--btn-audio);
}

.btn-audio:hover:not(:disabled) {
    background-color: var(--btn-audio-hover);
}

.btn-video {
    background-color: var(--btn-video);
}

.btn-video:hover:not(:disabled) {
    background-color: var(--btn-video-hover);
}

.btn-merge {
    background-color: var(--btn-merge);
}

.btn-merge:hover:not(:disabled) {
    background-color: var(--btn-merge-hover);
}

/* 비활성화된 버튼 스타일 */
.uniform-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    box-shadow: none;
}

/* 버튼 아이콘 공통 스타일 */
.uniform-button i {
    font-size: 18px;
    margin-right: 10px;
}

/* 상태 뱃지 스타일 */
.btn-badge {
    position: absolute;
    left: 10px; /* 왼쪽으로 위치 이동 */
    top: 50%; /* 세로 중앙 정렬 */
    transform: translateY(-50%);
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background-color: white;
    color: #333;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    margin-right: 8px; /* 오른쪽 마진 추가 */
}

.btn-badge.ready {
    background-color: #22c55e; /* 초록색 배경 */
    color: white;
}

.btn-badge.pending {
    background-color: #f97316; /* 주황색 배경 */
    color: white;
}

/* 버튼 내부 스타일 */
.btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding-left: 20px; /* 배지를 위한 공간 확보 */
}

.btn-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 물결 효과 애니메이션 */
.uniform-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    opacity: 0;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.5s, opacity 0.3s;
}

.uniform-button:active:not(:disabled)::after {
    transform: scale(2);
    opacity: 1;
    transition: 0s;
}
/* regenerate 버튼 스타일 */
.regenerate-slide-button {
    background-color: #8b5cf6;  /* 보라색 */
}

.regenerate-slide-button:hover {
    background-color: #7c3aed;
}

.regenerate-slide-button.completed {
    background-color: #6d28d9;
}

.regenerate-status .spinner {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

/* 모달 애니메이션 */
.regenerate-modal {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.regenerate-slide-button {
    background-color: #ec4899 !important; /* pink-500 */
    color: white !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 0.375rem !important;
    display: flex !important;
    align-items: center !important;
    font-size: 0.875rem !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s !important;
}

.regenerate-slide-button:hover {
    background-color: #db2777 !important; /* pink-600 */
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* 상단 버튼 스타일 */
#download-script-btn, #unified-content-generation-btn {
    background-color: #fbcfe8; /* pink-200 */
    color: #111827; /* gray-900 */
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#download-script-btn:hover, #unified-content-generation-btn:hover {
    background-color: #f9a8d4; /* pink-300 */
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 진행 모달 애니메이션 */
#progress-modal {
    transition: opacity 0.3s ease;
}

#progress-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

#progress-modal:not(.hidden) {
    opacity: 1;
}

#progress-bar {
    transition: width 0.5s ease;
}

/* 이미지 확대 모달 스타일 */
.image-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.image-preview-modal.show {
    opacity: 1;
    visibility: visible;
}

.image-preview-content {
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
    position: relative;
}

.image-preview-img {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    margin: 0 auto;
}

.image-preview-close {
    position: absolute;
    top: -30px;
    right: 0;
    color: white;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
}

@keyframes zoomIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* 슬라이드 썸네일에 마우스 오버 효과 */
.slide-thumbnail {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.slide-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 모달이 열렸을 때 body 스크롤 방지 */
body.modal-open {
    overflow: hidden;
}

/* 진행 모달 UI 수정 */
#progress-modal #progress-percentage,
#progress-modal .w-full.bg-gray-200.rounded-full.h-3.overflow-hidden,
#progress-modal #progress-details {
    display: none !important;
}

/* 프로그레스 모달 스타일 개선 */
#progress-modal .max-w-md {
    max-width: 320px;
}

#progress-modal h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

#progress-modal .mb-4 {
    margin-bottom: 0.75rem;
}

/* ===== 제작 기록 모달 ===== */
.history-table tbody tr {
    cursor: pointer;
    transition: background-color 0.15s;
    border-bottom: 1px solid #f3f4f6;
}

.history-table tbody tr:hover {
    background-color: #fef2f2;
}

.history-table tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

.history-table tbody tr:nth-child(even):hover {
    background-color: #fef2f2;
}

.history-table td {
    padding: 10px 12px 10px 0;
    vertical-align: middle;
}

.history-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.history-badge-ppt { background-color: #fef3c7; color: #92400e; }
.history-badge-pdf { background-color: #dbeafe; color: #1e40af; }
.history-badge-completed { background-color: #d1fae5; color: #065f46; }
.history-badge-error { background-color: #fee2e2; color: #991b1b; }
.history-badge-processing { background-color: #fef9c3; color: #854d0e; }
.history-badge-academic { background-color: #ede9fe; color: #5b21b6; }
.history-badge-basic { background-color: #e0f2fe; color: #0369a1; }
.history-badge-intermediate { background-color: #fce7f3; color: #9d174d; }
.history-badge-advanced { background-color: #fecdd3; color: #9f1239; }

.history-content-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    font-size: 0.7rem;
}

.history-content-icon.active { color: #2563eb; }
.history-content-icon.inactive { color: #d1d5db; }

.history-filename {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}