/* 기본 초기화 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Malgun Gothic", "맑은 고딕", Arial, sans-serif;
    background-color: #f4f6f8;
    color: #222;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

/* 전체 */
.wrap {
    width: 100%;
    min-width: 0;
}

/* 헤더 */
.header {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e5ea;
}

.header-inner {
    width: calc(100% - 40px);
    max-width: 1100px;
    height: 72px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    align-items: center;
}

.logo {
    margin-right: 50px;
    font-size: 26px;
    font-weight: 800;
    color: #2f6fed;
}

.logo a {
    display: block;
}

.nav ul {
    display: flex;
    gap: 28px;
}

.nav a {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.nav a:hover {
    color: #2f6fed;
}

.header-user {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.btn-login,
.btn-signup {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    border: 1px solid #d5d9e0;
}

.btn-login {
    color: #333;
    background-color: #fff;
}

.btn-signup {
    color: #fff;
    background-color: #2f6fed;
    border-color: #2f6fed;
}

.btn-login:hover {
    background-color: #f2f4f7;
}

.btn-signup:hover {
    background-color: #1f5bd8;
}

/* 메인 레이아웃 */
.container {
    width: calc(100% - 40px);
    max-width: 1100px;
    margin: 30px auto 50px;
    padding: 0;
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.content {
    flex: 1;
    min-width: 0;
}

.full-content {
    width: 100%;
    min-width: 0;
}

.sidebar {
    width: 316px;
    flex-shrink: 0;
}

/* 공통 박스 */
.section-box,
.side-box {
    background-color: #ffffff;
    border: 1px solid #e2e5ea;
    border-radius: 10px;
    padding: 22px;
    margin-bottom: 22px;
}

.section-title {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
}

.section-title h3,
.side-box h3 {
    font-size: 20px;
    font-weight: 800;
}

.more-link {
    margin-left: auto;
    font-size: 13px;
    color: #777;
}

.more-link:hover {
    color: #2f6fed;
}

/* 공통 버튼 */
.btn-list,
.btn-write {
    display: inline-block;
    padding: 9px 15px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 700;
}

.btn-list {
    border: 1px solid #d5d9e0;
    background-color: #fff;
    color: #333;
}

.btn-list:hover {
    background-color: #f2f4f7;
}

.btn-write {
    background-color: #2f6fed;
    color: #fff;
}

.btn-write:hover {
    background-color: #1f5bd8;
}

/* 페이징 */
.pagination {
    margin-top: 22px;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.page-link {
    display: inline-block;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    line-height: 34px;
    text-align: center;
    border: 1px solid #d5d9e0;
    border-radius: 6px;
    background-color: #fff;
    color: #333;
    font-size: 14px;
}

.page-link:hover {
    background-color: #f2f4f7;
}

.page-link.active {
    border-color: #2f6fed;
    background-color: #2f6fed;
    color: #fff;
    font-weight: 700;
}

.page-link.disabled {
    color: #aaa;
    background-color: #f6f8fb;
    border-color: #e1e4e8;
    cursor: default;
    pointer-events: none;
}

.page-nav {
    min-width: 54px;
}

/* 푸터 */
.footer {
    padding: 30px 0;
    border-top: 1px solid #e2e5ea;
    background-color: #ffffff;
    text-align: center;
    color: #888;
    font-size: 13px;
}

.logout-form {
    display: inline-block;
}

.logout-btn {
    border: 1px solid #2f6fed;
    cursor: pointer;
    font-family: inherit;
}

.form-error-message {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #f1aeb5;
    border-radius: 6px;
    background-color: #fff5f5;
    color: #c92a2a;
    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 900px) {
    .container {
        flex-direction: column;
    }

    .content,
    .sidebar {
        width: 100%;
    }

    .sidebar {
        flex-shrink: 1;
    }
}

@media (max-width: 768px) {
    .header-inner {
        width: calc(100% - 28px);
        height: auto;
        min-height: 64px;
        padding: 14px 0;
        flex-wrap: wrap;
        gap: 12px;
    }

    .logo {
        margin-right: 20px;
        font-size: 22px;
    }

    .nav {
        width: 100%;
        order: 3;
    }

    .nav ul {
        flex-wrap: wrap;
        gap: 12px 18px;
    }

    .nav a {
        font-size: 14px;
    }

    .header-user {
        margin-left: auto;
    }

    .container {
        width: calc(100% - 28px);
        margin: 20px auto 36px;
        padding: 0;
    }

    .section-box,
    .side-box {
        padding: 18px;
        margin-bottom: 16px;
    }

    .pagination {
        flex-wrap: wrap;
    }
}