@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700&display=swap');

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

:root {
    --primary: #7c4dff;
    --primary-hover: #651fff;
    --on-primary: #ffffff;
    --surface: #121212;
    --surface-elevated: #1e1e1e;
    --on-surface: #e8e8e8;
    --on-surface-muted: #a0a0a0;
    --surface-variant: #2d2d2d;
    --outline: #404040;
    --error: #ff6b6b;
    --success: #4caf50;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--surface);
    color: var(--on-surface);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* 모바일 디바이스 강제 스타일 */
/* 모바일 디바이스 클래스는 미디어 쿼리로 처리 (위에서 처리됨) */

.hidden {
    display: none !important;
}

/* 로딩 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: var(--surface);
    z-index: 9999;
}

.loading p {
    color: var(--on-surface-muted);
    font-size: 14px;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 3px solid var(--surface-variant);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 화면 */
.screen {
    min-height: 100vh;
}

#main-screen {
    padding: 0;
}

.container {
    max-width: 420px;
    margin: 0 auto;
    padding-top: 48px;
}

.card {
    background: var(--surface-elevated);
    padding: 28px;
    border-radius: var(--radius);
    margin-top: 24px;
    border: 1px solid var(--outline);
}

.register-desc,
.register-hint {
    font-size: 14px;
    color: var(--on-surface-muted);
    margin-bottom: 12px;
}

.register-gender-box {
    padding: 12px 16px;
    margin-bottom: 14px;
    background: var(--surface-variant);
    border-radius: var(--radius-sm);
    font-size: 15px;
}

.verify-gender {
    display: flex;
    gap: 20px;
    margin-bottom: 14px;
}

.verify-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 14px;
}

h1 {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--on-surface);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.brand {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--on-surface);
}

h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--on-surface);
    margin-bottom: 20px;
}

/* 폼 */
input[type="text"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 14px;
    background: var(--surface-variant);
    border: 1px solid var(--outline);
    border-radius: var(--radius-sm);
    color: var(--on-surface);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input::placeholder,
textarea::placeholder {
    color: var(--on-surface-muted);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(124, 77, 255, 0.25);
}

label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--on-surface);
    font-size: 14px;
    cursor: pointer;
}

label input[type="radio"] {
    width: auto;
    margin: 0;
}

button {
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

button:active {
    transform: scale(0.98);
}

button:hover:not(:disabled) {
    opacity: 0.92;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: var(--on-primary);
    width: 100%;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--surface-variant);
    color: var(--on-surface);
    width: 100%;
    margin-top: 10px;
    border: 1px solid var(--outline);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--outline);
}

.btn-icon {
    background: transparent;
    color: var(--on-surface);
    padding: 8px 12px;
    font-size: 14px;
}

.btn-outline {
    background: transparent;
    color: var(--on-surface-muted);
    padding: 8px 14px;
    font-size: 14px;
    border: 1px solid var(--outline);
}

.btn-outline:hover:not(:disabled) {
    color: var(--on-surface);
    background: var(--surface-variant);
}

.error {
    color: var(--error);
    margin-top: 10px;
    font-size: 13px;
}

.link-text {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--on-surface-muted);
}

.link-text a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.link-text a:hover {
    text-decoration: underline;
}


/* 상단 헤더 (제목 + 프로필) */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--surface);
    border-bottom: 1px solid var(--outline);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    z-index: 200;
    pointer-events: auto;
}

.main-header * {
    pointer-events: auto;
}

/* 모바일에서 헤더 높이 조정 */
@media screen and (max-width: 768px) {
    .main-header {
        height: 56px !important;
        padding: 0 12px !important;
    }
}

.main-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.03em;
    color: var(--on-surface);
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-name {
    color: var(--on-surface);
    font-size: 14px;
    font-weight: 500;
}

/* 햄버거 메뉴 버튼 (데스크톱에서는 숨김) */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--on-surface);
    font-size: 1.5rem;
    padding: 8px 12px;
    cursor: pointer;
    margin-right: 8px;
    transition: opacity 0.2s;
    pointer-events: auto !important;
    z-index: 1001 !important;
    position: relative;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    min-width: 44px;
    min-height: 44px;
}

.mobile-menu-btn:hover {
    opacity: 0.8;
}

.mobile-menu-btn:active {
    opacity: 0.6;
    background: rgba(255, 255, 255, 0.05);
}

.mobile-menu-btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* 왼쪽 고정 사이드바 (데스크톱에서만 표시) */
.sidebar {
    position: fixed;
    left: 0;
    top: 60px; /* 헤더 아래부터 */
    bottom: 0;
    width: 200px;
    background: var(--surface-elevated);
    border-right: 1px solid var(--outline);
    overflow-y: auto;
    z-index: 50;
    transition: transform 0.3s ease;
}

/* 모바일에서 사이드바 슬라이드 메뉴로 변경 */
@media screen and (max-width: 768px) {
    /* 햄버거 메뉴 버튼 표시 */
    .mobile-menu-btn {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        position: relative !important;
        left: 0 !important;
        width: auto !important;
        height: auto !important;
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 8px 12px !important;
        margin-right: 8px !important;
        cursor: pointer !important;
        z-index: 1001 !important;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1) !important;
        touch-action: manipulation !important;
        user-select: none !important;
        -webkit-user-select: none !important;
    }
    
    /* 사이드바 기본적으로 숨김 (왼쪽으로 슬라이드) */
    .sidebar,
    aside.sidebar {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 250px !important;
        height: auto !important;
        top: 56px !important;
        bottom: 0 !important;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 300 !important;
        position: fixed !important;
        left: 0 !important;
        overflow-y: auto !important;
    }
    
    /* 사이드바 열림 상태 */
    .sidebar.open {
        transform: translateX(0) !important;
    }
    
    /* 사이드바 내부 요소 표시 */
    .sidebar-header,
    .sidebar-header h3,
    .board-nav,
    .board-item {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: auto !important;
        height: auto !important;
        position: relative !important;
        left: 0 !important;
        margin: 0 !important;
        padding: inherit !important;
        border: inherit !important;
        pointer-events: auto !important;
    }
    
    /* 콘텐츠 영역 전체 너비 */
    .content-area,
    body.mobile-device .content-area {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* 하단 네비게이션 전체 너비 */
    .bottom-nav,
    body.mobile-device .bottom-nav {
        left: 0 !important;
        width: 100% !important;
    }
    
    /* 사이드바 오버레이 표시 */
    .sidebar-overlay {
        display: block !important;
        visibility: visible !important;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    
    .sidebar-overlay.active {
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--outline);
}

.sidebar-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--on-surface);
    margin: 0;
}

.board-nav {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
}

.board-item {
    background: transparent;
    border: none;
    padding: 12px 16px;
    text-align: left;
    color: var(--on-surface-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    border-left: 3px solid transparent;
}

.board-item:hover {
    background: var(--surface-variant);
    color: var(--on-surface);
}

.board-item.active {
    background: rgba(124, 77, 255, 0.15);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

/* 모바일에서 사이드바 내부 요소 모두 제거 */
@media screen and (max-width: 768px) {
    .sidebar-header,
    .sidebar-header h3,
    .board-nav,
    .board-item {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        position: absolute !important;
        left: -9999px !important;
    }
}

/* 오른쪽 콘텐츠 영역 (데스크톱) */
.content-area {
    margin-left: 200px; /* 사이드바 너비만큼 여백 */
    margin-top: 60px; /* 헤더 높이만큼 여백 */
    min-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
}

/* 모바일에서 콘텐츠 영역 전체 너비 - 강제 적용 */
@media screen and (max-width: 768px) {
    .content-area {
        margin-left: 0 !important;
        margin-top: 56px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* 액션 바 */
.action-bar {
    padding: 12px 16px;
    border-bottom: 1px solid var(--outline);
    background: var(--surface);
    position: sticky;
    top: 60px;
    z-index: 100;
}

.action-bar .btn-primary {
    width: auto;
    padding: 10px 16px;
    font-size: 14px;
}

/* 콘텐츠 래퍼 */
.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.content {
    max-width: 800px;
    margin: 0 auto;
    padding: 16px 12px 90px;
    min-height: calc(100vh - 60px);
    width: 100%;
}

/* 모바일에서 콘텐츠 패딩 조정 */
@media screen and (max-width: 768px) {
    .content {
        max-width: 100% !important;
        padding: 12px 8px 80px !important;
    }
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 200px; /* 사이드바 너비만큼 오른쪽으로 이동 */
    right: 0;
    background: var(--surface-elevated);
    display: flex;
    justify-content: space-around;
    padding: 10px 0 20px;
    border-top: 1px solid var(--outline);
    z-index: 100;
}

/* 모바일에서 하단 네비게이션 전체 너비 - 강제 적용 */
@media screen and (max-width: 768px) {
    .bottom-nav {
        left: 0 !important;
        width: 100% !important;
    }
}

.nav-item {
    background: transparent;
    color: var(--on-surface-muted);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s, background 0.2s;
}

.nav-item:hover {
    color: var(--on-surface);
}

.nav-item.active {
    background: rgba(124, 77, 255, 0.15);
    color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 게시글 목록 */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.posts-list:empty::before {
    content: '아직 글이 없습니다.';
    display: block;
    text-align: center;
    padding: 48px 20px;
    color: var(--on-surface-muted);
    font-size: 15px;
}

.post-card {
    background: var(--surface-elevated);
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s;
    border: 1px solid transparent;
}

.post-card:hover {
    background: var(--surface-variant);
}

.post-title {
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--on-surface);
    line-height: 1.4;
}

.post-meta {
    font-size: 13px;
    color: var(--on-surface-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.post-images {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.post-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.post-image:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.post-images-detail {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.post-image-detail {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.post-image-detail:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.post-stats {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--on-surface-muted);
}

.post-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 16px 0;
    padding: 12px 0;
    border-top: 1px solid var(--outline);
    border-bottom: 1px solid var(--outline);
}

.btn-like {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--surface-elevated);
    border: 1px solid var(--outline);
    border-radius: var(--radius-sm);
    color: var(--on-surface);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-like:hover {
    background: var(--surface-variant);
    border-color: var(--primary);
}

.btn-like.liked {
    background: rgba(255, 107, 107, 0.1);
    border-color: var(--error);
    color: var(--error);
}

.btn-like.liked:hover {
    background: rgba(255, 107, 107, 0.2);
}

.like-icon {
    font-size: 18px;
    line-height: 1;
}

.view-count {
    font-size: 14px;
    color: var(--on-surface-muted);
    margin-left: auto;
}

/* 모달 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal:not(.hidden) {
    display: flex !important;
}

.modal-content {
    background: var(--surface-elevated);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--outline);
    box-shadow: var(--shadow);
}

.modal-content.large {
    max-width: 640px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--outline);
}

.modal-header h2 {
    margin: 0;
}

.close-btn {
    background: var(--surface-variant);
    color: var(--on-surface);
    font-size: 18px;
    padding: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: var(--outline);
}

/* 이미지 미리보기 */
.image-preview {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 14px 0;
}

.image-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.image-preview-item .remove-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--error);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    padding: 0;
    font-size: 14px;
    line-height: 1;
}

/* 댓글 */
.comments-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--outline);
}

.comments-section h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--on-surface-muted);
    margin-bottom: 14px;
}

.comment-item {
    background: var(--surface-variant);
    padding: 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    font-size: 14px;
    color: var(--on-surface);
}

.comment-content {
    color: var(--on-surface);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.comment-time {
    font-size: 12px;
    color: var(--on-surface-muted);
}

.comment-actions {
    margin-top: 8px;
}

.btn-reply {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.btn-reply:hover {
    background: var(--surface-elevated);
}

.comment-replies {
    margin-top: 12px;
    padding-left: 24px;
    border-left: 2px solid var(--outline);
}

.comment-reply {
    background: var(--surface-elevated);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.reply-form {
    margin-top: 12px;
    padding-left: 24px;
}

.reply-input {
    width: 100%;
    padding: 8px 12px;
    background: var(--surface-elevated);
    border: 1px solid var(--outline);
    border-radius: var(--radius-sm);
    color: var(--on-surface);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 8px;
}

.reply-input:focus {
    outline: none;
    border-color: var(--primary);
}

.reply-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.btn-reply-submit,
.btn-reply-cancel {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: none;
    transition: opacity 0.2s;
}

.btn-reply-submit {
    background: var(--primary);
    color: var(--on-primary);
}

.btn-reply-cancel {
    background: transparent;
    color: var(--on-surface);
    border: 1px solid var(--outline);
}

.btn-reply-submit:hover,
.btn-reply-cancel:hover {
    opacity: 0.8;
}

/* 빈 상태 */
.empty-state {
    text-align: center;
    padding: 80px 24px;
    color: var(--on-surface-muted);
    font-size: 15px;
}

.empty-state p {
    margin-bottom: 8px;
}

/* 검색 */
.search-input {
    margin-bottom: 20px;
    padding: 14px 18px;
}

/* 프로필 */
.profile-card {
    background: var(--surface-elevated);
    padding: 28px;
    border-radius: var(--radius);
    border: 1px solid var(--outline);
}

.profile-card h2 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.profile-card p {
    color: var(--on-surface-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

.profile-card .btn-secondary {
    margin-bottom: 10px;
}

.profile-card .btn-secondary:last-of-type {
    margin-bottom: 0;
}

/* 사이드바 오버레이 (모바일용, 데스크톱에서는 숨김) */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 299;
}

.sidebar-overlay.active {
    display: block;
}

/* 모바일 반응형 - 강제 적용 */
@media screen and (max-width: 768px) {
    /* 사이드바는 위에서 슬라이드 메뉴로 처리됨 */
    
    /* 사이드바 오버레이는 위에서 처리됨 */
    
    /* 헤더 모바일 - 위에서 이미 처리됨 */
    .main-title {
        font-size: 1.25rem !important;
    }
    
    .header-profile {
        gap: 8px !important;
    }
    
    .profile-name {
        display: none !important; /* 모바일에서는 이름 숨김 */
    }
    
    .header-profile .btn-outline,
    .header-profile .btn-icon {
        padding: 6px 10px !important;
        font-size: 12px !important;
    }
    
    /* 액션 바 모바일 */
    .action-bar {
        padding: 8px 12px !important;
        position: sticky;
        top: 56px !important;
    }
    
    .action-bar .btn-primary {
        width: 100% !important;
        padding: 12px !important;
    }
    
    /* 콘텐츠 모바일 - 위에서 이미 처리됨 */
    
    /* 하단 네비게이션 모바일 - 위에서 이미 처리됨 */
    .bottom-nav {
        padding: 8px 0 16px !important;
    }
    
    .nav-item {
        font-size: 11px !important;
        padding: 8px 4px !important;
    }
    
    /* 게시글 카드 모바일 */
    .post-card {
        padding: 12px;
    }
    
    .post-title {
        font-size: 1rem;
    }
    
    .post-meta {
        font-size: 12px;
        gap: 6px;
    }
    
    .post-image {
        width: 100px;
        height: 100px;
    }
    
    .post-image-detail {
        width: 100%;
        height: auto;
        max-height: 300px;
    }
    
    /* 모달 모바일 */
    .modal-content {
        max-width: 95vw;
        padding: 16px;
        max-height: 90vh;
    }
    
    .modal-header h2 {
        font-size: 1.125rem;
    }
    
    /* 프로필 카드 모바일 */
    .profile-card {
        padding: 20px;
    }
    
    /* 사이드바 내부 모바일 */
    .sidebar-header {
        padding: 12px;
    }
    
    .board-item {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* 작은 모바일 (480px 이하) */
@media (max-width: 480px) {
    .main-title {
        font-size: 1.125rem;
    }
    
    .content {
        padding: 8px;
    }
    
    .post-card {
        padding: 10px;
    }
    
    .modal-content {
        padding: 12px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* 이미지 뷰어 */
.image-viewer-content {
    max-width: 90vw;
    max-height: 90vh;
    padding: 0;
    background: rgba(0, 0, 0, 0.95);
}

.image-viewer-content .modal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    border-bottom: none;
    padding: 12px 20px;
}

.image-viewer-body {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 60px 20px 20px;
}

.image-viewer-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 32px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.image-viewer-nav-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.image-viewer-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

#image-viewer-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
}
