/* 커스텀 스타일 */

/* 전체 글씨 크기 축소 - 정보 밀도 향상 */
:root {
    font-size: 16px; /* 기본 크기 유지 */
}

html {
    font-size: 16px;
}

body {
    font-size: 0.875rem; /* 14px */
    line-height: 1.5;
}

h1 { font-size: 2.2rem !important; } /* 35.2px */
h2 { font-size: 1.9rem !important; } /* 30.4px */
h3 { font-size: 1.7rem !important; } /* 27.2px */
h4 { font-size: 1.6rem !important; } /* 25.6px */
h5 { font-size: 1.55rem !important; } /* 24.8px */
h6 { font-size: 1.5rem !important; } /* 24px */

p, li, td, th, label, input, textarea, select, button {
    font-size: 0.875rem; /* 14px */
}

small {
    font-size: 0.75rem; /* 12px */
}

/* 네비게이션 개선 */
nav ul li details summary {
    cursor: pointer;
}

/* 포럼 카테고리 카드 스타일 */
.forum-category {
    transition: transform 0.2s ease;
}

.forum-category:hover {
    transform: translateY(-2px);
}

/* 게시글 목록 스타일 */
.post-list-item {
    border-bottom: 1px solid var(--pico-muted-border-color);
    padding: 1rem 0;
}

.post-list-item:last-child {
    border-bottom: none;
}

.post-meta {
    color: var(--pico-muted-color);
    font-size: 0.8rem; /* 12.8px */
}

/* 댓글 스타일 */
.comment {
    border-left: 3px solid var(--pico-primary);
    padding-left: 1rem;
    margin: 1rem 0;
}

.comment-author {
    font-weight: bold;
    color: var(--pico-primary);
}

.comment-date {
    color: var(--pico-muted-color);
    font-size: 0.8rem; /* 12.8px */
}

/* 관리자 패널 스타일 */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
    background: var(--pico-card-background-color);
    border-radius: var(--pico-border-radius);
    border: 1px solid var(--pico-card-border-color);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--pico-primary);
}

.stat-label {
    color: var(--pico-muted-color);
    font-size: 0.8rem; /* 12.8px */
}

/* 정렬 옵션 스타일 */
.sort-options {
    margin-bottom: 1rem;
}

.sort-options a {
    margin-right: 1rem;
    text-decoration: none;
}

.sort-options a.active {
    font-weight: bold;
    color: var(--pico-primary);
}

/* 페이지네이션 스타일 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    text-decoration: none;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
}

.pagination .current {
    background: var(--pico-primary);
    color: var(--pico-primary-inverse);
    border-color: var(--pico-primary);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }

    .sort-options {
        text-align: center;
    }

    .sort-options a {
        display: block;
        margin: 0.5rem 0;
    }
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    .post-list-item {
        border-bottom-color: var(--pico-muted-border-color);
    }
}

/* 로딩 애니메이션 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--pico-muted-color);
    border-radius: 50%;
    border-top-color: var(--pico-primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 알림 메시지 스타일 */
.alert {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: var(--pico-border-radius);
    border: 1px solid;
}

.alert-success {
    background-color: var(--pico-ins-color);
    border-color: var(--pico-ins-color);
    color: var(--pico-color);
}

.alert-error {
    background-color: var(--pico-del-color);
    border-color: var(--pico-del-color);
    color: var(--pico-color);
}

.alert-warning {
    background-color: var(--pico-mark-background-color);
    border-color: var(--pico-mark-color);
    color: var(--pico-color);
}
/*
 Alpine.js 트랜지션 효과 */
[x-cloak] {
    display: none !important;
}

.x-transition-enter {
    opacity: 0;
    transform: scale(0.95);
}

.x-transition-enter-active {
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.x-transition-enter-to {
    opacity: 1;
    transform: scale(1);
}

.x-transition-leave {
    opacity: 1;
    transform: scale(1);
}

.x-transition-leave-active {
    transition: opacity 0.2s ease-in, transform 0.2s ease-in;
}

.x-transition-leave-to {
    opacity: 0;
    transform: scale(0.95);
}

/* 다크모드 토글 버튼 */
nav button[title="다크모드 토글"] {
    padding: 0.5rem;
    min-width: auto;
    border: none;
    background: transparent;
}

nav button[title="다크모드 토글"]:hover {
    background: var(--pico-secondary-hover);
}

/* 알림 컨테이너 */
#alert-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    max-width: 400px;
}

#alert-container .alert {
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 댓글 폼 개선 */
.comment-form {
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-card-border-color);
    border-radius: var(--pico-border-radius);
    padding: 1.5rem;
    margin: 2rem 0;
}

.comment-form h5 {
    margin-top: 0;
    color: var(--pico-primary);
}

/* 댓글 목록 개선 */
.comments-section {
    margin: 2rem 0;
}

.comments-section h5 button {
    background: none;
    border: 1px solid var(--pico-muted-border-color);
    color: var(--pico-color);
    padding: 0.5rem 1rem;
    border-radius: var(--pico-border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.comments-section h5 button:hover {
    background: var(--pico-secondary-hover);
    border-color: var(--pico-primary);
}

.comments-list {
    margin-top: 1rem;
}

.comment {
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-card-border-color);
    border-radius: var(--pico-border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.comment:last-child {
    margin-bottom: 0;
}

.comment header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--pico-muted-border-color);
}

.comment-actions {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--pico-muted-border-color);
}

.comment-actions a {
    margin-right: 1rem;
    text-decoration: none;
    font-size: 0.8rem; /* 12.8px */
}

.comment-actions a:hover {
    text-decoration: underline;
}

/* 게시글 카드 개선 */
.post-list-item {
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-card-border-color);
    border-radius: var(--pico-border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.post-list-item header h4 {
    margin: 0 0 0.5rem 0;
}

.post-list-item header h4 a {
    text-decoration: none;
    color: var(--pico-primary);
}

.post-list-item header h4 a:hover {
    text-decoration: underline;
}

.post-preview button {
    background: none;
    border: 1px solid var(--pico-primary);
    color: var(--pico-primary);
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem; /* 12.8px */
    border-radius: var(--pico-border-radius);
    cursor: pointer;
    margin-left: 0.5rem;
}

.post-preview button:hover {
    background: var(--pico-primary);
    color: var(--pico-primary-inverse);
}

/* 정렬 옵션 개선 */
.sort-options {
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-card-border-color);
    border-radius: var(--pico-border-radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.sort-options strong {
    color: var(--pico-primary);
    white-space: nowrap;
}

.sort-options a {
    padding: 0.5rem 1rem;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    text-decoration: none;
    color: var(--pico-color);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sort-options a:hover {
    border-color: var(--pico-primary);
    background: var(--pico-secondary-hover);
}

.sort-options a.active {
    background: var(--pico-primary);
    color: var(--pico-primary-inverse);
    border-color: var(--pico-primary);
}

/* 모바일 반응형 개선 */
@media (max-width: 768px) {
    .sort-options {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .sort-options a {
        margin: 0.25rem 0;
    }

    .post-meta {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }

    .post-meta span {
        font-size: 0.75rem; /* 12px */
    }

    .comment header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .comment-actions {
        text-align: center;
    }

    #alert-container {
        position: relative;
        top: auto;
        right: auto;
        max-width: none;
        margin: 1rem 0;
    }

    nav ul {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    nav details summary {
        font-size: 0.85rem; /* 13.6px */
    }
}

/* 접근성 개선 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 포커스 스타일 개선 */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--pico-primary);
    outline-offset: 2px;
}

/* 스크린 리더 전용 텍스트 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}/* 메인 페이지
 스타일 */
.hero {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, var(--pico-primary) 0%, var(--pico-secondary) 100%);
    color: var(--pico-primary-inverse);
    border-radius: var(--pico-border-radius);
    margin-bottom: 2rem;
}

.hero hgroup h1 {
    font-size: 2.2rem !important; /* 35.2px */
    margin-bottom: 0.5rem;
}

.hero hgroup p {
    font-size: 1rem; /* 16px */
    opacity: 0.9;
    margin-bottom: 2rem;
}

.welcome-message {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--pico-border-radius);
    padding: 1rem;
    margin: 1rem auto;
    max-width: 400px;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.cta-buttons a {
    min-width: 150px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    max-width: 600px;
    margin: 2rem auto 0;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--pico-border-radius);
    padding: 1rem;
}

.stat-number {
    display: block;
    font-size: 1.8rem; /* 28.8px */
    font-weight: bold;
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.85rem; /* 13.6px */
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* 검색 섹션 */
.search-section {
    margin: 2rem 0;
}

.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-card-border-color);
    border-top: none;
    border-radius: 0 0 var(--pico-border-radius) var(--pico-border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-item {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--pico-color);
    border-bottom: 1px solid var(--pico-muted-border-color);
    transition: background-color 0.2s ease;
}

.suggestion-item:hover {
    background: var(--pico-secondary-hover);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item strong {
    display: block;
    color: var(--pico-primary);
}

.suggestion-item small {
    color: var(--pico-muted-color);
    font-size: 0.75rem; /* 12px */
}

/* 카테고리 섹션 */
.categories-section header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.forum-category {
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-card-border-color);
    border-radius: var(--pico-border-radius);
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.forum-category:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--pico-primary);
}

.forum-category header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.forum-category header h3 {
    margin: 0;
    flex: 1;
}

.category-link {
    text-decoration: none;
    color: var(--pico-primary);
    font-weight: bold;
}

.category-link:hover {
    text-decoration: underline;
}

.expand-btn {
    background: none;
    border: 1px solid var(--pico-muted-border-color);
    color: var(--pico-muted-color);
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem; /* 12px */
    border-radius: var(--pico-border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 2rem;
    margin-left: 1rem;
}

.expand-btn:hover,
.expand-btn.active {
    border-color: var(--pico-primary);
    color: var(--pico-primary);
    background: var(--pico-secondary-hover);
}

.category-description {
    color: var(--pico-muted-color);
    font-size: 0.875rem; /* 14px */
    line-height: 1.5;
    margin-bottom: 1rem;
}

.category-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem; /* 13.6px */
}

.category-stats .stat {
    color: var(--pico-muted-color);
    white-space: nowrap;
}

.recent-posts-preview {
    background: var(--pico-secondary-background);
    border-radius: var(--pico-border-radius);
    padding: 1rem;
    margin: 1rem 0;
}

.recent-posts-preview h6 {
    margin: 0 0 0.75rem 0;
    color: var(--pico-primary);
    font-size: 0.9rem; /* 14.4px */
}

.recent-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-posts-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--pico-muted-border-color);
}

.recent-posts-list li:last-child {
    border-bottom: none;
}

.recent-posts-list a {
    text-decoration: none;
    color: var(--pico-color);
    font-size: 0.85rem; /* 13.6px */
    flex: 1;
    margin-right: 1rem;
}

.recent-posts-list a:hover {
    color: var(--pico-primary);
    text-decoration: underline;
}

.recent-posts-list small {
    color: var(--pico-muted-color);
    font-size: 0.75rem; /* 12px */
    white-space: nowrap;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--pico-card-background-color);
    border: 2px dashed var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
}

.empty-state h3 {
    color: var(--pico-muted-color);
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--pico-muted-color);
    margin-bottom: 2rem;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .hero {
        padding: 2rem 1rem;
    }

    .hero hgroup h1 {
        font-size: 2rem !important; /* 32px */
    }

    .hero hgroup p {
        font-size: 0.9rem; /* 14.4px */
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons a {
        width: 100%;
        max-width: 250px;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .stat-item {
        padding: 0.75rem 0.5rem;
    }

    .stat-number {
        font-size: 1.5rem; /* 24px */
    }

    .categories-section header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .forum-category {
        padding: 1rem;
    }

    .forum-category header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .expand-btn {
        align-self: flex-end;
        margin-left: 0;
    }

    .category-stats {
        flex-direction: column;
        gap: 0.5rem;
    }

    .recent-posts-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .recent-posts-list a {
        margin-right: 0;
    }
}

/* 다크 모드 특별 스타일 */
@media (prefers-color-scheme: dark) {
    .hero {
        background: linear-gradient(135deg, var(--pico-primary) 0%, #2d3748 100%);
    }

    .forum-category:hover {
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    }

    .search-suggestions {
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }
}/* 에러 페이지 스
타일 */
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.error-container {
    text-align: center;
    max-width: 600px;
    width: 100%;
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-card-border-color);
    border-radius: var(--pico-border-radius);
    padding: 3rem 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.error-header {
    margin-bottom: 2rem;
}

.error-icon {
    font-size: 3rem; /* 48px */
    margin-bottom: 1rem;
    display: block;
}

.error-code {
    font-size: 2.5rem; /* 40px */
    font-weight: bold;
    color: var(--pico-del-color);
    margin: 0 0 0.5rem 0;
    line-height: 1;
}

.error-title {
    font-size: 1.5rem; /* 24px */
    color: var(--pico-color);
    margin: 0 0 1rem 0;
    font-weight: normal;
}

.error-content {
    margin-bottom: 2rem;
}

.error-description {
    font-size: 0.95rem; /* 15.2px */
    color: var(--pico-muted-color);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.error-details {
    text-align: left;
    background: var(--pico-secondary-background);
    border-radius: var(--pico-border-radius);
    padding: 1rem;
    margin: 1rem 0;
}

.error-details summary {
    cursor: pointer;
    font-weight: bold;
    color: var(--pico-primary);
    margin-bottom: 0.5rem;
}

.error-details p {
    margin: 0.5rem 0 0 0;
    font-family: monospace;
    font-size: 0.85rem; /* 13.6px */
    color: var(--pico-muted-color);
    word-break: break-word;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.error-actions a,
.error-actions button {
    min-width: 120px;
}

.error-help {
    text-align: left;
    background: var(--pico-secondary-background);
    border-radius: var(--pico-border-radius);
    padding: 1.5rem;
    margin-top: 2rem;
}

.error-help h4 {
    color: var(--pico-primary);
    margin: 0 0 1rem 0;
    font-size: 0.95rem; /* 15.2px */
}

.error-help ul {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
}

.error-help li {
    margin-bottom: 0.5rem;
    color: var(--pico-muted-color);
    line-height: 1.5;
}

.error-help a[role="button"] {
    margin-top: 1rem;
    display: inline-block;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .error-container {
        padding: 2rem 1rem;
        margin: 1rem;
    }

    .error-icon {
        font-size: 2.5rem; /* 40px */
    }

    .error-code {
        font-size: 2rem; /* 32px */
    }

    .error-title {
        font-size: 1.3rem; /* 20.8px */
    }

    .error-actions {
        flex-direction: column;
        align-items: center;
    }

    .error-actions a,
    .error-actions button {
        width: 100%;
        max-width: 250px;
    }
}

/* 애니메이션 효과 */
@keyframes errorBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.error-icon {
    animation: errorBounce 2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .error-icon {
        animation: none;
    }
}/* 브레
드크럼 네비게이션 */
.breadcrumb {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    background: var(--pico-secondary-background);
    border-radius: var(--pico-border-radius);
    border: 1px solid var(--pico-muted-border-color);
}

.breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: '›';
    margin-left: 0.5rem;
    color: var(--pico-muted-color);
    font-weight: bold;
}

.breadcrumb a {
    text-decoration: none;
    color: var(--pico-primary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--pico-border-radius);
    transition: background-color 0.2s ease;
}

.breadcrumb a:hover {
    background: var(--pico-secondary-hover);
    text-decoration: underline;
}

.breadcrumb span[aria-current="page"] {
    color: var(--pico-color);
    font-weight: bold;
    padding: 0.25rem 0.5rem;
}

/* 모달 스타일 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-card-border-color);
    border-radius: var(--pico-border-radius);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--pico-muted-border-color);
    background: var(--pico-secondary-background);
}

.modal-header h3 {
    margin: 0;
    color: var(--pico-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--pico-muted-color);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    border-radius: var(--pico-border-radius);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--pico-secondary-hover);
    color: var(--pico-color);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--pico-muted-border-color);
    background: var(--pico-secondary-background);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.modal-footer button {
    margin: 0;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .breadcrumb {
        margin: 0.5rem 0;
        padding: 0.5rem;
    }

    .breadcrumb ol {
        font-size: 0.9rem;
    }

    .modal-container {
        padding: 0.5rem;
    }

    .modal-content {
        max-height: 95vh;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer button {
        width: 100%;
    }
}

/* 다크 모드 모달 */
@media (prefers-color-scheme: dark) {
    .modal-content {
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    }
}

/* ========================================
   관리자 페이지 공통 스타일
   ======================================== */

/* 페이지 헤더 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--pico-muted-border-color);
}

/* 알림 메시지 */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: var(--pico-border-radius);
    border: 1px solid;
}

.alert.success {
    background: var(--pico-ins-background-color);
    border-color: var(--pico-ins-color);
    color: var(--pico-ins-color);
}

/* 관리 테이블 */
.admin-table {
    background: var(--pico-card-background-color);
    border-radius: var(--pico-border-radius);
    overflow: hidden;
    box-shadow: var(--pico-card-box-shadow);
}

.table-header {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    background: var(--pico-primary-background);
    color: var(--pico-primary-inverse);
    font-weight: bold;
}

.table-row {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--pico-muted-border-color);
    transition: background-color 0.2s;
}

.table-row:hover {
    background: var(--pico-secondary-background);
}

.table-row:last-child {
    border-bottom: none;
}

/* 드래그 핸들 */
.drag-handle {
    cursor: grab;
    color: var(--pico-muted-color);
    font-size: 1.2rem;
}

.drag-handle:active {
    cursor: grabbing;
}

/* 상태 배지 */
.status-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-badge.active {
    background: var(--pico-ins-background-color);
    color: var(--pico-ins-color);
}

.status-badge.inactive {
    background: var(--pico-del-background-color);
    color: var(--pico-del-color);
}

/* 작은 버튼 */
.btn-small {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    text-decoration: none;
    border-radius: var(--pico-border-radius);
    border: none;
    cursor: pointer;
    background: var(--pico-primary);
    color: var(--pico-primary-inverse);
}

.btn-small.secondary {
    background: var(--pico-secondary);
    color: var(--pico-secondary-inverse);
}

.btn-small.danger {
    background: var(--pico-del-color);
    color: white;
}

.btn-small:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-small:hover:not(:disabled) {
    opacity: 0.8;
}

/* 빈 상태 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--pico-muted-color);
}

/* 서브포럼 관리 전용 */
.categories-table .table-header,
.categories-table .category-row {
    grid-template-columns: 80px 1fr 1fr 120px 80px 120px;
}

.category-row {
    cursor: move;
}

.col-order {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.order-number {
    font-weight: bold;
    color: var(--pico-primary);
}

.col-name strong {
    color: var(--pico-color);
}

.col-name small {
    color: var(--pico-muted-color);
}

.col-description {
    color: var(--pico-muted-color);
    font-size: 0.9rem;
    line-height: 1.3;
}

.col-stats {
    font-size: 0.85rem;
    color: var(--pico-muted-color);
}

.col-stats div {
    margin-bottom: 0.25rem;
}

.col-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* 반응형 - 관리자 페이지 */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .table-header,
    .table-row,
    .categories-table .table-header,
    .categories-table .category-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .col-order,
    .col-stats,
    .col-actions {
        font-size: 0.8rem;
    }

    .col-actions {
        justify-content: center;
    }
}

/* ========================================
   서브포럼 페이지 스타일
   ======================================== */

/* 서브포럼 헤더 */
.subforum-header {
    background: var(--pico-card-background-color);
    border-radius: 0.75rem;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--pico-muted-border-color);
    position: relative;
    overflow: hidden;
}

.subforum-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--pico-primary), var(--pico-secondary));
}

.subforum-header h1 {
    font-size: 2rem !important;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--pico-color);
}

.subforum-header p {
    font-size: 1.1rem;
    color: var(--pico-muted-color);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.subforum-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.subforum-stats span {
    background: var(--pico-background-color);
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--pico-muted-color);
    border: 1px solid var(--pico-muted-border-color);
}

/* 포럼 검색 */
.forum-search {
    margin-bottom: 2rem;
}

.search-form {
    max-width: 600px;
    margin: 0 auto;
}

.search-form fieldset {
    margin: 0;
    background: var(--pico-card-background-color);
    border-radius: 0.75rem;
    padding: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-form input[type="text"] {
    font-size: 1.1rem;
    border: none;
    background: transparent;
}

.search-form button {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
}

/* 포럼 컨트롤 */
.forum-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--pico-card-background-color);
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--pico-muted-border-color);
}

.controls-left a {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.controls-left a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.controls-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.controls-right label {
    font-weight: 600;
    color: var(--pico-color);
}

.controls-right select {
    margin: 0;
    min-width: 180px;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: 2px solid var(--pico-muted-border-color);
    background: var(--pico-background-color);
    font-weight: 500;
}

/* 게시글 테이블 */
.posts-table {
    background: var(--pico-card-background-color);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--pico-muted-border-color);
}

.posts-header {
    display: grid;
    grid-template-columns: 2fr 150px 120px 140px;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--pico-primary), var(--pico-secondary));
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.post-row {
    display: grid;
    grid-template-columns: 2fr 150px 120px 140px;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--pico-muted-border-color);
    transition: all 0.2s;
    position: relative;
}

.post-row:hover {
    background: var(--pico-background-color);
    transform: translateX(4px);
}

.post-row:last-child {
    border-bottom: none;
}

.post-row.recent {
    border-left: 4px solid var(--pico-primary);
    background: linear-gradient(90deg, rgba(var(--pico-primary-rgb), 0.05), transparent);
}

.post-title {
    min-width: 0;
}

.post-title-link {
    text-decoration: none;
    color: var(--pico-color);
    transition: color 0.2s;
    display: block;
    font-size: 0.875rem;
    font-weight: bold;
    line-height: 1.4;
    margin: 0 0 0.5rem 0;
}

.post-title-link:hover {
    color: var(--pico-primary);
}

.post-preview {
    margin: 0;
    font-size: 0.9rem;
    color: var(--pico-muted-color);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border-radius: 1rem;
    margin-left: 0.5rem;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.post-author {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.username {
    font-weight: 600;
    color: var(--pico-color);
    font-size: 0.95rem;
}

.role-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 1rem;
    font-weight: 600;
    text-align: center;
}

.role-badge.admin {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.role-badge.moderator {
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
}

.post-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.post-stats span {
    padding: 0.25rem 0.5rem;
    background: var(--pico-background-color);
    border-radius: 0.25rem;
    text-align: center;
    font-weight: 500;
    color: var(--pico-muted-color);
}

.views {
    color: var(--pico-primary) !important;
}

.comments {
    color: var(--pico-secondary) !important;
}

.post-date {
    font-size: 0.9rem;
    color: var(--pico-muted-color);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.post-date time {
    font-weight: 600;
    color: var(--pico-color);
}

.post-date small {
    font-size: 0.8rem;
    color: var(--pico-muted-color);
}

/* 반응형 - 서브포럼 페이지 */
@media (max-width: 768px) {
    .subforum-header {
        padding: 2rem;
    }

    .subforum-header h1 {
        font-size: 1.6rem !important;
    }

    .subforum-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .forum-controls {
        flex-direction: column;
        gap: 1.5rem;
        align-items: stretch;
    }

    .controls-right {
        justify-content: center;
    }

    .posts-header {
        display: none;
    }

    .post-row {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.5rem;
    }

    .post-author,
    .post-stats,
    .post-date {
        font-size: 0.85rem;
    }

    .post-stats {
        flex-direction: row;
        justify-content: space-around;
    }

    .post-date {
        text-align: left;
    }

    .search-form {
        max-width: none;
    }
}

/* 다크 모드 - 서브포럼 */
@media (prefers-color-scheme: dark) {
    .subforum-header {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .posts-table {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .forum-controls {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
}

/* ============================================
   서브포럼 관리 페이지 스타일
   ============================================ */

.categories-management {
  margin-top: 1.5rem;
}

.categories-table {
  background: var(--card-background-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-box-shadow);
}

.table-header {
  display: grid;
  grid-template-columns: 80px 2fr 3fr 120px 100px 140px;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--table-border-color);
  font-weight: 600;
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--table-border-color);
}

.sortable-list {
  display: flex;
  flex-direction: column;
}

.category-row {
  display: grid;
  grid-template-columns: 80px 2fr 3fr 120px 100px 140px;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--table-border-color);
  transition: background-color 0.2s;
  cursor: move;
}

.category-row:hover {
  background: var(--table-row-stripped-background-color);
}

.category-row:last-child {
  border-bottom: none;
}

.category-row > div {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
}

.col-order {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.drag-handle {
  cursor: grab;
  color: var(--muted-color);
  font-size: 1rem;
  user-select: none;
}

.drag-handle:active {
  cursor: grabbing;
}

.order-number {
  font-weight: 600;
  color: var(--muted-color);
}

.col-name strong {
  font-size: 0.875rem;
  color: var(--color);
}

.col-name small {
  font-size: 0.75rem;
  color: var(--muted-color);
}

.col-description {
  color: var(--muted-color);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.col-description em {
  color: var(--muted-border-color);
}

.col-stats {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.125rem;
  font-size: 0.8125rem;
}

.col-stats > div {
  color: var(--muted-color);
}

.col-status {
  justify-content: center;
}

.col-actions {
  display: flex;
  gap: 0.375rem;
  justify-content: flex-end;
}

.btn-small {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  min-width: auto;
  border-radius: 4px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-small:hover {
  background: var(--primary-hover);
}

.btn-small.secondary {
  background: var(--secondary);
}

.btn-small.secondary:hover {
  background: var(--secondary-hover);
}

.btn-small.danger {
  background: var(--del-color);
}

.btn-small.danger:hover {
  background: var(--del-color-hover);
}

.btn-small:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--muted-color);
}

.empty-state p {
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

/* 반응형 디자인 */
@media (max-width: 1024px) {
  .table-header,
  .category-row {
    grid-template-columns: 60px 1.5fr 2fr 100px 80px 120px;
    gap: 0.5rem;
    font-size: 0.8125rem;
  }

  .col-description {
    font-size: 0.75rem;
  }

  .col-stats {
    font-size: 0.75rem;
  }
}

@media (max-width: 768px) {
  .table-header {
    display: none;
  }

  .category-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 1rem;
  }

  .category-row > div {
    justify-content: flex-start;
  }

  .col-order {
    order: 1;
  }

  .col-name {
    order: 2;
    flex-direction: column;
    align-items: flex-start;
  }

  .col-description {
    order: 3;
  }

  .col-stats {
    order: 4;
    flex-direction: row;
    gap: 1rem;
  }

  .col-status {
    order: 5;
    justify-content: flex-start;
  }

  .col-actions {
    order: 6;
    justify-content: flex-start;
  }
}
