* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a { text-decoration: none; }

.hidden { display: none !important; }

body {
    background: #ffffff;
    min-height: 100vh;
    font-family: sans-serif;
}

/* 로그인 성공 토스트 */
.toast {
    position: fixed;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4caf50;
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: top 0.4s ease;
    z-index: 9999;
    white-space: nowrap;
}

.toast.show {
    top: 80px;
}

/* 상단 바 */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 1);
    backdrop-filter: blur(8px);
    padding: 16px 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}


.welcome {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.logout-btn {
    text-decoration: none;
    background-color: rgb(143, 203, 255);
    color: #333;
    padding: 8px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.logout-btn:hover {
    background-color: rgb(100, 170, 240);
}

/* 네비게이션 메뉴 */
.topbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.nav-link {
    text-decoration: none;
    color: #444;
    font-size: 14px;
    font-weight: bold;
    padding: 7px 16px;
    border-radius: 10px;
    transition: background 0.2s, color 0.2s;
    position: relative;
}

.nav-link:hover {
    background: rgba(143, 203, 255, 0.25);
    color: #1a73e8;
}

/* 상단바 NEW 빨간 점 */
.new-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background: #e74c3c;
    border-radius: 50%;
    border: 1.5px solid #fff;
    display: block;
}
.new-dot.hidden { display: none; }

/* 큰 nav-btn NEW 배지 */
.nav-btn { position: relative; }
.nav-btn-new {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
    letter-spacing: 0.5px;
    animation: pulse-new 1.4s ease-in-out infinite;
}
.nav-btn-new.hidden { display: none; }

@keyframes pulse-new {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.7; transform: scale(1.08); }
}

/* 알림 벨 */
.notif-wrap {
    position: relative;
}
.bell-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 10px;
    transition: background 0.2s;
    line-height: 1;
    position: relative;
}
.bell-btn:hover {
    background: rgba(0, 0, 0, 0.07);
}
.notif-badge {
    position: absolute;
    top: 2px; right: 2px;
    background: #e53e3e;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 10px;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    padding: 0 3px;
}
.notif-badge.hidden { display: none; }
.notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 300px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.13);
    z-index: 200;
    overflow: hidden;
    animation: notifFadeIn 0.15s ease;
}
@keyframes notifFadeIn {
    from { opacity:0; transform:translateY(-6px); }
    to   { opacity:1; transform:translateY(0); }
}
.notif-dropdown.hidden { display: none; }
.notif-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: background 0.12s;
}
.notif-row:last-child { border-bottom: none; }
.notif-row:hover { background: rgba(0,0,0,0.03); }
.notif-unread { background: rgba(91,94,247,0.05); }
.notif-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.notif-info { flex: 1; min-width: 0; }
.notif-msg { font-size: 13px; color: #333; line-height: 1.5; }
.notif-msg b { color: #5b5ef7; }
.notif-time { font-size: 11px; color: #aaa; margin-top: 3px; }
.notif-empty { padding: 28px 16px; text-align: center; color: #bbb; font-size: 14px; }
body.dark .notif-dropdown {
    background: #23233a;
    border-color: rgba(255,255,255,0.08);
}
body.dark .notif-row { border-bottom-color: rgba(255,255,255,0.06); }
body.dark .notif-row:hover { background: rgba(255,255,255,0.04); }
body.dark .notif-msg  { color: #ccc; }
body.dark .notif-time { color: #666; }
body.dark .notif-unread { background: rgba(91,94,247,0.12); }

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    flex-shrink: 0;
    white-space: nowrap;
    flex: 1;
    justify-content: flex-end;
}

.login-hint-btn {
    text-decoration: none;
    color: #555;
    font-size: 14px;
    font-weight: bold;
    padding: 8px 18px;
    border-radius: 12px;
    border: 1.5px solid #ccc;
    transition: background-color 0.2s, border-color 0.2s;
}

.login-hint-btn:hover {
    background-color: rgba(255, 255, 255, 0.6);
    border-color: #aaa;
}


/* 사이트 로고 */
.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.site-logo {
    text-decoration: none;
    font-size: 17px;
    font-weight: 900;
    color: #5b5ef7;
    letter-spacing: -0.3px;
    transition: opacity 0.2s;
}

.site-logo:hover {
    opacity: 0.75;
}

/* 맨 위로 버튼 */
.scroll-top-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: rgba(255,255,255,0.85);
    border: none;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.2s;
    z-index: 999;
}

.scroll-top-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.scroll-top-btn:hover {
    transform: translateY(-3px);
}

/* 활동 통계 */
.stats-section {
    display: flex;
    gap: 20px;
    margin-top: 32px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.22);
    border-radius: 20px;
    padding: 28px 48px;
    min-width: 150px;
}

.stat-num {
    font-size: 40px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.stat-label {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    font-weight: bold;
}

/* 다크모드 - 로고·버튼 */
body.dark .site-logo {
    color: #9b9ef7;
}

body.dark .scroll-top-btn {
    background: rgba(50,50,80,0.9);
    color: #ddd;
}

body.dark .stat-card {
    background: rgba(255,255,255,0.07);
}

/* 검색바 */
.topbar-center {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0 16px;
}

.search-wrap {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.6);
    border: 1.5px solid rgba(0,0,0,0.1);
    border-radius: 22px;
    padding: 6px 14px;
    gap: 6px;
    width: 100%;
    max-width: 280px;
    transition: background 0.2s, box-shadow 0.2s;
}

.search-wrap:focus-within {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.search-icon {
    font-size: 13px;
    opacity: 0.6;
}

.search-input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    color: #333;
    width: 100%;
}

.search-input::placeholder {
    color: #aaa;
}

/* 검색 드롭다운 */
.search-wrap {
    position: relative;
}
.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.16);
    overflow: hidden;
    z-index: 500;
    border: 1px solid rgba(0,0,0,0.07);
    animation: dropFadeMain 0.14s ease;
    min-width: 220px;
}
@keyframes dropFadeMain {
    from { opacity:0; transform:translateY(-5px); }
    to   { opacity:1; transform:translateY(0); }
}
.search-dropdown.hidden { display: none; }
.search-drop-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.12s;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.search-drop-row:last-child { border-bottom: none; }
.search-drop-row:hover { background: rgba(91,94,247,0.07); }
.search-drop-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: bold; font-size: 14px;
    flex-shrink: 0;
}
.search-drop-info { flex: 1; min-width: 0; }
.search-drop-name { font-size: 13px; font-weight: bold; color: #222; }
.search-drop-name mark { background: rgba(91,94,247,0.15); color: #5b5ef7; border-radius: 3px; padding: 0 2px; }
.search-drop-sub { font-size: 11px; color: #aaa; margin-top: 1px; }
.search-drop-empty { padding: 14px; text-align: center; color: #bbb; font-size: 13px; }

/* DM 버튼 */
.dm-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 10px;
    transition: background 0.2s;
    line-height: 1;
}

.dm-btn:hover {
    background: rgba(0, 0, 0, 0.07);
}

/* 다크모드 버튼 */
.darkmode-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 10px;
    transition: background 0.2s;
    line-height: 1;
}

.darkmode-btn:hover {
    background: rgba(0, 0, 0, 0.07);
}

/* 다크모드 */
body.dark {
    background-image: none;
    background-color: #1a1a2e;
}

body.dark .topbar {
    background: linear-gradient(135deg, #0f0f26 0%, #131330 100%);
    border-bottom: 2px solid rgba(91, 94, 247, 0.5);
    box-shadow: 0 4px 28px rgba(0,0,0,0.7), 0 1px 0 rgba(91,94,247,0.2);
}

body.dark .welcome,
body.dark .nav-link {
    color: #ccc;
}

/* 다크모드 topbar 아이콘 버튼 */
body.dark .dm-topbar-btn,
body.dark .bell-btn,
body.dark .darkmode-btn,
body.dark .dm-back-btn,
body.dark .dm-panel-close,
body.dark .dm-panel-title { color: #ccc; }
body.dark .dm-topbar-btn:hover,
body.dark .bell-btn:hover,
body.dark .darkmode-btn:hover { color: #fff; }

body.dark .search-wrap {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
}
body.dark .search-icon { color: #aaa; }
body.dark .search-input { color: #eee; }
body.dark .search-dropdown { background: #1e2035; border-color: rgba(255,255,255,0.08); }
body.dark .search-drop-row { border-bottom-color: rgba(255,255,255,0.05); }
body.dark .search-drop-row:hover { background: rgba(91,94,247,0.1); }
body.dark .search-drop-name { color: #e0e0e0; }
body.dark .search-drop-empty { color: #555; }

/* ── 다크모드 DM 패널 ── */
body.dark .dm-panel { background: #1e1e32; }
body.dark .dm-panel-header,
body.dark .dm-input-area   { border-color: rgba(255,255,255,0.07); }
body.dark .dm-panel-title  { color: #ddd; }
body.dark .dm-panel-body   { background: #1e1e32; }
body.dark .dm-conv-row     { border-bottom-color: rgba(255,255,255,0.05); }
body.dark .dm-conv-row:hover { background: rgba(91,94,247,0.08); }
body.dark .dm-conv-name    { color: #ddd; }
body.dark .dm-conv-last    { color: #666; }
body.dark .dm-msg-other .dm-msg-bubble { background: #2d2d4a; color: #ddd; }
body.dark .dm-input {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
    color: #e0e0e0;
}
body.dark .dm-input::placeholder { color: #555; }
body.dark .dm-input:focus  { border-color: #9b9ef7; }
body.dark .dm-empty,
body.dark .dm-loading      { color: #555; }

body.dark .nav-btn {
    background: rgba(255,255,255,0.08);
    color: #ddd;
}

body.dark .login-hint-btn {
    color: #aaa;
}

body.dark .footer {
    background: rgba(0,0,0,0.6);
}

/* 메인 콘텐츠 */
.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 60px);
    gap: 12px;
    color: white;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
    padding-bottom: 60px;
    position: relative;
    z-index: 1;
}

/* 푸터 스페이서 */
.footer-spacer {
    height: 100vh;
    display: flex;
    align-items: flex-end;
    padding-bottom: 40px;
}

/* 푸터 */
.footer {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.75);
    padding: 24px 40px;
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
    font-size: 13px;
}

.footer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.footer-label {
    font-weight: bold;
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}

.footer-link:hover {
    color: rgb(143, 203, 255);
}

.content h1 {
    font-size: 32px;
}

/* 타이핑 커서 */
.typing-text::after {
    content: '|';
    animation: blink 0.7s infinite;
    margin-left: 2px;
    font-weight: 300;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

.content p {
    font-size: 16px;
    opacity: 0.9;
}

.nav-menu {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 24px;
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.92);
    padding: 36px 52px;
    border-radius: 24px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    font-size: 17px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transition: transform 0.18s, box-shadow 0.18s;
    will-change: transform;
}

.nav-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.nav-btn span:first-child {
    font-size: 48px;
}

/* ── 홈 2×2 그리드 ── */
.home-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 28px;
    position: relative;
    z-index: 1;
    /* CLS 방지: 데이터 로드 전후 높이 고정 */
    min-height: 280px;
}

.home-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.92);
    padding: 36px 48px;
    border-radius: 24px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    font-size: 17px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    cursor: pointer;
}

.home-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 36px rgba(0,0,0,0.18);
}

.home-card-icon {
    font-size: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.home-card-icon .li svg { width: 44px; height: 44px; stroke: #5b5ef7; }

.home-card-label {
    font-size: 16px;
    color: #444;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.home-card-stat .home-card-label .li svg { width: 15px; height: 15px; }

.home-card-num {
    font-size: 42px;
    font-weight: 900;
    color: #5b5ef7;
    min-width: 60px;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dark .home-card {
    background: rgba(255,255,255,0.07);
    color: #ddd;
}
body.dark .home-card-label { color: #ccc; }
body.dark .home-card-num { color: #9b9ef7; }
body.dark .home-card-icon .li svg { stroke: #9b9ef7; }

/* ── 플로팅 배경 카드 ── */
.floating-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.float-card {
    position: absolute;
    background: rgba(255,255,255,0.72);
    border-radius: 16px;
    padding: 16px 20px;
    will-change: transform;
    width: 180px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    filter: blur(0.5px);
    opacity: 0.65;
}

.fc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.fc-dot {
    width: 28px; height: 28px;
    border-radius: 8px;
    flex-shrink: 0;
}
.fc-purple { background: linear-gradient(135deg,#7c6ff7,#b39ddb); }
.fc-orange { background: linear-gradient(135deg,#f7a35c,#f7c67e); }
.fc-blue   { background: linear-gradient(135deg,#5b9ef7,#93c5fd); }
.fc-green  { background: linear-gradient(135deg,#43d08a,#86efac); }

.fc-title { font-size: 12px; font-weight: 700; color: #555; }
.fc-value { font-size: 22px; font-weight: 900; color: #333; margin-bottom: 4px; }
.fc-trend { font-size: 10px; color: #43d08a; font-weight: 600; }

/* 각 카드 위치 & 애니메이션 */
.fc1 { top: 8%;  left: -3%;  animation: fcFloat1 7s  ease-in-out infinite; }
.fc2 { top: 3%;  right: 1%;  animation: fcFloat2 9s  ease-in-out infinite; animation-delay: -2s; }
.fc3 { top: 42%; left: 2%;   animation: fcFloat3 8s  ease-in-out infinite; animation-delay: -1s; }
.fc4 { top: 50%; right: -1%; animation: fcFloat4 10s ease-in-out infinite; animation-delay: -3s; }
.fc5 { top: 76%; left: 15%;  animation: fcFloat5 6s  ease-in-out infinite; animation-delay: -4s; }
.fc6 { top: 70%; right: 12%; animation: fcFloat6 8s  ease-in-out infinite; animation-delay: -1.5s; }

@keyframes fcFloat1 {
    0%   { transform: rotate(-12deg) translate(0, 0)      scale(1); }
    25%  { transform: rotate(-6deg)  translate(28px,-36px) scale(1.04); }
    50%  { transform: rotate(-15deg) translate(14px,-20px) scale(0.97); }
    75%  { transform: rotate(-8deg)  translate(-10px,-30px) scale(1.02); }
    100% { transform: rotate(-12deg) translate(0, 0)      scale(1); }
}
@keyframes fcFloat2 {
    0%   { transform: rotate(8deg)  translate(0, 0)       scale(1); }
    25%  { transform: rotate(14deg) translate(-32px,24px)  scale(1.03); }
    50%  { transform: rotate(4deg)  translate(-18px,38px)  scale(0.96); }
    75%  { transform: rotate(11deg) translate(12px, 28px)  scale(1.05); }
    100% { transform: rotate(8deg)  translate(0, 0)       scale(1); }
}
@keyframes fcFloat3 {
    0%   { transform: rotate(-7deg) translate(0, 0)       scale(1); }
    30%  { transform: rotate(-2deg) translate(36px,-28px)  scale(1.04); }
    60%  { transform: rotate(-10deg)translate(20px, 16px)  scale(0.97); }
    100% { transform: rotate(-7deg) translate(0, 0)       scale(1); }
}
@keyframes fcFloat4 {
    0%   { transform: rotate(10deg) translate(0, 0)        scale(1); }
    35%  { transform: rotate(16deg) translate(-28px, 32px) scale(1.05); }
    65%  { transform: rotate(6deg)  translate(-36px,-14px) scale(0.96); }
    100% { transform: rotate(10deg) translate(0, 0)        scale(1); }
}
@keyframes fcFloat5 {
    0%   { transform: rotate(-5deg) translate(0, 0)        scale(1); }
    40%  { transform: rotate(-12deg)translate(24px,-34px)  scale(1.06); }
    70%  { transform: rotate(-2deg) translate(10px,-18px)  scale(0.95); }
    100% { transform: rotate(-5deg) translate(0, 0)        scale(1); }
}
@keyframes fcFloat6 {
    0%   { transform: rotate(6deg)  translate(0, 0)        scale(1); }
    30%  { transform: rotate(12deg) translate(-30px, 26px) scale(1.04); }
    60%  { transform: rotate(2deg)  translate(-14px, 38px) scale(0.97); }
    100% { transform: rotate(6deg)  translate(0, 0)        scale(1); }
}

/* 다크모드: 플로팅 카드 숨김 */
body.dark .floating-bg { display: none; }

/* ── 관리자 링크 버튼 ── */
.admin-link-btn {
    text-decoration: none;
    background: linear-gradient(135deg, #5b5ef7, #9b9ef7);
    color: #fff;
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: bold;
    transition: opacity 0.2s;
}
.admin-link-btn:hover { opacity: 0.85; }

/* ── DM 버튼 (상단 바) ── */
.dm-wrap {
    position: relative;
}
.dm-topbar-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 10px;
    transition: background 0.2s;
    line-height: 1;
    position: relative;
}
.dm-topbar-btn:hover { background: rgba(0,0,0,0.07); }
.dm-unread-badge {
    position: absolute;
    top: 2px; right: 2px;
    background: #e53935;
    color: #fff;
    border-radius: 999px;
    font-size: 10px;
    font-weight: bold;
    min-width: 16px; height: 16px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px;
}
.dm-unread-badge.hidden { display: none; }

/* ── DM 패널 ── */
.dm-panel {
    position: fixed;
    top: 0; right: 0;
    width: 360px; height: 100vh;
    background: #fff;
    box-shadow: -4px 0 32px rgba(0,0,0,0.18);
    z-index: 400;
    display: flex; flex-direction: column;
    transform: translateX(105%);
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
    pointer-events: none;
}
.dm-panel.open {
    transform: translateX(0);
    pointer-events: all;
}
.dm-panel-header {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1.5px solid #f0f0f0;
    gap: 8px;
    flex-shrink: 0;
}
.dm-back-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    color: #555;
    transition: background 0.2s;
    line-height: 1;
}
.dm-back-btn:hover { background: rgba(0,0,0,0.07); }
.dm-back-btn.hidden { display: none; }
.dm-panel-title {
    flex: 1;
    font-size: 16px;
    font-weight: bold;
    color: #222;
}
.dm-panel-close {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    color: #888;
    transition: background 0.2s;
}
.dm-panel-close:hover { background: rgba(0,0,0,0.07); }

/* ── DM 대화 목록 ── */
.dm-panel-body {
    flex: 1;
    overflow-y: auto;
    padding-top: 6px;
}
.dm-conv-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.12s;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.dm-conv-row:hover { background: rgba(91,94,247,0.06); }
.dm-conv-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: bold; font-size: 18px;
    flex-shrink: 0;
}
.dm-conv-info { flex: 1; min-width: 0; }
.dm-conv-name { font-size: 14px; font-weight: bold; color: #222; }
.dm-conv-last {
    font-size: 12px; color: #aaa; margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dm-conv-unread {
    background: #5b5ef7;
    color: #fff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: bold;
    min-width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 5px;
    flex-shrink: 0;
}

/* ── DM 채팅 메시지 ── */
.dm-msg {
    display: flex;
    flex-direction: column;
    padding: 3px 16px;
}
.dm-msg-mine  { align-items: flex-end; }
.dm-msg-other { align-items: flex-start; }
.dm-msg-bubble {
    max-width: 240px;
    padding: 9px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.45;
    word-break: break-word;
}
.dm-msg-mine  .dm-msg-bubble { background: #5b5ef7; color: #fff; border-bottom-right-radius: 5px; }
.dm-msg-other .dm-msg-bubble { background: #f1f3f5; color: #222; border-bottom-left-radius: 5px; }
.dm-msg-time { font-size: 10px; color: #ccc; margin-top: 3px; padding: 0 4px; }
.dm-msg + .dm-msg { margin-top: 3px; }
.dm-msg-mine + .dm-msg-other,
.dm-msg-other + .dm-msg-mine { margin-top: 12px; }

/* ── DM 입력 영역 ── */
.dm-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1.5px solid #f0f0f0;
    flex-shrink: 0;
}
.dm-input-area.hidden { display: none; }
.dm-input {
    flex: 1;
    border: 1.5px solid #e0e0e0;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}
.dm-input:focus { border-color: #5b5ef7; }
.dm-send-btn {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: #5b5ef7;
    color: #fff;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s;
}
.dm-send-btn:hover { opacity: 0.85; }

/* ── DM 빈 상태 / 로딩 ── */
.dm-empty, .dm-loading {
    text-align: center;
    color: #bbb;
    font-size: 13px;
    padding: 40px 16px;
    line-height: 1.7;
}

/* ── 소개 섹션 ── */
.intro-section {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}
.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}
.intro-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.intro-card {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}
.intro-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
.intro-img-wrap { padding: 20px 20px 0; }
.intro-img-placeholder {
    background: linear-gradient(135deg, #667eea22, #764ba222);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #667eea;
    font-weight: 600;
}
.intro-img-placeholder.large { height: 220px; font-size: 48px; }
.intro-img-placeholder.small { height: 110px; font-size: 32px; }
.intro-img-label { font-size: 16px; }
.intro-desc { padding: 20px 24px 24px; }
.intro-title {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
}
.intro-card-small .intro-title { font-size: 15px; }
.intro-desc p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}
/* 다크모드 */
.dark .intro-card { background: #1e1e3a; box-shadow: 0 4px 24px rgba(0,0,0,0.3); }
.dark .intro-img-placeholder { background: linear-gradient(135deg, #667eea33, #764ba233); }
.dark .intro-title { color: #e8e8f0; }
.dark .intro-desc p { color: #aaa; }
@media (max-width: 700px) {
    .intro-grid { grid-template-columns: 1fr; }
}

/* ── 사이트 푸터 ── */
.site-footer {
    text-align: center;
    padding: 24px 16px;
    margin-top: 40px;
    border-top: 1px solid rgba(0,0,0,0.08);
    font-size: 13px;
}
.site-footer a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}
.site-footer a:hover { color: #667eea; }
.dark .site-footer { border-top-color: rgba(255,255,255,0.08); }
.dark .site-footer a { color: #666; }
.dark .site-footer a:hover { color: #a78bfa; }

@media (max-width: 768px) {
    .topbar-nav { display: none; }
    .topbar { padding: 10px 16px; }
    .topbar-right { gap: 4px; }
    .welcome { display: none; }
    .dm-panel { width: 100vw; right: 0; border-radius: 16px 16px 0 0; bottom: 0; top: auto; height: 70vh; }
    .notif-panel { width: 100vw; right: 0; }
    .main-buttons { gap: 10px; }
    .main-btn { padding: 20px 16px; min-width: 130px; }
}

@media (max-width: 520px) {
    .main-btn { min-width: 100px; font-size: 14px; }
    .admin-link-btn, .settings-btn, .logout-btn { font-size: 12px; padding: 5px 8px; }
}
