@import url("https://cdn.jsdelivr.net/npm/pretendard/dist/web/static/pretendard.css");

/* ===========================================================
   BlueCaption - 시안 2 / Modern Card
   영역별로 구분해 직접 수정하기 쉬운 CSS
   =========================================================== */

/* 01. 공통 색상과 기본값 */
:root {
    --navy: #082852;
    --navy-dark: #061d41;
    --blue: #1879f2;
    --blue-light: #eaf4ff;
    --border: #dde7f3;
    --text: #152e4c;
    --muted: #6a7f99;
    --bg: #f3f7fc;
    --white: #ffffff;
    --radius: 16px;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: "Pretendard", "Pretendard Variable", "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", Arial, sans-serif; color: var(--text); background: var(--bg); font-size: 14px; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.hidden { display: none !important; }
.container { width: min(1200px, calc(100% - 44px)); margin: 0 auto; }

/* 02. 상단 네비게이션 */
.site-header { height: 74px; color: white; background: var(--navy-dark); border-bottom: 1px solid rgba(255,255,255,.1); }
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { color: white; font-size: 23px; font-weight: 800; letter-spacing: -.8px; display: flex; gap: 11px; align-items: center; }
.brand-icon { width: 35px; height: 35px; display: grid; place-items: center; background: #f5faff; color: #116cda; border-radius: 10px; font-size: 18px; }
.top-links { display: flex; align-items: center; gap: 27px; }
.top-links a { font-size: 13px; color: #d8e6fa; transition: color .15s; }
.top-links a:hover { color: white; }
.nav-account { padding-left: 22px; border-left: 1px solid #315277; font-weight: 700; }

/* 03. 시안 2 - 짙은 남색 히어로 */
.hero { position: relative; overflow: hidden; color: white; background: linear-gradient(113deg, #071d42 0%, #073771 55%, #0758ab 100%); }
.hero-inner { min-height: 255px; display: flex; align-items: center; justify-content: space-between; position: relative; }
.hero-copy { position: relative; z-index: 1; padding: 33px 0 60px; }
.hero-eyebrow { display: inline-block; color: #82c7ff; font-size: 12px; letter-spacing: 3px; font-weight: bold; margin-bottom: 13px; }
.hero h1 { margin: 0 0 13px; font-size: clamp(26px, 3.2vw, 40px); line-height: 1.37; letter-spacing: -1.6px; }
.hero p { margin: 0; color: #bcd9f6; font-size: 14px; }
.globe { flex-shrink: 0; width: 280px; height: 280px; border-radius: 50%; position: relative; margin-right: 65px; margin-bottom: -30px; background: radial-gradient(circle at 32% 30%, #62baff 0%, #1472d7 39%, #0d386e 73%, #07274c 100%); border: 1px solid #58b3fa; box-shadow: 0 0 0 13px rgba(45,150,250,.09), 0 0 60px rgba(15,153,255,.35), inset -22px -15px 35px rgba(2,25,58,.6); }
.globe::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: repeating-linear-gradient(0deg,transparent 0 30px,rgba(194,235,255,.28) 31px,transparent 32px), repeating-linear-gradient(90deg, transparent 0 44px, rgba(194,235,255,.23) 45px, transparent 46px); clip-path: circle(49%); }
.globe::after { content: ""; position: absolute; width: 340px; height: 108px; border: 1px solid rgba(142,217,255,.6); border-radius: 50%; top: 78px; left: -30px; transform: rotate(-23deg); }
.lang-bubble { position: absolute; z-index: 2; padding: 7px 13px; background: #edf8ff; color: #1868c4; font-size: 13px; font-weight: 800; border-radius: 8px; box-shadow: 0 5px 18px #001c4680; }
.lang-en { top: 19px; left: -35px; } .lang-ko { top: 96px; right: -51px; } .lang-jp { bottom: 29px; left: -41px; } .lang-fr { bottom: 37px; right: -27px; }

/* 04. 메인 2열 배치 */
.main-layout { display: grid; grid-template-columns: minmax(0,1fr) 290px; gap: 18px; margin-top: -27px; margin-bottom: 60px; position: relative; z-index: 3; align-items: start; }
.card { background: white; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: 0 9px 26px rgba(12,49,99,.055); }
.workspace { padding: 20px; }
.panel-title { margin: 0; font-size: 19px; color: var(--navy); letter-spacing: -.5px; }
.panel-desc { color: var(--muted); margin: 7px 0 0; line-height: 1.7; font-size: 12px; }

/* 05. 영상 업로드 */
.drop-zone { min-height: 212px; border: 2px dashed #61aaff; border-radius: 13px; display: flex; align-items: center; justify-content: center; text-align: center; flex-direction: column; margin-top: 5px; background: #fcfeff; transition: background .2s, border-color .2s; padding: 22px; }
.drop-zone.over { background: #eaf5ff; border-color: #0876ed; }
.upload-symbol { color: #177cf5; font-size: 48px; line-height: 1; margin-bottom: 13px; }
.drop-zone strong { font-size: 16px; margin-bottom: 8px; }
.drop-zone small { color: var(--muted); font-size: 12px; line-height: 1.7; }
.primary-btn { border: none; border-radius: 9px; display: inline-flex; gap: 6px; justify-content: center; align-items: center; background: linear-gradient(90deg,#1378e8,#2869ea); color: white; font-weight: 700; padding: 12px 19px; }
.primary-btn:hover { filter: brightness(1.06); }
.primary-btn:disabled { cursor: not-allowed; opacity: .55; }
.outline-btn { color: #2864a9; border: 1px solid #bbd5f0; border-radius: 8px; background: #f8fbff; padding: 9px 14px; font-weight: 700; }
.drop-zone .primary-btn { margin-top: 15px; }
.tip { color: var(--muted); font-size: 12px; margin: 10px 0 0; }
.progress { padding: 13px 18px; background: #eaf3ff; border-radius: 9px; color: #0e5fae; font-size: 13px; margin-top: 13px; }

/* 06. 영상 목록 (시안 2 카드형) */
.list-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 25px 0 14px; }
.count { color: #197cef; font-size: 12px; margin-left: 7px; padding: 4px 9px; background: #e6f2ff; border-radius: 20px; }
.list-actions { display: flex; gap: 8px; }
.video-list { display: flex; flex-direction: column; gap: 11px; }
.video-card { padding: 12px; border-radius: 12px; border: 1px solid var(--border); display: flex; gap: 15px; align-items: center; background: white; }
.video-thumb { position: relative; width: 150px; min-width: 150px; height: 88px; background: linear-gradient(135deg,#184e8b,#9cccff); border-radius: 9px; overflow: hidden; display: grid; place-items: center; color: white; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-thumb .no-image { font-size: 35px; opacity: .8; }
.video-body { flex: 1; min-width: 0; }
.video-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.video-name { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 700; font-size: 14px; }
.video-meta { font-size: 12px; color: var(--muted); margin: 8px 0; }
.video-action { color: #1a70d8; font-size: 12px; font-weight: 700; }
.status { font-size: 11px; border-radius: 5px; padding: 5px 8px; flex-shrink: 0; background: #e8f1ff; color: #2368bc; }
.status.queued, .status.processing { background: #e3f2ff; color: #0876e4; }
.status.completed { background: #dff8e9; color: #16804b; }
.status.failed { background: #fee8e8; color: #bd4444; }
.empty-state { display: flex; align-items: center; text-align: center; flex-direction: column; justify-content: center; min-height: 245px; background: linear-gradient(180deg,#f9fcff,#f3f7fc); border: 1px solid #e7eef8; border-radius: 13px; }
.empty-icon { font-size: 45px; color: #b5c6da; margin-bottom: 12px; }
.empty-state strong { font-size: 16px; }
.empty-state p { color: var(--muted); margin: 8px; font-size: 13px; }

/* 07. 오른쪽 내 정보 패널 */
.sidebar { padding: 17px; }
.sidebar-heading { font-size: 17px; margin: 0 0 15px; color: var(--navy); }
.profile-card { border-radius: 11px; background: #f2f7fe; padding: 14px; display: flex; align-items: center; gap: 12px; }
.avatar { display: grid; place-items: center; width: 43px; height: 43px; flex-shrink: 0; border-radius: 50%; background: #d7e8fa; color: #4782c5; font-size: 23px; }
.profile-card strong { display: block; margin-bottom: 4px; }
.profile-card small { color: #6b80a0; display: block; max-width: 165px; overflow: hidden; text-overflow: ellipsis; }
.point-card { margin-top: 14px; background: linear-gradient(140deg,#1693f3 0%,#1667e1 55%,#3922bd 100%); border-radius: 12px; color: white; padding: 18px 16px 15px; }
.point-card small { color: #d5e6ff; font-size: 12px; }
.point-total { font-size: 29px; font-weight: 800; margin: 5px 0 15px; }
.point-total span { font-size: 14px; margin-left: 5px; }
.charge-btn { width: 100%; padding: 12px 10px; border: 0; border-radius: 8px; background: white; color: #1759c5; font-weight: 800; display: inline-block; text-align: center; }
.account-menu { padding-top: 12px; }
.account-menu a { min-height: 44px; display: flex; align-items: center; gap: 11px; padding: 12px 5px; color: #526985; font-size: 13px; border-bottom: 1px solid #ecf1f7; }
.account-menu a:hover { color: #1669d8; }
.account-menu a span { margin-left: auto; color: #8ba1bd; }

/* 08. 로그인 / 회원가입 / 상세 / 계정 / 결제 */
.inner-page { margin: 40px auto 80px; }
.form-page { max-width: 470px; }
.page-heading { font-size: 25px; letter-spacing: -.5px; margin: 0 0 8px; }
.page-lead { color: var(--muted); margin: 0 0 25px; }
.form-card { padding: 28px; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.form-row input, .form-row select { width: 100%; padding: 12px 13px; border: 1px solid #ccd8e9; border-radius: 8px; outline: none; background: white; }
.form-row input:focus, .form-row select:focus { border-color: #2281e9; }
.full-btn { width: 100%; }
.form-foot { text-align: center; margin-top: 20px; color: var(--muted); }
.form-foot a { color: #1875db; font-weight: 700; }
.social-links { display: flex; gap: 10px; margin-top: 20px; }
.social-links button { width: 50%; padding: 12px; border: 1px solid #dee7ef; border-radius: 8px; background: #f5f8fc; color: #556985; font-weight: 700; }
.social-links button:disabled { opacity: .65; cursor: not-allowed; }
.info-note { padding: 13px 15px; background: #edf5ff; border-radius: 8px; color: #597495; line-height: 1.7; font-size: 12px; margin: 16px 0 0; }
.message { padding: 13px 16px; border-radius: 10px; background: #e9f6ec; color: #25764a; margin-bottom: 16px; line-height: 1.6; }
.message.error { background: #fff0f0; color: #c33345; }
.two-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.detail-card { padding: 25px; }
.detail-top { display: flex; gap: 20px; margin-bottom: 22px; align-items: center; }
.detail-preview { width: 205px; height: 120px; flex-shrink: 0; background: #cbdcf0; border-radius: 12px; object-fit: cover; }
.detail-preview-placeholder { width: 205px; height: 120px; background: linear-gradient(135deg,#0e4989,#61acec); border-radius: 12px; display: grid; place-items: center; color: white; font-size: 45px; }
.detail-title { margin: 0 0 12px; font-size: 20px; overflow-wrap: anywhere; }
.detail-meta { color: var(--muted); margin: 6px 0; }
.text-heading { font-size: 17px; margin: 0 0 18px; }
.inline-info { background: #f5f9fe; padding: 14px 17px; margin-bottom: 17px; border-radius: 10px; }
.inline-info strong { color: #0a5aba; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin: 20px 0; }
.plan { border: 1px solid #b6d3fa; border-radius: 11px; padding: 20px 8px; text-align: center; background: #f8fbff; }
.plan strong { color: #1769dc; font-size: 19px; display: block; }
.plan span { color: var(--muted); margin-top: 5px; display: block; }
.history-line { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid #e9eff7; color: #5d718a; }
.history-line strong { color: #254f87; }
.notice { background: #fff9e9; color: #866519; font-size: 13px; padding: 15px; border-radius: 9px; line-height: 1.7; }
.site-footer { text-align: center; color: #92a2b8; padding: 12px 0 32px; font-size: 12px; }

/* 09. 모바일 화면 */
@media (max-width: 900px) {
    .globe { margin-right: 20px; width: 210px; height: 210px; }
    .main-layout { grid-template-columns: 1fr; }
    .top-links { gap: 15px; }
    .sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
    .sidebar-heading { grid-column: 1/-1; margin-bottom: 0; }
    .point-card { margin-top: 0; }
    .account-menu { grid-column: 1/-1; padding-top: 0; }
}
@media (max-width: 620px) {
    .container { width: calc(100% - 26px); }
    .top-links { gap: 10px; }
    .top-links a:nth-child(2), .top-links a:nth-child(3) { display: none; }
    .brand { font-size: 19px; }
    .hero-inner { min-height: 220px; }
    .hero-copy { padding-bottom: 56px; }
    .hero h1 { font-size: 26px; }
    .globe { display: none; }
    .main-layout { margin-top: -20px; }
    .workspace { padding: 14px; }
    .sidebar { display: block; }
    .point-card { margin-top: 14px; }
    .video-thumb { width: 107px; min-width: 107px; height: 80px; }
    .video-card { gap: 10px; }
    .video-name { max-width: 150px; }
    .two-cards, .plan-grid { grid-template-columns: 1fr; }
    .detail-top { display: block; }
    .detail-preview, .detail-preview-placeholder { margin-bottom: 16px; }
}

/* 10. 실제 API 영상 목록 행 스타일 */
.video-row {
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 113px;
    padding: 12px;
    color: #152e4c;
    background: white;
    border: 1px solid #dde7f3;
    border-radius: 11px;
    transition: border-color .2s, background .2s;
}
.video-row:hover {
    background: #f8fbff;
    border-color: #81b7f2;
}
.video-row .video-thumb {
    font-size: 29px;
}
.video-info {
    flex: 1;
    min-width: 0;
}
.video-info strong {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 14px;
    margin-bottom: 8px;
}
.video-info small {
    display: block;
    color: #72849c;
    font-size: 12px;
}
.video-status {
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 700;
    color: #216bc1;
    background: #e6f1ff;
    border-radius: 6px;
}
@media (max-width: 620px) {
    .video-row {
        gap: 10px;
    }
    .video-status {
        max-width: 85px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

button, input, select, textarea { font-family: inherit; }


/* 10. 회원 전용 자막 재생성 화면 */
.translation-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.regen-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.history-table {
    border-top: 1px solid #dce8f5;
}
.history-row {
    display: grid;
    grid-template-columns: 175px 1fr 160px;
    gap: 12px;
    padding: 13px 6px;
    border-bottom: 1px solid #e9eff8;
    align-items: center;
}
.history-row span {
    color: #657d9a;
    font-size: 12px;
}
@media (max-width: 760px) and (min-width: 681px) {
    .translation-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 680px) {
    .translation-options,
    .regen-info-grid,
    .history-row {
        grid-template-columns: 1fr;
    }
}


/* 10. 동영상 업로드 상태: 점선 업로드 박스 중앙에 표시 */
.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.drop-zone.is-uploading {
    background: #f0f7ff;
    border-color: #3893ff;
}

.drop-zone.is-uploading .drop-zone-content {
    display: none;
}

.upload-progress {
    width: 100%;
    max-width: 520px;
    margin: 0;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #133b73;
}

.upload-progress-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
    border-radius: 14px;
    background: #dbeeff;
    color: #1379f2;
    font-size: 27px;
    font-weight: 800;
}

.upload-progress strong {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.5;
}

.upload-progress-percent {
    display: block;
    font-size: 27px;
    font-weight: 800;
    margin: 6px 0 9px;
    color: #0873ea;
    font-variant-numeric: tabular-nums;
}

.upload-progress-track {
    width: 100%;
    height: 16px;
    overflow: hidden;
    background: #cbdff7;
    border-radius: 20px;
    box-shadow: inset 0 1px 3px rgba(4, 35, 85, .12);
}

.upload-progress-fill {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #198cfa, #2259e5);
    transition: width .12s linear;
}

/* 실제 전송 이벤트 전 준비 상태는 움직이는 무늬로만 표시 */
.upload-progress-track.is-preparing .upload-progress-fill {
    width: 100% !important;
    background: repeating-linear-gradient(110deg, #d4e8ff 0, #d4e8ff 16px, #aed4ff 16px, #aed4ff 32px);
    background-size: 64px 100%;
    animation: upload-preparing 1s linear infinite;
}

@keyframes upload-preparing {
    from { background-position: 0 0; }
    to { background-position: 64px 0; }
}

.upload-progress-info {
    margin-top: 11px;
    font-size: 12px;
    color: #59789d;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

/* 11. 자막·재생 추가 UI */
.detail-preview-button{position:relative;display:block;flex-shrink:0;width:205px;height:120px;padding:0;border:0;border-radius:12px;overflow:hidden;cursor:pointer;background:transparent}
.detail-preview-button:disabled{cursor:not-allowed}
.detail-preview-button .detail-preview,.detail-preview-button .detail-preview-placeholder{width:100%;height:100%;margin:0}
.preview-play-icon{position:absolute;inset:0;display:grid;place-items:center;color:white;text-shadow:0 2px 8px #000;font-size:28px;background:rgba(0,0,0,.06)}
.detail-preview-button:hover .preview-play-icon{background:rgba(0,0,0,.25)}
.detail-link{color:#1675dc;font-size:13px;font-weight:700}
.subtitle-heading-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.subtitle-heading-row .text-heading{margin:0}
.subtitle-list{display:flex;flex-direction:column;gap:9px}
.subtitle-track{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;background:#f5f9ff;border:1px solid #d9e7f8;border-radius:10px}
.subtitle-track-title{font-size:13px;font-weight:700;color:#183e70}
.subtitle-track-flag{font-size:11px;color:#5a7694;margin-top:4px}
.subtitle-track-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.subtitle-track-actions button,.subtitle-track-actions a{background:white;border:1px solid #c4d9f4;border-radius:7px;padding:8px 10px;color:#1468cc;font-size:12px;font-weight:700;cursor:pointer;white-space:nowrap}
.subtitle-track-actions button:disabled,.subtitle-track-actions a.disabled{opacity:.45;pointer-events:none}
.subtitle-track-actions button.active{background:#1376e7;color:white;border-color:#1376e7}
.subtitle-jobs{margin-top:14px;font-size:12px;color:#657c96;line-height:1.8}
#detail-player-wrapper{margin-bottom:17px}
.video-modal{position:fixed;inset:0;z-index:2000;display:flex;justify-content:center;align-items:center;padding:20px;background:rgba(4,17,39,.79)}
.video-modal-panel{width:min(100%,1060px);max-height:95vh;overflow-y:auto;border-radius:14px;background:#fff;padding:16px;box-shadow:0 18px 60px rgba(0,0,0,.28)}
.modal-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.modal-heading strong{font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.modal-heading button{border:0;background:#eef3fa;border-radius:7px;padding:8px 12px;cursor:pointer;font-size:19px}
.modal-note{color:#667b98;font-size:12px;margin:10px 0 0}
body.modal-open{overflow:hidden}
@media(max-width:640px){.subtitle-track{align-items:flex-start;flex-direction:column}.detail-preview-button{margin-bottom:16px}}

/* 네이버 회원가입·로그인 버튼 */
.social-links .naver-social-link {
    display: block;
    flex: 1;
    min-width: 0;
    width: auto;
    padding: 12px 16px;
    border: 1px solid #03a94a;
    border-radius: 8px;
    background: #03c75a;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}
.social-links .naver-social-link:hover { background: #03ae50; color: #ffffff; }

.social-links button { flex: 1; width: auto; }
