/* =========================================================
   home.css — 메인 대시보드 (라이브 + 공지 + 데이터/게시판 placeholder)
   tokens.css 의 디자인 토큰을 사용한다.
========================================================= */

.home-body { background: var(--bg); color: var(--t1); }

.home-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px 80px;
}

/* ── 히어로 ── */
.home-hero { margin: 10px 0 22px; }
.home-hero-eyebrow {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ac);
    margin-bottom: 4px;
}
.home-hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 500;
    color: var(--t1);
    letter-spacing: 0.01em;
}

/* ── 섹션 ── */
.home-sec { margin-bottom: 30px; }
.home-sec-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--bd);
}
.home-sec-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--t1);
    letter-spacing: 0.02em;
}
.home-sec-count {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ac-txt);
    background: var(--ac-bg);
    border-radius: 100px;
    padding: 2px 10px;
}
.live-dot-lg {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: #e8344e;
    box-shadow: 0 0 0 0 rgba(232,52,78,0.6);
    animation: homeLivePulse 1.6s infinite;
    display: inline-block;
}
@keyframes homeLivePulse {
    0%   { box-shadow: 0 0 0 0 rgba(232,52,78,0.55); }
    70%  { box-shadow: 0 0 0 8px rgba(232,52,78,0); }
    100% { box-shadow: 0 0 0 0 rgba(232,52,78,0); }
}

/* ── 빈 상태 ── */
.home-empty {
    background: var(--bg2);
    border: 1px dashed var(--bd);
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
    color: var(--t3);
    font-size: 0.9rem;
}

/* ── 라이브 그리드 ── */
.live-grid {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 10px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}
/* 가로 스크롤 공통 스크롤바 */
.live-grid::-webkit-scrollbar,
.notice-list::-webkit-scrollbar,
.vid-grid::-webkit-scrollbar { height: 7px; }
.live-grid::-webkit-scrollbar-thumb,
.notice-list::-webkit-scrollbar-thumb,
.vid-grid::-webkit-scrollbar-thumb { background: var(--bd); border-radius: 4px; }
.live-grid:hover::-webkit-scrollbar-thumb,
.notice-list:hover::-webkit-scrollbar-thumb,
.vid-grid:hover::-webkit-scrollbar-thumb { background: var(--bd-s); }
.live-card {
    flex: 0 0 260px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--bd);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform .15s, box-shadow .15s, border-color .15s;
    box-shadow: var(--sh-sm);
}
.live-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--sh-md);
    border-color: var(--bd-s);
}
.live-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #1a1828, #2a2438);
    overflow: hidden;
}
.live-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.live-tag {
    position: absolute;
    top: 8px; left: 8px;
    background: #e8344e;
    color: #fff;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 3px 8px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
/* 플랫폼별 LIVE 뱃지 색상 */
.live-tag-soop    { background: #1763e8; }  /* SOOP 블루 */
.live-tag-youtube { background: #ff0033; }  /* 유튜브 레드 */
.live-viewers {
    position: absolute;
    bottom: 8px; right: 8px;
    background: rgba(0,0,0,0.62);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 5px;
}
.live-meta { padding: 10px 12px 13px; }
.live-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--t1);
    margin-bottom: 3px;
}
.live-title {
    font-size: 0.8rem;
    color: var(--t2);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── 크루 LIVE 상태 뱃지 (ON AIR / OFF AIR) ── */
.home-sec-status {
    margin-left: auto;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    border-radius: 100px;
    padding: 3px 11px;
}
.home-sec-status.is-on {
    color: #fff;
    background: #e8344e;
    box-shadow: 0 0 0 0 rgba(232,52,78,0.5);
    animation: homeLivePulse 1.6s infinite;
}
.home-sec-status.is-off {
    color: var(--t3);
    background: var(--bg2);
    border: 1px solid var(--bd);
}

/* ── 크루 오프라인(미방송) 카드 ── */
.live-offline {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 16px 18px;
    background: var(--bg2);
    border: 1px dashed var(--bd);
    border-radius: 12px;
    text-decoration: none;
    transition: border-color .15s, background .15s;
}
.live-offline:hover { border-color: var(--bd-s); background: var(--bg-card); }
.live-offline-dot {
    flex: 0 0 auto;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--t3);
    opacity: 0.6;
}
.live-offline-txt { font-size: 0.9rem; font-weight: 600; color: var(--t2); }
.live-offline-go  { margin-left: auto; font-size: 0.82rem; color: var(--ac); white-space: nowrap; }

/* ── 공지 리스트 ── */
.notice-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 10px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}
.notice-item {
    flex: 0 0 320px;
    scroll-snap-align: start;
    background: var(--bg-card);
    border: 1px solid var(--bd);
    border-radius: 12px;
    padding: 14px 16px;
}
.notice-item.notice-pinned {
    border-color: var(--bd-s);
    background: linear-gradient(135deg, var(--bg-card) 82%, var(--ac-bg));
}
.notice-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.notice-pin { font-size: 0.85rem; }
.notice-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--t1);
    flex: 1;
    min-width: 0;
}
.notice-meta {
    font-size: 0.74rem;
    color: var(--t3);
    white-space: nowrap;
}
.notice-body {
    margin-top: 8px;
    font-size: 0.86rem;
    color: var(--t2);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── 영상 그리드 (유튜브 · SOOP 다시보기) ── */
.home-sec-tag {
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #fff;
    background: #ff0033;
    border-radius: 5px;
    padding: 2px 7px;
    vertical-align: middle;
    margin-left: 4px;
}
.vid-grid {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 10px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}
.vid-card {
    flex: 0 0 240px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--bd);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform .15s, box-shadow .15s, border-color .15s;
    box-shadow: var(--sh-sm);
}
.vid-card:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--bd-s); }
.vid-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
}
.vid-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vid-badge {
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,0,51,0.92);
    color: #fff;
    border-radius: 50%;
    font-size: 0.9rem;
    padding-left: 3px;
    opacity: 0.92;
    transition: transform .15s;
}
.vid-card:hover .vid-badge { transform: translate(-50%, -50%) scale(1.12); }
.vid-meta { padding: 10px 12px 13px; }
.vid-title {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--t1);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}
.vid-sub { font-size: 0.76rem; color: var(--t3); }

@media (max-width: 560px) {
    .vid-card { flex-basis: 200px; }
}

/* ── 자유게시판 최신글 (메인, 가로 스크롤) ── */
.home-sec-more { font-size: 0.8rem; color: var(--ac); text-decoration: none; margin-left: auto; white-space: nowrap; }
.home-sec-more:hover { text-decoration: underline; }
.home-empty-link { color: var(--ac); text-decoration: none; font-weight: 600; }
.board-scroll {
    display: flex; gap: 12px;
    overflow-x: auto; overflow-y: hidden;
    padding-bottom: 10px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}
.board-scroll::-webkit-scrollbar { height: 7px; }
.board-scroll::-webkit-scrollbar-thumb { background: var(--bd); border-radius: 4px; }
.board-scroll:hover::-webkit-scrollbar-thumb { background: var(--bd-s); }
.bp-card {
    flex: 0 0 240px; scroll-snap-align: start;
    background: var(--bg-card); border: 1px solid var(--bd); border-radius: 12px;
    padding: 14px 16px; text-decoration: none; color: inherit;
    display: flex; flex-direction: column; gap: 8px; min-height: 84px;
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.bp-card:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--bd-s); }
.bp-title {
    font-size: 0.92rem; font-weight: 600; color: var(--t1); line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bp-meta { font-size: 0.76rem; color: var(--t3); margin-top: auto; }
@media (max-width: 560px) { .bp-card { flex-basis: 210px; } }

/* 감사 공지 카드 (썸네일 포함) */
.thx-card-thumb {
    width: 100%; height: 120px; border-radius: 8px; overflow: hidden;
    background: var(--bg2);
}
.thx-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── 유튜브 쇼츠 (세로, 가로 스크롤) ── */
.shorts-scroll {
    display: flex; gap: 12px;
    overflow-x: auto; overflow-y: hidden;
    padding-bottom: 10px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}
.shorts-scroll::-webkit-scrollbar { height: 7px; }
.shorts-scroll::-webkit-scrollbar-thumb { background: var(--bd); border-radius: 4px; }
.shorts-scroll:hover::-webkit-scrollbar-thumb { background: var(--bd-s); }
.short-card { flex: 0 0 150px; scroll-snap-align: start; text-decoration: none; color: inherit; transition: transform .15s; }
.short-card:hover { transform: translateY(-3px); }
.short-thumb {
    position: relative; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden;
    background: #000; border: 1px solid var(--bd);
}
.short-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.short-badge {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
    background: rgba(255,0,51,.92); color: #fff; border-radius: 50%; font-size: 0.8rem; padding-left: 3px;
}
.short-title {
    font-size: 0.82rem; font-weight: 600; color: var(--t1); line-height: 1.35; margin-top: 7px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.short-sub { font-size: 0.74rem; color: var(--t3); margin-top: 2px; }
@media (max-width: 560px) { .short-card { flex-basis: 130px; } }

/* ── 데이터 placeholder 탭 ── */
.data-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}
.data-tab {
    background: var(--bg-card);
    border: 1px solid var(--bd);
    border-radius: 100px;
    padding: 8px 16px;
    font-size: 0.84rem;
    color: var(--t2);
    text-decoration: none;
    transition: all .14s;
}
.data-tab:hover { border-color: var(--bd-s); color: var(--t1); }
.data-tab.on { background: var(--ac); border-color: var(--ac); color: #fff; font-weight: 600; }

/* ── 데이터/랭킹 표시 ── */
.data-subtitle { font-size: 0.9rem; color: var(--t2); margin-top: 4px; }
.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rank-row {
    display: flex; align-items: center; gap: 14px;
    background: var(--bg-card); border: 1px solid var(--bd); border-radius: 12px;
    padding: 13px 16px;
}
.rank-badge {
    flex: 0 0 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem; font-weight: 700; color: var(--t2);
    background: var(--bg2); border-radius: 10px;
}
.rank-top .rank-badge { font-size: 1.3rem; background: transparent; }
.rank-1 { border-color: #e8c452; background: linear-gradient(135deg, var(--bg-card) 78%, rgba(232,196,82,0.14)); }
.rank-2 { border-color: #c8cdd6; }
.rank-3 { border-color: #e0a16a; }
.rank-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rank-name { font-size: 0.98rem; font-weight: 700; color: var(--t1); }
.rank-note { font-size: 0.8rem; color: var(--t3); }
.rank-value {
    flex: 0 0 auto; font-size: 1rem; font-weight: 700; color: var(--ac);
    background: var(--ac-bg); border-radius: 100px; padding: 5px 14px;
}

@media (max-width: 560px) {
    .home-hero-title { font-size: 1.6rem; }
    .live-card { flex-basis: 220px; }
    .notice-item { flex-basis: 280px; }
}

/* ── 로그인/회원가입 (account.php) ── */
.auth-page { max-width: 460px; }
.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--bd);
    border-radius: 16px;
    padding: 26px 26px 30px;
    box-shadow: var(--sh-sm);
    margin-top: 12px;
}
.auth-h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--t1);
    margin-bottom: 6px;
}
.auth-sub { font-size: 0.9rem; color: var(--t2); margin-bottom: 18px; }
.auth-hint { font-size: 0.8rem; color: var(--t3); line-height: 1.55; margin: -4px 0 2px; }
.auth-hint strong { color: var(--ac); font-weight: 600; }
.auth-hint small { color: var(--t3); }
.auth-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg2);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 20px;
}
.auth-tab {
    flex: 1;
    padding: 9px 0;
    border: none;
    background: transparent;
    border-radius: 7px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--t3);
    cursor: pointer;
    transition: background .15s, color .15s;
}
.auth-tab.on { background: var(--bg-card); color: var(--ac); box-shadow: var(--sh-sm); }
.auth-form { display: flex; flex-direction: column; gap: 13px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field span { font-size: 0.8rem; color: var(--t2); }
.auth-field span small { color: var(--t3); font-weight: 400; }
.auth-field input {
    padding: 11px 13px;
    background: var(--bg2);
    border: 1px solid var(--bd);
    border-radius: 9px;
    color: var(--t1);
    font-family: inherit;
    font-size: 0.92rem;
    outline: none;
    transition: border-color .15s, background .15s;
}
.auth-field input:focus { border-color: var(--ac); background: var(--bg-card); }
.auth-btn {
    margin-top: 4px;
    padding: 12px 18px;
    background: var(--ac);
    color: #fff;
    border: none;
    border-radius: 9px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: opacity .15s, transform .12s;
}
.auth-btn:hover { opacity: .9; transform: translateY(-1px); }
.auth-btn-ghost { background: transparent; color: var(--t2); border: 1px solid var(--bd); }
.auth-actions { display: flex; gap: 10px; }
.auth-actions .auth-btn { flex: 1; }
.auth-msg { font-size: 0.82rem; color: var(--t3); margin: 2px 0 0; min-height: 1.2em; }
.auth-msg.ok  { color: #2e8a72; }
.auth-msg.err { color: #c0392b; }
[data-theme="dark"] .auth-msg.ok  { color: #6dd5b8; }
[data-theme="dark"] .auth-msg.err { color: #f87171; }

/* ── 네비 로그인 상태 ── */
.nav-login {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ac);
    text-decoration: none;
    border: 1px solid var(--bd);
    border-radius: 100px;
    padding: 6px 13px;
    white-space: nowrap;
    transition: border-color .15s, background .15s;
}
.nav-login:hover { border-color: var(--ac); background: var(--ac-bg); }
.nav-user {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--t2);
    white-space: nowrap;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav-vlogout {
    width: auto !important;
    padding: 0 10px;
    font-size: 0.74rem;
    font-family: inherit;
    color: var(--t3);
}
