/* 1) 공통 변수 */
:root{
    --nav-h:56px;
    --bg:#0f172a;
    --fg:#e2e8f0;
    --muted:#94a3b8;
    --card:#fff;
    --line:#e5e7eb;
}

/* 2) reset */
*{ box-sizing:border-box; }
html, body{ margin:0; padding:0; }

/* 3) 폰트 정의 */
@font-face {
    font-family: 'InfinitySans-RegularA1';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_20-04@2.1/InfinitySans-RegularA1.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'MangoBoardByeolbyeol';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2405-3@1.1/MangoByeolbyeol.woff2') format('woff2');
    font-weight: normal;
    font-display: swap;
}

/* 4) 바디 기본 스타일 */
body{
    font-family: 'InfinitySans-RegularA1', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji';
    color:#0f172a;
    background:#f8fafc;
    padding-top:0; /* 상단 공백 제거 */
}

/* 메인 컨텐츠 영역 기본 패딩 */
.page-main{
    padding:16px;
}

/* 5) 상단 헤더(#13. SEOHYEON) */
.site-header {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    background: #fff;
}

.site-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        #8f00ff,
        #4b0082,
        #0000ff,
        #00ff00,
        #ffff00,
        #ff7f00,
        #ff0000,
        #ff7f00,
        #ffff00,
        #00ff00,
        #0000ff,
        #4b0082,
        #8f00ff
    );
}

.site-header .logo-text {
    font-family: 'MangoBoardByeolbyeol', InfinitySans-RegularA1, sans-serif;
    font-size: 30px;
    letter-spacing: 1px;
    margin: 0;
    padding: 0;
    text-decoration: none;   /* 밑줄 제거 */
    border: none;            /* 혹시 모르는 잔여 border 제거 */
    color:darksalmon;
}

/* 7) 공통 레이아웃 */
.container{ max-width:1100px; margin:0 auto; padding:16px; }
.card{ background:var(--card); border:1px solid var(--line); border-radius:14px; }

/* ===== PC 좌측 사이드바 ===== */
.side-nav {
    position: fixed;
    top: 50px;           /* .site-header 높이만큼 아래 */
    left: 0;
    width: 200px;
    bottom: 0;
    background: #0f172a;
    color: #e2e8f0;
    padding: 16px 12px;
    display: none;       /* 기본은 숨김 → PC에서만 보이게 */
    flex-direction: column;
    z-index: 900;
}

.side-nav__logo {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #94a3b8;
}

.side-nav__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-nav__item + .side-nav__item {
    margin-top: 8px;
}

.side-nav__item a {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 14px;
}

.side-nav__item a:hover {
    background: #111827;
}

.side-nav__item--logout a {
    color: #f97373;
}

/* ===== 모바일 하단 바 ===== */
.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 64px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 12px;
    z-index: 950;
}

.bottom-nav__btn {
    flex: 1;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    color: #64748b;
}

.bottom-nav__icon {
    font-size: 18px;
    margin-bottom: 2px;
}

.bottom-nav__label{
    font-size: 11px;
}

.bottom-nav__center {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    background: #ff7f50;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-16px);
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

.hamburger {
    width: 22px;
    height: 16px;
    position: relative;
}

.hamburger span {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: #ffffff;
    border-radius: 999px;
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 7px; }
.hamburger span:nth-child(3) { bottom: 0; }

/* ===== 모바일 전체 메뉴 레이어 ===== */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .5);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 1000;
}

.nav-overlay--open {
    opacity: 1;
    pointer-events: auto;
}

.nav-overlay__panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 70%;
    background: #ffffff;
    border-radius: 0 0 20px 20px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
}

.nav-overlay__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.nav-overlay__title {
    font-size: 16px;
    font-weight: 600;
}

.nav-overlay__close {
    border: none;
    background: none;
    font-size: 20px;
}

.nav-overlay__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.nav-overlay__item {
    border: none;
    background: #f8fafc;
    border-radius: 14px;
    padding: 10px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
}

.nav-overlay__icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: #e5e7eb;
    margin-bottom: 4px;
}

/* 오버레이 열릴 때 스크롤 락 */
body.nav-overlay-open {
    overflow: hidden;
}

/* ===== 반응형: PC vs 모바일 ===== */

/* PC (예: 폭 1024px 이상) */
@media (min-width: 1024px) {

    .side-nav {
        display: flex;
    }

    .bottom-nav,
    .nav-overlay {
        display: none;
    }

    /* 사이드바만큼 본문 여백 주기 */
    .page-main {
        margin-left: 200px;
    }

    body {
        padding-bottom: 0; /* 하단 바 없으니 필요 X */
    }
}

/* 모바일/태블릿 (1023px 이하) */
@media (max-width: 1023px) {

    .side-nav {
        display: none;
    }

    .bottom-nav {
        display: flex;
    }

    body {
        padding-bottom: 72px; /* 하단 바 높이만큼 여백 */
    }
}
