/* ═══════════════════════════════════════════════
   LMS 영상교육시스템 - 깔끔한 흰색 교육 디자인
   모바일 반응형 (PC 전체화면 사용)
   ═══════════════════════════════════════════════ */

/* ─── Video Speed Controller 확장 프로그램 차단 ─── */
.vsc-controller,
div[class*="vsc-"],
div[data-vsc] {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
}

/* ─── 화면 캡처/복사 방지 ─── */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif;
    font-size: 15px;
    color: #1F2937;
    background: #FFFFFF;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: #2563EB;
    text-decoration: none;
}
a:hover {
    color: #1d4ed8;
}

/* ─── Layout ─── */
.lms-wrapper {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.lms-header {
    background: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    padding: 0 30px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.lms-header .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    min-width: 0;
}

.lms-header .logo img {
    height: 34px;
    object-fit: contain;
    flex-shrink: 0;
}

.lms-header .logo .logo-title {
    font-size: 17px;
    font-weight: 700;
    color: #1F2937;
    letter-spacing: -0.3px;
    white-space: nowrap;
    line-height: 1.2;
}

.lms-header .user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: #6B7280;
}

.lms-header .user-info .user-name {
    font-weight: 600;
    color: #1F2937;
}

.lms-header .btn-home {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    background: #F9FAFB;
    color: #374151;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.lms-header .btn-home:hover {
    background: #EFF6FF;
    border-color: #BFDBFE;
    color: #2563EB;
}

.lms-header .btn-logout {
    padding: 7px 18px;
    background: #F9FAFB;
    color: #374151;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.lms-header .btn-logout:hover {
    background: #F3F4F6;
    border-color: #D1D5DB;
    color: #1F2937;
}

/* ─── 세션 타이머 ─── */
.session-timer {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #15803D;
    font-variant-numeric: tabular-nums;
    margin-left: 8px;
}
.session-timer svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}
.session-timer.warning {
    background: #FFFBEB;
    border-color: #FDE68A;
    color: #B45309;
}
.session-timer.danger {
    background: #FEF2F2;
    border-color: #FECACA;
    color: #DC2626;
    animation: timer-blink 1s ease-in-out infinite;
}
@keyframes timer-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
/* 모바일 메뉴 내 타이머 */
.mobile-menu .session-timer-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    margin: 0 16px 8px;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #15803D;
    font-variant-numeric: tabular-nums;
}
.mobile-menu .session-timer-mobile.warning {
    background: #FFFBEB;
    border-color: #FDE68A;
    color: #B45309;
}
.mobile-menu .session-timer-mobile.danger {
    background: #FEF2F2;
    border-color: #FECACA;
    color: #DC2626;
}
/* 모바일 메뉴 내 타이머 설명 */
.session-timer-desc {
    margin: 0 16px 8px;
    padding: 0;
    font-size: 11px;
    color: #9CA3AF;
    text-align: center;
    line-height: 1.4;
}

/* ─── 햄버거 메뉴 (모바일) ─── */
.hamburger-btn {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    cursor: pointer;
    color: #374151;
    flex-shrink: 0;
    transition: all 0.2s;
}
.hamburger-btn:hover {
    background: #F3F4F6;
}
.hamburger-btn svg {
    width: 20px;
    height: 20px;
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: #fff;
    border-bottom: 1px solid #E5E7EB;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    padding: 12px 16px;
    z-index: 99;
    flex-direction: column;
    gap: 8px;
}
.mobile-menu.open {
    display: flex;
}
.mobile-menu-user {
    font-size: 14px;
    color: #374151;
    font-weight: 600;
    padding: 8px 0;
    border-bottom: 1px solid #F3F4F6;
}
.mobile-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 4px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.15s;
}
.mobile-menu a:hover {
    background: #F3F4F6;
}
.mobile-menu a svg {
    width: 18px;
    height: 18px;
    color: #6B7280;
    flex-shrink: 0;
}

.lms-content {
    flex: 1;
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* ─── Login Page ─── */
.login-container {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #EEF2FF 0%, #F0F9FF 50%, #F5F3FF 100%);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.login-container::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.login-card {
    width: 100%;
    max-width: 480px;
    background: #FFFFFF;
    border-radius: 24px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.04);
    padding: 52px 48px 44px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.login-card .login-logo-img {
    margin-bottom: 28px;
}

.login-card .login-logo-img img {
    max-width: 240px;
    height: auto;
}

.login-card h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.login-card .login-subtitle {
    font-size: 14.5px;
    color: #9CA3AF;
    margin-bottom: 32px;
}

.login-card .form-group {
    margin-bottom: 16px;
    text-align: left;
}

.login-card .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.login-card .input-wrap {
    position: relative;
}

.login-card .input-wrap .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #9CA3AF;
    pointer-events: none;
}

.login-card .input-wrap input {
    width: 100%;
    padding: 13px 16px 13px 42px;
    border: 1.5px solid #E5E7EB;
    border-radius: 10px;
    font-size: 15px;
    color: #1F2937;
    transition: all 0.2s;
    outline: none;
    background: #F9FAFB;
}

.login-card .input-wrap input:focus {
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    background: #FFFFFF;
}

.login-card .input-wrap input::placeholder {
    color: #C0C5CE;
}

.login-card .btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 12px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    letter-spacing: 0.02em;
}
.login-card .btn-login:hover {
    background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}
.login-card .btn-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.login-card .error-msg {
    color: #DC2626;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
    text-align: center;
    padding: 10px 16px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 8px;
}

.browser-warning {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 16px;
    background: #FEF3C7;
    border: 1px solid #FDE68A;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 12px;
    color: #92400E;
    line-height: 1.5;
    text-align: left;
}
.browser-warning svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: #D97706;
}

.login-notice {
    margin-top: 28px;
    padding: 16px 20px;
    background: #F0F9FF;
    border: 1px solid #BAE6FD;
    border-radius: 10px;
    text-align: center;
}

.login-notice p {
    font-size: 12.5px;
    color: #0369A1;
    line-height: 1.7;
    margin: 0;
}

.login-card .login-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #F3F4F6;
    text-align: center;
}

.login-card .login-footer p {
    font-size: 12px;
    color: #9CA3AF;
    margin: 0 0 8px 0;
}

.login-copyright {
    font-size: 11px !important;
    color: #B0B8C4 !important;
    line-height: 1.7;
    margin-top: 10px !important;
}

/* ─── Dashboard ─── */
.dashboard-title {
    font-size: 24px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.video-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.25s;
    margin-bottom: 20px;
}
.video-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border-color: #D1D5DB;
}

/* 가로 레이아웃: 썸네일 왼쪽 + 정보 오른쪽 */
.card-layout {
    display: flex;
    align-items: stretch;
}

.card-thumb {
    width: 360px;
    min-width: 360px;
    position: relative;
    background: #0F172A;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-thumb .thumb-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 200px;
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    color: #475569;
    gap: 12px;
}

.card-thumb .thumb-placeholder svg {
    width: 48px;
    height: 48px;
    opacity: 0.5;
}

.card-thumb .thumb-placeholder span {
    font-size: 13px;
    opacity: 0.6;
}

.card-thumb .thumb-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.card-thumb .thumb-badge.completed {
    background: rgba(16, 185, 129, 0.9);
    color: #fff;
}

.card-thumb .thumb-badge.watching {
    background: rgba(37, 99, 235, 0.9);
    color: #fff;
}

.card-info {
    flex: 1;
    padding: 28px;
    min-width: 0;
}

.video-card .card-body {
    padding: 28px;
}

.video-card .card-title {
    font-size: 20px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.video-card .card-desc {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 20px;
    line-height: 1.7;
}

.video-card .card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #9CA3AF;
}

.video-card .progress-wrap {
    width: 100%;
    margin-bottom: 20px;
}

.video-card .progress-bar-bg {
    width: 100%;
    height: 8px;
    background: #F3F4F6;
    border-radius: 4px;
    overflow: hidden;
}

.video-card .progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563EB, #3B82F6);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.video-card .progress-text {
    font-size: 12px;
    color: #6B7280;
    margin-top: 6px;
    text-align: right;
}

.video-card .card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.btn-watch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}
.btn-watch:hover {
    background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%);
    color: #fff;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}
.btn-watch.disabled {
    background: #E5E7EB;
    color: #9CA3AF;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
}

.badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.badge-success {
    background: #ECFDF5;
    color: #059669;
}
.badge-warning {
    background: #FFFBEB;
    color: #D97706;
}
.badge-danger {
    background: #FEF2F2;
    color: #DC2626;
}
.badge-info {
    background: #EFF6FF;
    color: #2563EB;
}

.badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ─── Stats Grid (Dashboard) ─── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.stat-card {
    background: #F9FAFB;
    border: 1px solid #F3F4F6;
    border-radius: 14px;
    padding: 20px 16px;
    text-align: center;
    transition: all 0.2s;
}
.stat-card:hover {
    background: #F3F4F6;
    border-color: #E5E7EB;
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}
.stat-card .stat-icon svg {
    width: 22px;
    height: 22px;
}

.stat-icon-time { background: #EFF6FF; color: #2563EB; }
.stat-icon-done { background: #ECFDF5; color: #059669; }
.stat-icon-wait { background: #FFFBEB; color: #D97706; }
.stat-icon-cal { background: #F5F3FF; color: #7C3AED; }

.stat-card .stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-size: 12px;
    color: #9CA3AF;
    line-height: 1.4;
}

/* Circle Progress */
.circle-progress {
    width: 100px;
    height: 100px;
    position: relative;
    margin: 0 auto 8px;
}
.circle-progress svg {
    width: 100%;
    height: 100%;
    transform: scaleX(-1);
}
.circle-progress .circle-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: baseline;
    gap: 1px;
}
.circle-progress .circle-percent {
    font-size: 28px;
    font-weight: 800;
    color: #1F2937;
    line-height: 1;
}
.circle-progress .circle-unit {
    font-size: 14px;
    font-weight: 600;
    color: #6B7280;
}

/* Card Bottom */
.card-bottom {
    border-top: 1px solid #F3F4F6;
    padding-top: 20px;
}

.card-bottom .progress-wrap {
    margin-bottom: 16px;
}

/* ─── Footer ─── */
.lms-footer {
    text-align: center;
    padding: 28px 20px;
    border-top: 1px solid #F3F4F6;
    margin-top: auto;
}

.lms-footer .footer-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 6px;
}

.lms-footer .footer-logo {
    height: 22px;
    opacity: 0.45;
    vertical-align: middle;
}

.lms-footer .footer-title {
    font-size: 13px;
    font-weight: 600;
    color: #9CA3AF;
    letter-spacing: -0.3px;
    line-height: 22px;
    vertical-align: middle;
}

.lms-footer p {
    font-size: 12px;
    color: #9CA3AF;
}

/* ─── Player Footer ─── */
.player-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 30px;
    border-top: 1px solid #F3F4F6;
    font-size: 12px;
    color: #9CA3AF;
}

/* Player Header Center */
.player-header-center {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.player-header .player-logo {
    height: 38px;
    object-fit: contain;
    flex-shrink: 0;
}

.player-logo-title {
    font-size: 18px;
    font-weight: 700;
    color: #1F2937;
    white-space: nowrap;
    letter-spacing: -0.3px;
    flex-shrink: 0;
}

.player-header-divider {
    color: #D1D5DB;
    font-size: 20px;
    font-weight: 300;
    margin: 0;
    flex-shrink: 0;
}

/* ─── Player Page ─── */
.player-wrapper {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.player-header {
    background: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    padding: 0 30px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    position: relative;
}

.player-header .back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6B7280;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    background: none;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.player-header .back-btn:hover {
    color: #1F2937;
    background: #F3F4F6;
}

.player-header .video-title {
    font-size: 18px;
    font-weight: 600;
    color: #1F2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.player-header .watch-status {
    font-size: 14px;
    color: #6B7280;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.player-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.player-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #6B7280;
}
.player-user-name {
    font-weight: 600;
    color: #1F2937;
}
.player-btn-logout {
    padding: 6px 14px;
    background: #F9FAFB;
    color: #374151;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}
.player-btn-logout:hover {
    background: #F3F4F6;
    border-color: #D1D5DB;
    color: #1F2937;
}

/* 플레이어 햄버거 메뉴 (모바일) */
.player-hamburger-btn {
    display: none;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    cursor: pointer;
    color: #374151;
    flex-shrink: 0;
    transition: all 0.2s;
}
.player-hamburger-btn:hover {
    background: #F3F4F6;
}
.player-hamburger-btn svg {
    width: 18px;
    height: 18px;
}

.player-mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: #fff;
    border-bottom: 1px solid #E5E7EB;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    padding: 12px 16px;
    z-index: 99;
    flex-direction: column;
    gap: 6px;
}
.player-mobile-menu.open {
    display: flex;
}
.player-mobile-menu-user {
    font-size: 14px;
    color: #374151;
    font-weight: 600;
    padding: 6px 0;
    border-bottom: 1px solid #F3F4F6;
}
/* player 모바일 메뉴 내 세션 타이머 */
.player-mobile-menu .session-timer-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    margin: 0 0 6px;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #15803D;
    font-variant-numeric: tabular-nums;
}
.player-mobile-menu .session-timer-mobile.warning {
    background: #FFFBEB; border-color: #FDE68A; color: #B45309;
}
.player-mobile-menu .session-timer-mobile.danger {
    background: #FEF2F2; border-color: #FECACA; color: #DC2626;
}
.player-mobile-menu-watch {
    font-size: 12px;
    color: #6B7280;
    padding: 4px 0 6px;
    border-bottom: 1px solid #F3F4F6;
}
.player-mobile-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 4px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.15s;
}
.player-mobile-menu a:hover {
    background: #F3F4F6;
}
.player-mobile-menu a svg {
    width: 18px;
    height: 18px;
    color: #6B7280;
    flex-shrink: 0;
}

/* 영상 정보 박스 */
.player-info-box {
    background: #F8FAFC;
    border-bottom: 1px solid #E2E8F0;
    padding: 14px 24px;
}
.pib-title {
    font-size: 15px;
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 4px;
}
.pib-desc {
    font-size: 12px;
    color: #64748B;
    margin-bottom: 10px;
    line-height: 1.4;
}
.pib-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
}
.pib-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}
.pib-label {
    color: #94A3B8;
    white-space: nowrap;
}
.pib-value {
    color: #334155;
    font-weight: 600;
    white-space: nowrap;
}
.pib-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}
.pib-badge-done {
    background: #D1FAE5;
    color: #065F46;
}
.pib-badge-yet {
    background: #FEE2E2;
    color: #991B1B;
}

.player-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.player-video-wrap {
    width: 75%;
    max-width: 980px;
    margin: 0 auto;
    position: relative;
}

.player-video-wrap .video-ratio {
    position: relative;
    padding-top: 56.25%; /* 16:9 */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.player-video-wrap .video-ratio iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* 영상 워터마크 로고 */
.video-watermark {
    position: absolute;
    top: 5%;
    right: 4%;
    z-index: 10;
    pointer-events: none;
    opacity: 0.9;
}
.video-watermark img {
    width: 144px;
    height: auto;
    display: block;
    filter: brightness(0) invert(1);
}

/* 영상 접속자 정보 (왼쪽 상단) */
.video-user-info {
    position: absolute;
    top: 5%;
    left: 4%;
    z-index: 10;
    pointer-events: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* 전체화면 시 video-ratio가 풀스크린 컨테이너 */
.video-ratio:fullscreen {
    padding-top: 0;
    width: 100%;
    height: 100%;
    background: #000;
}
.video-ratio:fullscreen iframe {
    width: 100%;
    height: 100%;
}
.video-ratio:fullscreen .video-watermark {
    position: absolute;
    top: 5%;
    right: 4%;
    z-index: 9999;
}
.video-ratio:fullscreen .video-user-info {
    position: absolute;
    top: 5%;
    left: 4%;
    z-index: 9999;
    font-size: 13px;
}
.video-ratio:-webkit-full-screen {
    padding-top: 0;
    width: 100%;
    height: 100%;
    background: #000;
}
.video-ratio:-webkit-full-screen iframe {
    width: 100%;
    height: 100%;
}
.video-ratio:-webkit-full-screen .video-watermark {
    position: absolute;
    top: 5%;
    right: 4%;
    z-index: 9999;
}
.video-ratio:-webkit-full-screen .video-user-info {
    position: absolute;
    top: 5%;
    left: 4%;
    z-index: 9999;
    font-size: 13px;
}

.player-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 16px 4px;
    font-size: 14px;
    color: #6B7280;
}
.remaining-time {
    font-size: 13px;
    font-weight: 600;
    color: #2563EB;
}

.btn-fullscreen {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #1F2937;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-fullscreen:hover {
    background: #111827;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* 전체화면 상태: video-ratio 배경 검정 */
.video-ratio:-webkit-full-screen {
    background: #000;
    border-radius: 0;
}
.video-ratio:fullscreen {
    background: #000;
    border-radius: 0;
}

/* ─── iOS 가짜 전체화면 (Fullscreen API 미지원 대응) ─── */

.ios-fs-body {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    background: #000 !important;
}
.video-ratio.ios-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important; /* fallback */
    height: 100dvh !important; /* iOS 동적 뷰포트 높이 */
    z-index: 99999 !important;
    padding-top: 0 !important;
    background: #000 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    transform: none !important;
    max-width: none !important;
    max-height: none !important;
    box-shadow: none !important;
}
.video-ratio.ios-fullscreen iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}
.video-ratio.ios-fullscreen .video-watermark {
    position: absolute;
    top: 5%;
    right: 4%;
    z-index: 100000;
}
.video-ratio.ios-fullscreen .video-user-info {
    position: absolute;
    top: 5%;
    left: 4%;
    z-index: 100000;
    font-size: 13px;
}
/* iOS 전체화면 축소 버튼 */
.ios-fs-close-btn {
    position: fixed;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    right: calc(12px + env(safe-area-inset-right, 0px));
    z-index: 100001;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.ios-fs-close-btn:active {
    background: rgba(255, 255, 255, 0.2);
}

/* ─── Half-check Modal ─── */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 44px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-box .modal-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 30px;
}

.modal-box .modal-icon.warning {
    background: #FFFBEB;
    color: #D97706;
}
.modal-box .modal-icon.success {
    background: #ECFDF5;
    color: #059669;
}

.modal-box h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.modal-box p {
    font-size: 15px;
    color: #6B7280;
    margin-bottom: 24px;
    line-height: 1.7;
}

.modal-box .countdown {
    font-size: 48px;
    font-weight: 700;
    color: #EF4444;
    margin-bottom: 20px;
    font-variant-numeric: tabular-nums;
}

.modal-box .btn-confirm {
    display: inline-block;
    padding: 16px 48px;
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}
.modal-box .btn-confirm:hover {
    background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.modal-box .btn-attendance {
    display: inline-block;
    padding: 20px 60px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    animation: pulse 2s infinite;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}
.modal-box .btn-attendance:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3); }
    50% { box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3), 0 0 0 12px rgba(16, 185, 129, 0); }
}

/* ─── Floating Scroll Top Button ─── */
.btn-scroll-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 44px;
    height: 44px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.3s;
    z-index: 200;
    color: #6B7280;
}
.btn-scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.btn-scroll-top:hover {
    background: #2563EB;
    border-color: #2563EB;
    color: #fff;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .card-thumb {
        width: 280px;
        min-width: 280px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .lms-header {
        padding: 0 16px;
        height: 56px;
        position: relative;
    }
    .lms-header .logo {
        gap: 8px;
    }
    .lms-header .logo img {
        height: 28px;
    }
    .lms-header .logo .logo-title {
        font-size: 15px;
    }
    .lms-header .user-info {
        display: none;
    }
    .hamburger-btn {
        display: flex;
    }
    .lms-content {
        padding: 20px 16px;
    }
    .login-card {
        padding: 40px 28px 32px;
        margin: 16px;
        border-radius: 20px;
        max-width: 100%;
    }
    .login-card .login-logo-img img {
        max-width: 190px;
    }
    .login-card h1 {
        font-size: 20px;
    }
    .login-card .login-subtitle {
        font-size: 13.5px;
        margin-bottom: 24px;
    }
    .login-notice {
        margin-top: 20px;
        padding: 12px 16px;
    }
    .login-notice p {
        font-size: 12px;
    }
    .login-card .login-footer {
        margin-top: 24px;
        padding-top: 18px;
    }
    .dashboard-title {
        font-size: 20px;
        margin-bottom: 16px;
    }
    /* 모바일: 세로 스택 */
    .card-layout {
        flex-direction: column;
    }
    .card-thumb {
        width: 100%;
        min-width: 100%;
        max-height: 220px;
    }
    .card-thumb .thumb-placeholder {
        min-height: 160px;
    }
    .card-info {
        padding: 20px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .circle-progress {
        width: 80px;
        height: 80px;
    }
    .circle-progress .circle-percent {
        font-size: 22px;
    }
    .stat-card .stat-value {
        font-size: 16px;
    }
    .video-card .card-body {
        padding: 20px;
    }
    .video-card .card-title {
        font-size: 17px;
    }
    .player-header {
        padding: 0 12px;
        height: 48px;
        position: relative;
    }
    .player-header .back-btn {
        display: none;
    }
    .player-header .video-title {
        font-size: 14px;
    }
    .player-header .player-logo {
        height: 26px;
    }
    .player-logo-title {
        font-size: 14px;
    }
    .player-header-divider {
        font-size: 16px;
    }
    .player-header-right {
        display: none;
    }
    .player-hamburger-btn {
        display: flex;
    }
    .player-header .watch-status {
        font-size: 11px;
    }
    .player-info-box {
        padding: 12px 16px;
    }
    .player-container {
        flex: none;
        padding: 10px;
    }
    .player-video-wrap {
        width: 100%;
    }
    .player-video-wrap .video-ratio {
        border-radius: 8px;
    }
    .video-watermark {
        top: 5%;
        right: 4%;
    }
    .video-watermark img {
        width: 90px;
    }
    .video-user-info {
        font-size: 10px;
    }
    .player-footer {
        flex-direction: column;
        gap: 4px;
        padding: 10px 16px;
        text-align: center;
    }
    .modal-box {
        padding: 32px 24px;
        border-radius: 16px;
    }
    .modal-box h2 {
        font-size: 18px;
    }
    .modal-box .countdown {
        font-size: 36px;
    }
    .modal-box .btn-confirm {
        padding: 14px 36px;
        font-size: 16px;
    }
    .modal-box .btn-attendance {
        padding: 16px 40px;
        font-size: 18px;
    }
    .player-info-bar {
        flex-wrap: wrap;
        gap: 8px;
    }
    .btn-fullscreen {
        padding: 10px 18px;
        font-size: 14px;
        margin-left: auto;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 32px 20px 28px;
        margin: 12px;
        border-radius: 16px;
    }
    .login-card .login-logo-img {
        margin-bottom: 20px;
    }
    .login-card .login-logo-img img {
        max-width: 160px;
    }
    .login-card h1 {
        font-size: 18px;
    }
    .login-card .login-subtitle {
        font-size: 13px;
        margin-bottom: 20px;
    }
    .login-notice {
        margin-top: 16px;
        padding: 10px 14px;
    }
    .login-notice p {
        font-size: 11.5px;
    }
    .login-card .login-footer {
        margin-top: 20px;
        padding-top: 16px;
    }
    .login-copyright {
        font-size: 10.5px !important;
    }
    .card-thumb {
        max-height: 180px;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .stat-card {
        padding: 14px 10px;
    }
    .circle-progress {
        width: 70px;
        height: 70px;
    }
    .circle-progress .circle-percent {
        font-size: 20px;
    }
    .stat-card .stat-value {
        font-size: 14px;
    }
    .stat-card .stat-label {
        font-size: 11px;
    }
    .video-card .card-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-watch {
        justify-content: center;
    }
    .player-header-center {
        gap: 6px;
    }
    .player-header .player-logo {
        display: none;
    }
    .player-logo-title,
    .player-header-divider {
        display: none;
    }
}

/* ═══════════════════════════════════════════════
   자격증 카드 그리드 (대시보드)
   ═══════════════════════════════════════════════ */

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.cert-card {
    display: block;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06), 0 2px 12px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: #1F2937;
    border: 1px solid #F3F4F6;
    cursor: pointer;
}
.cert-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    color: #1F2937;
}
.cert-card.cert-expired {
    opacity: 0.6;
}
.cert-card.cert-disabled {
    opacity: 0.55;
    cursor: pointer;
}
.cert-card.cert-disabled:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.cert-card-locked {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #9CA3AF;
    margin-top: 8px;
}

/* 상태 뱃지 */
.cert-status-locked {
    background: rgba(107, 114, 128, 0.9);
    color: #fff;
}
.cert-status-expired {
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
}
.cert-status-done {
    background: rgba(16, 185, 129, 0.9);
    color: #fff;
}
.cert-status-progress {
    background: rgba(37, 99, 235, 0.9);
    color: #fff;
}
.cert-status-wait {
    background: rgba(217, 119, 6, 0.9);
    color: #fff;
}
.cert-card-img {
    position: relative;
    width: 100%;
    height: 160px;
    background: #F3F4F6;
    overflow: hidden;
}
.cert-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cert-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #9CA3AF;
    gap: 8px;
    background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
}
.cert-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.cert-badge-done {
    background: #10B981;
    color: #fff;
}
.cert-badge-progress {
    background: rgba(37,99,235,0.9);
    color: #fff;
}

.cert-card-body {
    padding: 16px;
}
.cert-card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.3;
}
.cert-card-desc {
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 10px;
    line-height: 1.4;
}
.cert-card-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 10px;
}
.cert-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #6B7280;
}

.cert-card-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.cert-progress-bar {
    flex: 1;
    height: 6px;
    background: #E5E7EB;
    border-radius: 3px;
    overflow: hidden;
}
.cert-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563EB, #3B82F6);
    border-radius: 3px;
    transition: width 0.3s;
}
.cert-progress-text {
    font-size: 12px;
    font-weight: 600;
    color: #2563EB;
    min-width: 32px;
    text-align: right;
}

.cert-card-period {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #9CA3AF;
}
.cert-period-expired {
    color: #EF4444;
    font-weight: 600;
    margin-left: 4px;
}

/* ═══════════════════════════════════════════════
   코스 상세 페이지 (course.php)
   ═══════════════════════════════════════════════ */

.course-header {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid #F3F4F6;
}
.course-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}
.course-desc {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 16px;
}
.course-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.course-sequential-notice {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 8px 14px;
    background: #FEF3C7;
    color: #92400E;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
}
.course-stat-period {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.course-stat-expired {
    background: #FEE2E2 !important;
    border-color: #FECACA !important;
    color: #991B1B !important;
}
.course-stat {
    font-size: 13px;
    color: #6B7280;
    padding: 4px 12px;
    background: #F9FAFB;
    border-radius: 20px;
    border: 1px solid #E5E7EB;
}
.course-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    font-size: 14px;
    font-weight: 600;
    color: #2563EB;
}
.course-progress-bar {
    width: 120px;
    height: 8px;
    background: #E5E7EB;
    border-radius: 4px;
    overflow: hidden;
}
.course-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563EB, #3B82F6);
    border-radius: 4px;
}

/* ─── 주차 섹션 ─── */
.week-section {
    margin-bottom: 16px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #E5E7EB;
    background: #fff;
}
.week-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
}
.week-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}
.week-number {
    font-weight: 700;
    font-size: 15px;
    color: #111;
}
.week-date {
    font-size: 12px;
    color: #9CA3AF;
}
.week-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.week-badge-active {
    background: #DCFCE7;
    color: #16A34A;
}
.week-badge-future {
    background: #EFF6FF;
    color: #2563EB;
}
.week-badge-locked {
    background: #FEE2E2;
    color: #DC2626;
}
.week-badge-past {
    background: #FEE2E2;
    color: #EF4444;
}
.week-body {
    padding: 0;
}
.week-empty {
    padding: 20px;
    text-align: center;
    color: #9CA3AF;
    font-size: 13px;
}

/* ─── 영상 아이템 (가로형) ─── */
.video-item {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    gap: 14px;
    border-bottom: 1px solid #F3F4F6;
    transition: background 0.15s;
}
.video-item:last-child {
    border-bottom: none;
}
.video-item:hover {
    background: #FAFAFA;
}
.video-item.video-locked {
    opacity: 0.5;
}

.video-item-thumb {
    position: relative;
    width: 120px;
    min-width: 120px;
    height: 68px;
    border-radius: 6px;
    overflow: hidden;
    background: #F3F4F6;
    flex-shrink: 0;
}
.video-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.video-item-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #D1D5DB;
    background: #F3F4F6;
}
.video-item-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
}

.video-item-info {
    flex: 1;
    min-width: 0;
}
.video-item-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.video-item-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.vi-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}
.vi-badge-done {
    background: #DCFCE7;
    color: #16A34A;
}
.vi-badge-progress {
    background: #FEF3C7;
    color: #D97706;
}
.vi-badge-attend {
    background: #DBEAFE;
    color: #2563EB;
}

.vi-badge-notstarted {
    background: #F3F4F6;
    color: #9CA3AF;
}

.video-item-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
    margin-bottom: 2px;
}
.vi-detail-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #6B7280;
}
.vi-detail-percent {
    font-size: 12px;
    font-weight: 600;
    color: #9CA3AF;
}
.vi-detail-percent.progress {
    color: #D97706;
}
.vi-detail-percent.done {
    color: #16A34A;
}
.vi-detail-attend {
    font-size: 11px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 8px;
    margin-left: 4px;
}
.vi-detail-attend.done {
    background: #D1FAE5;
    color: #065F46;
}
.vi-detail-attend.yet {
    background: #FEE2E2;
    color: #991B1B;
}

/* ── 강사/강의 탭 ── */
.player-tabs {
    padding: 0 24px 24px;
}
.player-tab-nav {
    display: flex;
    gap: 4px;
    background: #F3F4F6;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 4px;
}
.player-tab-btn {
    flex: 1;
    padding: 11px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.25s;
    text-align: center;
}
.player-tab-btn:hover {
    color: #374151;
    background: rgba(255, 255, 255, 0.5);
}
.player-tab-btn.active {
    color: #2563EB;
    background: #FFFFFF;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.player-tab-content {
    padding: 20px 4px 0;
}
.player-tab-pane {
    display: none;
}
.player-tab-pane.active {
    display: block;
}
.teacher-card {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    padding: 24px;
}
.teacher-photo {
    flex-shrink: 0;
}
.teacher-photo img {
    width: 110px;
    height: auto;
    border-radius: 10px;
    object-fit: contain;
    border: 2px solid #E5E7EB;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.teacher-info {
    flex: 1;
    min-width: 0;
}
.teacher-name {
    font-size: 19px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}
.teacher-position {
    font-size: 14px;
    color: #2563EB;
    font-weight: 500;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #E5E7EB;
}
.teacher-profile {
    font-size: 13.5px;
    color: #374151;
    line-height: 1.8;
}
.tab-text-content {
    font-size: 14px;
    color: #374151;
    line-height: 1.9;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    padding: 24px;
}

/* ── course.php 강의정보 탭 ── */
.course-lecture-info {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}
.course-tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #E5E7EB;
}
.course-tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 14px;
    font-weight: 600;
    color: #9CA3AF;
    cursor: pointer;
    transition: all 0.2s;
}
.course-tab-btn:hover {
    color: #374151;
}
.course-tab-btn.active {
    color: #2563EB;
    border-bottom-color: #2563EB;
}
.course-tab-content {
    padding: 16px 0 0;
}
.course-tab-pane {
    display: none;
}
.course-tab-pane.active {
    display: block;
}

@media (max-width: 768px) {
    .player-tabs {
        padding: 0 16px 16px;
    }
    .player-tab-nav {
        gap: 2px;
        padding: 3px;
    }
    .player-tab-btn,
    .course-tab-btn {
        padding: 9px 10px;
        font-size: 13px;
    }
    .teacher-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
        padding: 20px;
    }
    .teacher-photo img {
        width: 90px;
        height: 90px;
        border-radius: 8px;
    }
    .teacher-position {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 10px;
    }
    .tab-text-content {
        padding: 18px;
    }
    .course-lecture-info {
        padding: 14px;
    }
}

.btn-book-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #2563EB;
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.btn-book-download:hover {
    background: #1d4ed8;
    color: #fff;
}
.btn-book-download svg {
    flex-shrink: 0;
}

.player-book-download {
    padding: 0 24px 24px;
}
.btn-book-download-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    color: #fff;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}
.btn-book-download-bottom:hover {
    background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    color: #fff;
}
.btn-book-download-bottom svg {
    flex-shrink: 0;
}

.course-notice {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 10px 14px;
    background: #FEF3C7;
    border-radius: 8px;
    font-size: 12px;
    color: #92400E;
    line-height: 1.4;
}
.course-notice svg {
    flex-shrink: 0;
    color: #D97706;
}

.video-item-progress {
    margin-top: 2px;
}
.vi-progress-bar {
    width: 100%;
    max-width: 240px;
    height: 4px;
    background: #E5E7EB;
    border-radius: 2px;
    overflow: hidden;
}
.vi-progress-fill {
    height: 100%;
    background: #2563EB;
    border-radius: 2px;
    transition: width 0.3s;
}
.vi-progress-fill.completed {
    background: #16A34A;
}

.video-item-action {
    flex-shrink: 0;
}
.vi-btn-play {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: #2563EB;
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}
.vi-btn-play:hover {
    background: #1d4ed8;
    color: #fff;
}
.vi-btn-locked {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: #E5E7EB;
    color: #9CA3AF;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════
   자격증/코스 반응형
   ═══════════════════════════════════════════════ */

@media (max-width: 768px) {
    .cert-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .cert-card-img {
        height: 140px;
    }
    .course-header {
        padding: 16px;
    }
    .course-title {
        font-size: 18px;
    }
    .course-summary {
        flex-wrap: wrap;
        gap: 8px;
    }
    .course-stat {
        font-size: 12px;
        padding: 3px 10px;
    }
    .course-progress {
        margin-left: 0;
        width: 100%;
    }
    .course-progress-bar {
        flex: 1;
    }
    .video-item {
        flex-wrap: wrap;
        padding: 10px 14px;
    }
    .video-item-thumb {
        width: 100px;
        min-width: 100px;
        height: 56px;
    }
    .video-item-title {
        font-size: 13px;
    }
    .vi-btn-play, .vi-btn-locked {
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .cert-card-body {
        padding: 12px;
    }
    .cert-card-title {
        font-size: 15px;
    }
    .video-item-thumb {
        width: 80px;
        min-width: 80px;
        height: 45px;
    }
    .video-item-action {
        width: 100%;
        margin-top: 6px;
    }
    .vi-btn-play, .vi-btn-locked {
        width: 100%;
        justify-content: center;
    }
    .week-header {
        padding: 10px 14px;
    }
}

/* ═══ 교재/교구재 카드 리스트 ═══ */
.item-list-display {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.item-card {
    display: flex;
    gap: 20px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    padding: 20px;
    align-items: flex-start;
}
.item-card-img {
    flex-shrink: 0;
    width: 120px;
}
.item-card-img img {
    width: 120px;
    height: auto;
    max-height: 160px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.item-card-body {
    flex: 1;
    min-width: 0;
}
.item-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
}
.item-card-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 10px;
}
.item-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.item-card-meta span::before {
    content: '';
    width: 4px;
    height: 4px;
    background: #D1D5DB;
    border-radius: 50%;
}
.item-card-meta span:first-child::before {
    display: none;
}
.item-card-desc {
    font-size: 13.5px;
    color: #374151;
    line-height: 1.8;
    margin-bottom: 12px;
}
.item-card-desc p {
    margin: 0 0 6px;
}
.item-card-links {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}
.item-link-icon {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    background: #EFF6FF;
    color: #2563EB;
    border: 1px solid #BFDBFE;
}
.item-link-icon:hover {
    background: #DBEAFE;
    color: #1D4ED8;
    border-color: #93C5FD;
}
.item-link-icon.buy {
    background: #FEF3C7;
    color: #B45309;
    border: 1px solid #FDE68A;
}
.item-link-icon.buy:hover {
    background: #FDE68A;
    color: #92400E;
    border-color: #FBBF24;
}
.item-link-icon svg {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .item-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 14px;
        padding: 16px;
    }
    .item-card-img {
        width: 100px;
    }
    .item-card-img img {
        width: 100px;
    }
    .item-card-meta {
        justify-content: center;
    }
    .item-card-links {
        justify-content: center;
    }
    .item-card-desc {
        text-align: left;
    }
}
