/* 데일리코드 대시보드 커스텀 스타일
   출처: unban-integration-agent/apps/web_dashboard 의 시각 효과(스켈레톤 로더, 라이브 펄스,
   카드 호버, 보더빔)를 이 프로젝트 맥락으로 이식. */

body, .navbar-brand, .nav-link-title, .page-title, .card-title, .form-label, .btn, input, textarea {
    font-family: 'Noto Sans KR', sans-serif !important;
}

/* --- Skeleton UI (로딩 중 표시용, 이후 비동기 위젯에서 재사용) --- */
.skeleton-loader {
    display: inline-block;
    height: 1em;
    width: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    vertical-align: middle;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- Live Status Pulse --- */
.status-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #2fb344;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    position: relative;
}
.status-pulse::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: inherit;
    border-radius: 50%;
    animation: pulse-ring 1.5s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}
@keyframes pulse-ring {
    0% { transform: scale(0.7); opacity: 0.8; }
    80%, 100% { transform: scale(2.5); opacity: 0; }
}
.pulse-blue { background-color: #206bc4; }

/* --- Micro-interactions --- */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}
.card-header {
    transition: background-color 0.3s ease;
}
.card:hover .card-header {
    background-color: rgba(32, 107, 196, 0.1) !important;
}
/* 문서 뷰어처럼 세로로 아주 긴 카드는 hover 리프트/그림자 대상에서 제외한다.
   (큰 요소에 transform+box-shadow 트랜지션을 걸면 스크롤된 아래쪽에서 호버할 때
   헤더 쪽 다운로드 버튼 배경이 부분적으로 깨져 보이는 리페인트 현상이 있었음) */
.card.card-static,
.card.card-static:hover {
    transform: none;
    box-shadow: var(--tblr-card-box-shadow, none);
}
.card.card-static:hover .card-header {
    background-color: inherit !important;
}

/* --- Animated Border Beam --- */
.border-beam {
    position: relative;
    overflow: hidden;
}
.border-beam::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, #206bc4, transparent);
    animation: beam-move 3s linear infinite;
}
@keyframes beam-move {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* --- 서브 탭 디자인 표준 (W3C ARIA APG Tabs 패턴 기반, CLAUDE.md "UI — 서브 탭" 참고) --- */
.subtabs.nav-tabs { border-bottom: none; gap: .25rem; }
.subtabs .nav-link {
    color: var(--tblr-secondary, #626976);
    background: transparent;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    padding: .5rem 1rem;
    transition: background-color .15s ease, color .15s ease;
}
.subtabs .nav-link:hover {
    background: rgba(32, 107, 196, 0.1);
    color: #206bc4;
}
.subtabs .nav-link:focus-visible {
    outline: 2px solid #206bc4;
    outline-offset: 2px;
}
.subtabs .nav-link.active,
.subtabs .nav-link.active:hover {
    background: #206bc4;
    color: #ffffff;
}

/* --- Game shell (숫자 잇기 퍼즐 / 기억력 게임 / NumSlide 공용) --- */
.game-hero {
    border-radius: 16px;
    padding: 1.1rem 1.4rem;
    margin-bottom: 1rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: .9rem;
    box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.35);
}
.game-hero .game-hero-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.game-hero .game-hero-icon svg { width: 26px; height: 26px; stroke: #fff; }
.game-hero h3 { color: #fff; margin-bottom: .15rem; }
.game-hero p { color: rgba(255, 255, 255, 0.85); margin-bottom: 0; font-size: .875rem; }
.game-hero--indigo { background: linear-gradient(135deg, #6366f1, #4338ca); }
.game-hero--teal { background: linear-gradient(135deg, #14b8a6, #0f766e); }
.game-hero--amber { background: linear-gradient(135deg, #f59e0b, #b45309); }

.stat-pill-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.stat-pill {
    flex: 1 1 90px;
    background: var(--tblr-card-bg, #fff);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: .55rem .75rem;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.stat-pill .stat-pill-label {
    font-size: .68rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #8a94a6;
    display: block;
    margin-bottom: .15rem;
}
.stat-pill .stat-pill-value { font-size: 1.25rem; font-weight: 700; line-height: 1; }

.game-board-frame {
    border-radius: 18px;
    box-shadow: 0 18px 36px -18px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.game-action-btn {
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: .01em;
}

/* --- Sidebar polish --- */
.navbar-vertical .nav-link:hover,
.navbar-vertical .dropdown-menu .dropdown-item:hover {
    background-color: #ffffff;
    color: #206bc4;
}
.navbar-vertical .nav-link:hover .nav-link-icon svg,
.navbar-vertical .dropdown-menu .dropdown-item:hover .nav-link-icon svg {
    stroke: #206bc4 !important;
}
.navbar-vertical .nav-link-icon {
    margin-right: .5rem;
}
.navbar-vertical .nav-item-header {
    font-size: .85rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.navbar-vertical .header-common { color: #206bc4; }
.navbar-vertical .header-games { color: #0ca692; }
.navbar-vertical .header-admin { color: #f76707; }
.navbar-vertical .sidebar-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: .75rem 1rem 0;
    border: none;
}
