@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
    /* 모던 인디고 & 블루 색상 팔레트 */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #e0e7ff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --bg-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.9);
    --border-color: rgba(226, 232, 240, 0.8);

    /* 상태 색상 지정 */
    --status-missing: #94a3b8;      /* 미등록 (회색) */
    --status-uploaded: #3b82f6;     /* 검토대기 (파란색) */
    --status-request-edit: #ef4444; /* 수정요청 (빨간색) */
    --status-completed: #10b981;    /* 검토완료 (초록색) */
    
    /* 그림자 및 효과 */
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --hover-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    /* 은은한 그라데이션 배경 추가 */
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: var(--text-main);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Glassmorphism 컨테이너 */
.container {
    max-width: 1100px;
    margin: 3rem auto;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    overflow: hidden;
    transition: all 0.3s ease;
}

.header {
    background: linear-gradient(to right, var(--primary), #818cf8);
    color: white;
    padding: 2rem 2.5rem;
    position: relative;
    overflow: hidden;
}

.header::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    transform: rotate(30deg);
}

.header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.content {
    padding: 2.5rem;
}

/* 폼 스타일 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* 툴바 및 필터 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    background: rgba(248, 250, 252, 0.7);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.radio-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-left: 1rem;
    align-items: center;
}

.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: white;
    transition: all 0.2s ease;
}

.radio-label:has(input[type="radio"]:checked) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.radio-label input[type="radio"] {
    display: none;
}

/* 버튼 스타일 (Dynamic Hover) */
.btn {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    color: white;
    background: var(--primary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(99, 102, 241, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    white-space: nowrap; 
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(99, 102, 241, 0.3);
}

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

.btn-danger {
    background: var(--status-request-edit);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}
.btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 6px 12px rgba(239, 68, 68, 0.3);
}

.btn-success {
    background: var(--status-completed);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}
.btn-success:hover {
    background: #059669;
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.3);
}

.btn-warning {
    background: #f59e0b;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}
.btn-warning:hover {
    background: #d97706;
}

.btn-secondary {
    background: var(--text-muted);
}

/* 뱃지(상태) 스타일 */
.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    display: inline-block;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.badge-missing { background: var(--status-missing); }
.badge-uploaded { background: var(--status-uploaded); }
.badge-request-edit { background: var(--status-request-edit); }
.badge-completed { background: var(--status-completed); }

/* 세련된 탭 스타일 */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
    gap: 2rem;
}

.tab {
    padding: 1rem 0.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-muted);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
}

.tab:hover {
    color: var(--primary-hover);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content { display: none; }
.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease forwards;
}

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

/* 리스트 아이템 스타일 (모던 카드형 리스트) */
.list-item {
    display: flex;
    align-items: center; 
    flex-wrap: wrap;
    padding: 0.8rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 0.6rem;
    gap: 1rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.list-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
    border-color: rgba(99, 102, 241, 0.3);
}

.list-item .id-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 90px;
}

.list-item .id-col .file-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.list-item .text-col {
    flex: 1 1 300px; /* 텍스트 영역이 충분한 공간을 차지하도록 보장 */
    font-size: 1.05rem;
    min-width: 250px;
}

.list-item .text-col > div:first-child {
    font-weight: 500;
    margin-bottom: 0.2rem;
    word-break: keep-all; 
}

.meta-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    gap: 10px;
    align-items: center;
}

.list-item .audio-col {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.list-item .action-col {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap; /* 버튼이 많으면 줄바꿈 허용 */
    justify-content: flex-end;
    flex-shrink: 0;
}

/* 오디오 플레이어 */
audio {
    height: 32px;
    width: 330px;
    outline: none;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

audio::-webkit-media-controls-panel {
    background-color: var(--bg-color);
}

/* 프로그레스 바 */
.progress-container {
    background: var(--border-color);
    border-radius: 10px;
    height: 12px;
    width: 100%;
    margin: 1rem 0;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #818cf8);
    width: 0%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
}

/* 피드백 영역 디자인 개선 */
.feedback-box {
    margin-top: 12px;
    padding: 12px 16px;
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    border-radius: 4px 8px 8px 4px;
    color: #991b1b;
    font-size: 0.95rem;
}

/* 모바일 반응형 */
@media screen and (max-width: 768px) {
    .container {
        margin: 1rem;
        border-radius: 12px;
    }
    .header {
        padding: 1.5rem;
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }
    .tabs {
        gap: 0;
    }
    .tab {
        flex: 1;
        text-align: center;
        padding: 0.8rem 0.5rem;
        font-size: 1rem;
    }
    .list-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    .list-item .id-col {
        width: 100%;
        text-align: left;
    }
    .list-item .action-col {
        flex-direction: column;
        width: 100%;
    }
    .list-item .action-col .btn {
        width: 100%;
    }
    audio {
        width: 100%;
    }
}