:root {
    --primary: #00E676;
    --primary-dark: #00C853;
    --ai-accent: #D1C4E9;
    --ai-glow: #7C4DFF;
    --danger: #FF5252;
    --bg-dark: #000000;
    --surface: transparent;
    --text-main: #F5F5F7;
    --text-muted: #A1A1A6;
    --border: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; margin: 0; padding: 0; }

body {
    font-family: 'Pretendard', -apple-system, system-ui, sans-serif;
    background-color: #000;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    letter-spacing: -0.01em;
}

/* 플로팅 라인 배경 (최하단) */
#floating-lines-container {
    position: fixed;
    inset: 0;
    z-index: 0;
    mix-blend-mode: screen;
    pointer-events: none;
}

header, main, footer, .auth-modal {
    position: relative;
    z-index: 1;
}

.container {
    display: none;
    flex-direction: column;
    padding: 1.5rem 2.5%;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    gap: 1rem;
}
.container.active { display: flex; }

#youtube-container {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* 공통 컨테이너 속성 (비카드 요소는 투명 유지) */
.dashboard-header, .dashboard-footer {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* Glassmorphism 카드 스타일 (자막 영역 + AI 노트 영역) */
.card {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    padding: 1rem 1.25rem;
    transition: background 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}
.card:hover {
    background: rgba(30, 30, 30, 0.7);
    border-color: rgba(255, 255, 255, 0.15);
}

/* 상단바 - 콘텐츠 영역과 정렬 일치 */
.topbar {
    background: transparent;
    padding: 1.5rem 0;
    border-bottom: 1px solid transparent;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background 0.3s ease, border-color 0.3s ease, padding 0.3s ease, backdrop-filter 0.3s ease;
}

.topbar.scrolled {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.topbar-inner { max-width: 100%; margin: 0 auto; padding: 0 2.5%; display: flex; justify-content: space-between; align-items: center; }

.brand { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.brand-mark {
    color: var(--text-main);
    font-weight: 300;
    font-size: 1.5rem;
}
.brand-copy h1 { font-size: 1.4rem; font-weight: 500; letter-spacing: -0.02em; }

.app-nav { display: flex; gap: 2.5rem; }
.nav-item {
    cursor: pointer;
    font-weight: 400;
    color: var(--text-main);
    font-size: 1rem;
    transition: 0.2s;
    opacity: 0.7;
}
.nav-item:hover { opacity: 1; }
.nav-item.active { opacity: 1; font-weight: 600; }

.topbar-actions { display: flex; align-items: center; gap: 1.5rem; }
.status-badge { font-size: 0.9rem; font-weight: 400; display: flex; align-items: center; gap: 8px; opacity: 0.8; }
.status-dot { display: none; } /* 심플함을 위해 제거 */

.volume-meter { display: flex; align-items: center; gap: 12px; }
.v-bar { display: none; } /* 바 대신 퍼센트만 표시 */
.meter-value { font-size: 0.9rem; font-weight: 400; min-width: 36px; text-align: right; opacity: 0.8; }

.top-language-select {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    font-style: italic;
    opacity: 0.9;
}

/* 초미니멀리즘 프로필 아이콘 */
.profile-icon-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s;
    margin-left: 1rem;
}
.profile-icon-btn:hover { transform: scale(1.1); }

/* 대시보드 헤더 3열 정렬 */
.dashboard-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: start;
    padding: 0.5rem 0;
}

.dash-left {
    display: flex; flex-direction: column; gap: 0.85rem;
    align-items: flex-start;
    justify-self: start;
}
.dash-center {
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
}
.dash-right {
    display: flex; flex-direction: column; gap: 0.85rem;
    align-items: flex-end;
    justify-self: end;
}

.selector-item { display: flex; align-items: center; gap: 1.5rem; }
.selector-item label { 
    font-size: 0.9rem; 
    font-weight: 400;
    color: var(--text-main); 
    margin-bottom: 0; 
    min-width: 80px;
}

/* 입력창 미니멀 스타일 */
.custom-input, select {
    background: transparent;
    color: var(--text-main);
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding: 4px 8px;
    border-radius: 0;
    outline: none;
    font-size: 0.9rem;
    transition: 0.2s;
    appearance: none;
    -webkit-appearance: none;
}
.custom-input:focus, select:focus { border-bottom-color: var(--primary); }

.selector-inline { display: flex; align-items: center; gap: 1rem; }

/* 중앙 자막 시작 버튼 - 초미니멀 텍스트 온리 */
.btn-hero-start {
    background: transparent;
    color: #fff;
    border: none;
    padding: 0;
    font-size: 2.2rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.3s;
    min-width: auto;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    letter-spacing: 0.05em;
}
.btn-hero-start:hover { transform: scale(1.02); text-shadow: 0 0 25px rgba(255, 255, 255, 0.8); }
.btn-hero-start .icon { display: none; }

.btn-hero-stop {
    display: none;
    background: transparent;
    color: #FF5252;
    border: none;
    padding: 0;
    font-size: 2.2rem;
    font-weight: 800;
    text-shadow: 0 0 15px rgba(255, 82, 82, 0.4);
    cursor: pointer;
}
.btn-hero-stop .icon { display: none; }
body.recording .btn-hero-start { display: none; }
body.recording .btn-hero-stop { display: flex; }

.share-links { display: flex; gap: 1.5rem; align-items: center; }
.btn-text-only {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
    padding: 0;
    opacity: 0.8;
}
.btn-text-only:hover { opacity: 1; text-decoration: underline; }
.btn-text-only.small { font-size: 0.75rem; color: var(--primary); }

.api-helper-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

/* 콘텐츠 그리드 - 설정 카드 닫히면 위로 올라감 */
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; flex: 1; margin-top: 0; margin-bottom: 3rem; height: 95vh; }
.content-grid .card { height: 100%; }
.settings-card.collapsed + .premium-card { margin-top: -1rem; }

.card-header { 
    padding: 0 0 0.5rem 0; 
    border-bottom: 1px solid rgba(255,255,255,0.1); 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
}
.card-header h3 { font-size: 1.05rem; font-weight: 500; color: #fff; }

.header-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 50%;
}
.header-icon {
    font-size: 1.1rem;
}
.lesson-input-header {
    border: none !important;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.15) !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    padding: 2px 4px !important;
    color: #fff !important;
    background: transparent !important;
    outline: none !important;
    width: 100%;
}
.lesson-input-header:focus {
    border-bottom-color: var(--primary) !important;
}

.scroll-area { 
    flex: 1; 
    padding: 1rem 0; 
    overflow-y: auto; 
    height: 0; 
    line-height: 1.8;
}

#youtube-text { 
    font-size: var(--caption-size, 1.25rem); 
    color: var(--caption-color, #fff); 
    background-color: var(--caption-bg, transparent);
    font-weight: 300; 
    opacity: 0.9; 
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
}

.btn-pip, .btn-ai-generate {
    background: transparent;
    color: var(--primary);
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
}
.btn-pip:hover { text-decoration: underline; }

/* 통합 설정 카드 - Glassmorphism (API + 자막 스타일 가로 배치) */
.settings-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    padding: 1.25rem 1.5rem;
    margin-top: 0;
    transition: opacity 0.3s ease, max-height 0.4s ease, margin 0.3s ease, padding 0.3s ease;
    overflow: hidden;
    max-height: 500px;
    opacity: 1;
}
.settings-card.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0 1.5rem;
    margin: 0;
    border-width: 0;
    pointer-events: none;
}
.settings-card:hover:not(.collapsed) {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* 내부 컬럼 - 개별 설정 영역은 투명하게 */
.settings-col .api-settings,
.settings-col .settings-panel {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

.api-summary { display: none; }
.api-detail { display: block !important; }
.selector-box { display: flex; flex-direction: column; gap: 1rem; }
.checkbox-row { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }

/* AI 설정 패널 (강의노트/질문 영역) - 접기 */
.ai-settings.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0 0;
    margin: 0;
    border: none;
    overflow: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, max-height 0.3s ease, padding 0.3s ease, margin 0.3s ease;
}
.ai-settings:not(.collapsed) {
    max-height: 300px;
    opacity: 1;
    padding: 1rem 0;
    margin: 0.5rem 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    pointer-events: auto;
    transition: opacity 0.25s ease, max-height 0.3s ease, padding 0.3s ease, margin 0.3s ease;
}

/* 하단 푸터 - 기록/공유 두 그룹 */
.dashboard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 2rem;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-right-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-footer {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 0;
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
    transition: color 0.2s;
}
.btn-footer:hover { color: var(--text-main); }

.txt-btn {
    color: var(--primary);
    font-weight: 600;
    font-size: 1rem;
}
.txt-btn:hover { color: var(--primary-dark); }

.more-btn {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    padding: 4px 10px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    transition: all 0.2s;
}
.more-btn:hover {
    color: var(--text-main);
    border-color: rgba(255,255,255,0.3);
}

/* 확장 메뉴 (SRT/VTT/PDF/공유/QR) */
.footer-extras {
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: opacity 0.25s ease, max-width 0.3s ease, padding 0.3s ease;
    overflow: hidden;
    max-width: 400px;
    opacity: 1;
}
.footer-extras.collapsed {
    max-width: 0;
    opacity: 0;
    padding: 0;
    pointer-events: none;
}
.footer-extras .btn-footer {
    white-space: nowrap;
}
.footer-extras .qr-box-mini {
    display: inline-flex;
    margin: 0;
}

#toast { 
    position: fixed; 
    top: 40px; 
    left: 50%; 
    transform: translateX(-50%) translateY(-20px); 
    background: rgba(0,0,0,0.8); 
    color: #fff;
    padding: 12px 24px; 
    border-radius: 8px; 
    font-weight: 400;
    opacity: 0; 
    transition: all 0.4s; 
    z-index: 2000;
    border: 1px solid rgba(255,255,255,0.2);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 스크롤바 숨기기 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

/* 공통 모달 스타일 (기존 modal이 있다면 재사용, 없으면 정의) */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 40px;
    max-width: 480px;
    width: 90%;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}
.modal-overlay.active .modal-content {
    transform: translateY(0);
}
.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}
.modal-close:hover { color: #fff; }

/* 공유 모달 전용 스타일 */
.share-modal-content h2 {
    margin-top: 0;
    font-size: 1.6rem;
    color: #fff;
    font-weight: 700;
}
.modal-desc {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 30px;
}
#modal-qr-container {
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    display: inline-block;
    margin-bottom: 30px;
}
#modal-qr-image {
    width: 220px;
    height: 220px;
    display: block;
}
.share-url-box {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 12px;
}
#modal-share-url {
    flex: 1;
    background: none;
    border: none;
    color: #00E676;
    padding: 0 12px;
    font-size: 0.9rem;
    outline: none;
}
.btn-copy-main {
    background: #00E676;
    color: #000;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}
.btn-copy-main:hover { transform: scale(1.05); }
.modal-hint {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

/* 모바일 대응 */
@media (max-width: 900px) {
    .dashboard-header { grid-template-columns: 1fr; gap: 2rem; }
    .content-grid { grid-template-columns: 1fr; gap: 2rem; height: auto; }
    .card { height: 92vh; }
    .topbar-inner { flex-direction: column; gap: 1rem; }
    .app-nav { gap: 1rem; flex-wrap: wrap; justify-content: center; }
}

/* 프리미엄 알림 카드 */
.premium-card {
    background: rgba(0, 176, 255, 0.05);
    border: 1px solid rgba(0, 176, 255, 0.15);
    padding: 10px 20px;
    border-radius: 12px;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}
.premium-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.premium-icon {
    font-size: 1.5rem;
}
.premium-title {
    color: #fff;
    font-weight: 700;
}
.premium-desc {
    color: rgba(255, 255, 255, 0.6);
    margin-left: 12px;
}
.btn-upgrade-action {
    background: #00B0FF;
    color: #000;
    border: none;
    padding: 8px 20px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-upgrade-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 176, 255, 0.3);
}
.premium-card.attention {
    border-color: #FF5252 !important;
    background: rgba(255, 82, 82, 0.1) !important;
    animation: pulse-attention 1.5s infinite alternate;
}
@keyframes pulse-attention {
    0% { box-shadow: 0 0 5px rgba(255, 82, 82, 0.2); }
    100% { box-shadow: 0 0 15px rgba(255, 82, 82, 0.6); }
}

/* 채팅 컨테이너 및 인풋 박스 스타일 */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-input-box {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 10px;
    margin-top: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    align-items: center;
}
.chat-input-box:focus-within {
    border-color: #00B0FF;
    box-shadow: 0 0 10px rgba(0, 176, 255, 0.15);
}
#chat-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    padding: 4px 2px;
}
#chat-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}
.btn-send {
    background: #00B0FF;
    color: #000;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-send:hover {
    background: #0091EA;
    transform: scale(1.02);
}
.btn-send:active {
    transform: scale(0.98);
}

/* 말풍선 스타일 */
.chat-bubble-user {
    align-self: flex-end;
    background: rgba(0, 176, 255, 0.12);
    border: 1px solid rgba(0, 176, 255, 0.25);
    color: #fff;
    padding: 10px 14px;
    border-radius: 16px 16px 4px 16px;
    max-width: 80%;
    margin-bottom: 12px;
    word-break: break-all;
    animation: fadeInBubble 0.25s ease forwards;
    margin-left: auto;
    text-align: left;
}

.chat-bubble-ai {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 14px;
    border-radius: 16px 16px 16px 4px;
    max-width: 85%;
    margin-bottom: 12px;
    line-height: 1.6;
    animation: fadeInBubble 0.25s ease forwards;
    text-align: left;
}

.chat-bubble-ai-meta {
    font-size: 0.75rem;
    color: #00E676;
    font-weight: bold;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

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

/* 하단 글로벌 푸터 디자인 */
footer {
    text-align: center;
    padding: 2.5rem 0;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 10;
}
.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.35);
}
.footer-link {
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}
.footer-link:hover {
    color: #00B0FF;
    text-decoration: underline;
}
.footer-separator {
    color: rgba(255, 255, 255, 0.15);
    user-select: none;
}

/* ==========================================================================
   자막 오버레이 모드 (Caption Focus / Horizontal Strip Mode)
   ========================================================================== */
body.caption-focus {
    background: #050508 !important;
}

/* 화면 최소화를 위해 헤더, 푸터, AI카드, 배경 파티클, 설정 컬럼 등을 숨김 */
body.caption-focus .dashboard-header,
body.caption-focus footer,
body.caption-focus .premium-card,
body.caption-focus .ai-card,
body.caption-focus #floating-background,
body.caption-focus .settings-col {
    display: none !important;
}

/* 그리드를 1열로 축소하고 전체 화면을 채움 */
body.caption-focus .content-grid {
    grid-template-columns: 1fr !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
}

/* 자막 카드가 브라우저 창 전체를 채우도록 설정 (배경색/투명도는 설정 슬라이더와 실시간 연동) */
body.caption-focus .transcript-card {
    height: 100% !important;
    width: 100% !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0.5rem 1.5rem !important;
    background: var(--caption-bg, rgba(20, 20, 20, 0.45)) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    justify-content: center;
    position: relative;
}

/* 오버레이 상태에서 조작 버튼(원래대로, PIP, 비우기 등)은 우측 상단에 작게 배치하고,
   마우스 오버시에만 투명도를 밝혀서 자막 감상 시 집중도를 해치지 않음 */
body.caption-focus .transcript-card .card-header {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    position: absolute;
    top: 8px;
    right: 15px;
    z-index: 100;
    opacity: 0.15;
    transition: opacity 0.25s ease;
    background: transparent !important;
}
body.caption-focus .transcript-card:hover .card-header {
    opacity: 1;
}

/* 헤더 제목("📺 수업명 입력" 등)은 오버레이 모드에서 제거 */
body.caption-focus .transcript-card .card-header .header-title-group {
    display: none !important;
}

/* 스크롤 영역을 세로/가로로 완벽히 정렬하고 스크롤바를 보이지 않게 처리 */
body.caption-focus .transcript-card .scroll-area {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100% !important;
    padding: 1.5rem 0 !important;
    overflow-y: auto;
    scrollbar-width: none !important; /* Firefox용 */
}
body.caption-focus .transcript-card .scroll-area::-webkit-scrollbar {
    display: none !important; /* Chrome, Edge용 */
}

/* 자막 텍스트의 크기와 대비를 높여 다양한 화면 위에서 명확하게 보이도록 최적화 */
body.caption-focus #youtube-text {
    width: 100%;
    text-align: center;
    font-size: calc(var(--caption-size, 1.4rem) * 1.25) !important;
    color: var(--caption-color, #FFEB3B) !important;
    background: transparent !important;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.95);
    font-weight: 600;
    line-height: 1.6;
}

body.caption-focus #interim-text {
    width: 100%;
    text-align: center;
    font-size: calc(var(--caption-size, 1.4rem) * 1.25) !important;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.95);
    font-weight: 500;
    line-height: 1.6;
}

/* ==========================================================================
   로그인 모달 3D 및 네온 비주얼 효과
   ========================================================================== */
#auth-modal .modal-content {
    background: linear-gradient(135deg, #141416 0%, #1c1c22 100%);
    border: 1px solid rgba(0, 176, 255, 0.25);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 176, 255, 0.08);
}

.floating-3d-image {
    width: 130px;
    height: 130px;
    border-radius: 24px;
    box-shadow: 0 12px 35px rgba(0, 176, 255, 0.3);
    animation: float3D 6s ease-in-out infinite;
    border: 1px solid rgba(255, 255, 255, 0.15);
    object-fit: cover;
    margin-bottom: 5px;
    background: radial-gradient(circle, rgba(0, 176, 255, 0.2) 0%, transparent 70%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

.floating-3d-image:hover {
    transform: scale(1.08) rotate(5deg) translateY(-5px);
    box-shadow: 0 20px 45px rgba(0, 176, 255, 0.55);
}

@keyframes float3D {
    0% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-12px) rotate(3deg);
    }
    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

/* 네비게이션 로그인 버튼 3D 아바타 스타일 */
.btn-pip-avatar {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    outline: none;
    transition: transform 0.3s ease;
}

.mypage-avatar-3d {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

/* --- TIER SPECIFIC STYLES --- */

/* Guest (로그아웃 / 비회원) */
.btn-pip-avatar[data-tier="guest"] .mypage-avatar-3d {
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}
.btn-pip-avatar[data-tier="guest"]:hover .mypage-avatar-3d {
    transform: scale(1.1) rotate(8deg);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.35), 0 0 0 6px rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.75);
}

/* Free (일반 로그인 회원) */
.btn-pip-avatar[data-tier="free"] .mypage-avatar-3d {
    border: 3px solid rgba(0, 176, 255, 0.4);
    box-shadow: 0 0 18px rgba(0, 176, 255, 0.3);
}
.btn-pip-avatar[data-tier="free"]:hover .mypage-avatar-3d {
    transform: scale(1.1) rotate(8deg);
    box-shadow: 0 0 30px rgba(0, 176, 255, 0.75), 0 0 0 6px rgba(0, 176, 255, 0.15);
    border-color: rgba(0, 176, 255, 0.95);
}

/* Premium (개인 프리미엄 회원 - 골드 컨셉) */
.btn-pip-avatar[data-tier="premium"] .mypage-avatar-3d {
    border: 3px solid rgba(255, 215, 0, 0.6);
    box-shadow: 0 0 22px rgba(255, 215, 0, 0.35);
}
.btn-pip-avatar[data-tier="premium"]:hover .mypage-avatar-3d {
    transform: scale(1.1) rotate(8deg);
    box-shadow: 0 0 35px rgba(255, 215, 0, 0.8), 0 0 0 6px rgba(255, 215, 0, 0.18);
    border-color: rgba(255, 215, 0, 0.95);
}

/* Team (팀/워크그룹 회원 - 바이올렛/마젠타 컨셉) */
.btn-pip-avatar[data-tier="team"] .mypage-avatar-3d {
    border: 3px solid rgba(224, 64, 251, 0.6);
    box-shadow: 0 0 22px rgba(224, 64, 251, 0.35);
}
.btn-pip-avatar[data-tier="team"]:hover .mypage-avatar-3d {
    transform: scale(1.1) rotate(8deg);
    box-shadow: 0 0 35px rgba(224, 64, 251, 0.8), 0 0 0 6px rgba(224, 64, 251, 0.18);
    border-color: rgba(224, 64, 251, 0.95);
}

.btn-pip-avatar:active .mypage-avatar-3d {
    transform: scale(0.95);
}


