/* 마비노기 테마 CSS - 판타지 느낌의 디자인 */

/* 기본 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 에디터 디버그 버튼들 */
.editor-debug-buttons {
    margin-bottom: 10px;
    padding: 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.editor-debug-buttons .btn {
    font-size: 12px;
    padding: 4px 8px;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
}

/* 포스트 상세보기 스타일 */
.post-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.post-header {
    margin-bottom: 30px;
}

.back-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 20px;
    font-size: 14px;
    transition: background 0.3s;
}

.back-btn:hover {
    background: #5a6268;
}

.post-meta-top {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.post-title {
    font-size: 2.2em;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.2;
}

.post-info {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.post-info span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-featured-image {
    margin-bottom: 30px;
    text-align: center;
}

.post-featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.post-content {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 30px;
}

.post-content h1, .post-content h2, .post-content h3 {
    margin: 30px 0 15px 0;
    color: #2c3e50;
}

.post-content p {
    margin-bottom: 15px;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.post-content th, .post-content td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.post-content th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.post-content tr:hover {
    background: #f8f9fa;
}

.post-tags {
    margin-bottom: 30px;
    padding: 15px 0;
    border-top: 1px solid #eee;
}

.post-tags i {
    color: #666;
    margin-right: 10px;
}

.tag {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 8px;
}

.post-footer {
    border-top: 2px solid #eee;
    padding-top: 20px;
}

.post-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.category {
    background: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.featured {
    background: #ffc107;
    color: #212529;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* 이미지 업로드 관련 스타일 */
.upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.upload-area:hover, .upload-area.dragover {
    border-color: #007bff;
    background: #e3f2fd;
}

.upload-area.has-images {
    padding: 20px;
    background: #e8f5e8;
    border-color: #28a745;
}

.upload-area i {
    font-size: 48px;
    color: #6c757d;
    margin-bottom: 15px;
}

.upload-area p {
    margin: 10px 0;
    color: #6c757d;
}

.upload-info {
    font-size: 12px;
    color: #999;
}

/* 이미지 미리보기 */
.image-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.image-preview-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.image-preview-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.image-wrapper {
    position: relative;
}

.image-wrapper img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
}

.remove-image-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(220, 53, 69, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.remove-image-btn:hover {
    background: #dc3545;
    transform: scale(1.1);
}

.image-info {
    padding: 15px;
}

.image-caption {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 10px;
}

.image-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #666;
}

.image-name {
    flex: 1;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
}

.image-size {
    color: #999;
    margin-right: 10px;
}

.set-featured-btn {
    background: #e9ecef;
    color: #6c757d;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.set-featured-btn:hover {
    background: #ffc107;
    color: #212529;
}

.set-featured-btn.active {
    background: #ffc107;
    color: #212529;
}

.set-featured-btn i {
    font-size: 12px;
}

/* 본문 삽입 버튼 */
.insert-to-editor-btn {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 11px;
    margin-right: 5px;
    transition: all 0.2s ease;
}

.insert-to-editor-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.insert-to-editor-btn i {
    font-size: 10px;
    margin-right: 2px;
}

/* 에디터 삽입된 이미지 배지 */
.editor-inserted-badge {
    background: #17a2b8;
    color: white;
    padding: 3px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
    margin-right: 5px;
}

/* 이미지 메타 정보 레이아웃 개선 */
.image-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.image-name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-size {
    color: #666;
    font-size: 11px;
}

/* 포스트 상세보기 대표 이미지 */
.post-featured-image {
    margin: 2rem 0;
    text-align: center;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.post-featured-image img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.post-featured-image:hover img {
    transform: scale(1.02);
}

.post-featured-image::before {
    content: '📸 대표 이미지';
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    z-index: 1;
}
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

/* TinyMCE 에디터 스타일 개선 */
.tox-tinymce {
    border: 2px solid var(--border-color) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

.tox .tox-toolbar__primary {
    background: var(--card-background) !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 8px !important;
}

.tox .tox-edit-area__iframe {
    background: white !important;
}

/* TinyMCE 컨테이너 스타일 */
.tox-editor-container {
    border-radius: 8px !important;
}

/* TinyMCE 에디터 기본 스타일링 */
.tox .tox-editor-header {
    border-bottom: 1px solid var(--border-color) !important;
}

.tox .tox-statusbar {
    border-top: 1px solid var(--border-color) !important;
    background: var(--background-color) !important;
}

/* TinyMCE 버튼 사용자 정의 */
.tox .tox-tbtn {
    border-radius: 4px !important;
    margin: 2px !important;
}

.tox .tox-tbtn:hover {
    background: var(--secondary-color) !important;
    color: white !important;
}

.tox .tox-tbtn--enabled {
    background: var(--primary-color) !important;
    color: white !important;
}

/* TinyMCE 컨테이너 스타일 */
#post-content {
    min-height: 400px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 14px;
    line-height: 1.7;
    padding: 15px;
    background: white;
    color: var(--text-color);
}

#post-content:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 10px rgba(218, 165, 32, 0.3);
}

/* TinyMCE 에디터 내 표 스타일 */
.mce-content-body table {
    border-collapse: collapse !important;
    width: 100% !important;
    margin: 15px 0 !important;
    font-size: 14px !important;
    border: 1px solid var(--border-color) !important;
}

.mce-content-body table th,
.mce-content-body table td {
    border: 1px solid var(--border-color) !important;
    padding: 8px 12px !important;
    text-align: left !important;
    vertical-align: top !important;
}

.mce-content-body table th {
    background-color: var(--background-color) !important;
    font-weight: 600 !important;
    color: var(--primary-color) !important;
}

.mce-content-body table tr:nth-child(even) {
    background-color: rgba(218, 165, 32, 0.05) !important;
}

.mce-content-body table tr:hover {
    background-color: rgba(218, 165, 32, 0.1) !important;
}

/* TinyMCE 대화상자 스타일링 */
.tox .tox-dialog {
    border-radius: 10px !important;
}

.tox .tox-dialog__header {
    background: var(--gradient-brown) !important;
    color: white !important;
}

.tox .tox-dialog__footer {
    background: var(--background-color) !important;
    border-top: 1px solid var(--border-color) !important;
}

.tox .tox-button {
    border-radius: 6px !important;
}

.tox .tox-button--primary {
    background: var(--gradient-gold) !important;
    border-color: var(--secondary-color) !important;
}

.tox .tox-button--primary:hover {
    background: var(--gradient-brown) !important;
}

/* CKEditor 5 스타일링 */
.ck.ck-editor {
    border-radius: 8px !important;
    overflow: hidden !important;
}

.ck.ck-editor__main > .ck-editor__editable {
    min-height: 400px !important;
    border: 2px solid var(--border-color) !important;
    border-top: none !important;
}

.ck.ck-toolbar {
    background: var(--card-background) !important;
    border: 2px solid var(--border-color) !important;
    border-bottom: 1px solid var(--border-color) !important;
    border-radius: 8px 8px 0 0 !important;
    padding: 8px !important;
}

.ck.ck-button:hover {
    background: var(--secondary-color) !important;
    color: white !important;
}

.ck.ck-button.ck-on {
    background: var(--primary-color) !important;
    color: white !important;
}

/* CKEditor 내부 콘텐츠 스타일 */
.ck-content table {
    border-collapse: collapse !important;
    width: 100% !important;
    margin: 15px 0 !important;
    border: 1px solid var(--border-color) !important;
}

.ck-content table th,
.ck-content table td {
    border: 1px solid var(--border-color) !important;
    padding: 8px 12px !important;
    text-align: left !important;
}

.ck-content table th {
    background-color: var(--background-color) !important;
    font-weight: 600 !important;
    color: var(--primary-color) !important;
}

.ck-content table tr:nth-child(even) {
    background-color: rgba(218, 165, 32, 0.05) !important;
}

.ck-content table tr:hover {
    background-color: rgba(218, 165, 32, 0.1) !important;
}

/* 폴백 편집기 스타일 */
.editor-content.fallback {
    min-height: 300px;
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.7;
}

.editor-content.fallback:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

:root {
    /* 마비노기 색상 팔레트 */
    --primary-color: #8B4513;        /* 브라운 */
    --secondary-color: #DAA520;      /* 골드 */
    --accent-color: #CD853F;         /* 샌디 브라운 */
    --background-color: #FFF8DC;     /* 코른실크 - 양피지 느낌 */
    --card-background: #FFFAF0;      /* 플로랄 화이트 */
    --text-color: #2F1B14;           /* 다크 브라운 */
    --text-light: #5D4037;           /* 미디엄 브라운 */
    --border-color: #D2B48C;         /* 탄 */
    --shadow-color: rgba(139, 69, 19, 0.2);
    --gradient-gold: linear-gradient(135deg, #DAA520, #B8860B);
    --gradient-brown: linear-gradient(135deg, #8B4513, #654321);
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: var(--background-color);
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(218, 165, 32, 0.1) 0%, transparent 50%),
        linear-gradient(45deg, rgba(139, 69, 19, 0.05) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(139, 69, 19, 0.05) 25%, transparent 25%);
    background-size: 200px 200px, 60px 60px, 60px 60px;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

/* 컨테이너 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 헤더 스타일 */
.header {
    background: var(--gradient-brown);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 15px var(--shadow-color);
    border-bottom: 3px solid var(--secondary-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.logo h1 {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin: 0;
}

.logo .subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    font-style: italic;
}

/* 네비게이션 */
.nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.7rem 1.2rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background: var(--gradient-gold);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* 메인 컨텐츠 */
.main {
    flex: 1;
    padding: 2rem 0;
}

/* 섹션 관리 */
.section {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 히어로 섹션 */
.hero {
    background: var(--gradient-gold);
    color: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    margin-bottom: 3rem;
    text-align: center;
    box-shadow: 0 8px 25px var(--shadow-color);
    border: 3px solid var(--primary-color);
}

.hero-content h2 {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.8;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    font-family: 'Cinzel', serif;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 카드 스타일 */
.card {
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-gold);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-color);
    border-color: var(--secondary-color);
}

/* 포스트 그리드 */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* 포스트 카드 */
.post-card {
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}

.post-card.has-thumbnail {
    flex-direction: row;
    align-items: center;
}

/* 포스트 카드 썸네일 */
.post-card-thumbnail {
    width: 200px;
    height: 150px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.post-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card-thumbnail img {
    transform: scale(1.05);
}

/* 홈페이지 최근 포스트 썸네일 */
.recent-post-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-background);
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 15px;
}

.recent-post-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow-color);
}

.post-thumbnail {
    width: 120px;
    height: 80px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content-area {
    flex: 1;
    min-width: 0;
}

.post-content-area h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 600;
}

.post-excerpt {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.has-image {
    background: var(--secondary-color);
    color: white;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-gold);
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px var(--shadow-color);
    border-color: var(--secondary-color);
}

.post-card-content {
    padding: 1.5rem;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.post-category {
    background: var(--gradient-gold);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-weight: 500;
    font-size: 0.8rem;
}

.post-date {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.post-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--primary-color);
    line-height: 1.4;
}

.post-excerpt {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: rgba(218, 165, 32, 0.1);
    color: var(--primary-color);
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.post-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.post-buttons {
    display: flex;
    gap: 0.5rem;
}

/* 섹션 헤더 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 필터 */
.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-select,
.search-input {
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--card-background);
    color: var(--text-color);
    font-family: inherit;
    transition: all 0.3s ease;
}

.filter-select:focus,
.search-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 10px rgba(218, 165, 32, 0.3);
}

.search-input {
    min-width: 250px;
}

/* 폼 스타일 */
.write-container,
.about-container {
    max-width: 800px;
    margin: 0 auto;
}

.write-container h2,
.about-container h2 {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.post-form {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 20px;
    border: 2px solid var(--border-color);
    box-shadow: 0 8px 25px var(--shadow-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: white;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 10px rgba(218, 165, 32, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group small {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 0.3rem;
    display: block;
}

/* 버튼 스타일 */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient-gold);
    color: white;
    border: 2px solid var(--secondary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(218, 165, 32, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--background-color);
    border-color: var(--primary-color);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.pagination button {
    padding: 0.6rem 1rem;
    border: 2px solid var(--border-color);
    background: var(--card-background);
    color: var(--text-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination button:hover,
.pagination button.active {
    background: var(--gradient-gold);
    color: white;
    border-color: var(--secondary-color);
}

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

/* 포스트 상세보기 */
.post-detail-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-background);
    padding: 2.5rem;
    border-radius: 20px;
    border: 2px solid var(--border-color);
    box-shadow: 0 8px 25px var(--shadow-color);
}

.post-detail-header {
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.post-detail-title {
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.post-detail-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.post-detail-content {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.post-detail-content h1,
.post-detail-content h2,
.post-detail-content h3,
.post-detail-content h4,
.post-detail-content h5,
.post-detail-content h6 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-detail-content p {
    margin-bottom: 1rem;
}

.post-detail-content ul,
.post-detail-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

/* 포스트 내용 이미지 반응형 스타일 */
.post-detail-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 1.5rem auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-detail-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* CKEditor에서 삽입된 이미지 스타일 */
.post-content img,
.post-detail .post-content img,
.ck-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 1.5rem auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-content img:hover,
.post-detail .post-content img:hover,
.ck-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

/* 이미지 정렬 스타일 (CKEditor 이미지 스타일) */
.post-content .image-style-side,
.post-detail-content .image-style-side {
    max-width: 50% !important;
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.post-content .image-style-side.image-style-align-left,
.post-detail-content .image-style-side.image-style-align-left {
    float: left;
    margin-right: 1.5rem;
    margin-left: 0;
}

.post-content .image-style-block-align-center,
.post-detail-content .image-style-block-align-center {
    display: block;
    margin: 1.5rem auto;
}

/* 전역 이미지 반응형 스타일 (모든 컨테이너에서 적용) - 강화된 버전 */
article img,
.post-detail img,
.post-content img,
.post-detail-content img,
.ck-content img,
main img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    border-radius: 8px;
    box-sizing: border-box;
    /* 컨테이너 오버플로우 방지 강화 */
    overflow: hidden;
    display: block;
}

/* 본문 이미지 강화 스타일 */
article img:not(.post-thumbnail):not(.post-card-thumbnail):not(.image-preview-item img),
.post-detail img:not(.post-thumbnail),
.post-content img:not(.post-thumbnail) {
    display: block;
    margin: 1.5rem auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

/* 큰 이미지 호버 효과 */
article img:not(.post-thumbnail):hover,
.post-detail img:not(.post-thumbnail):hover,
.post-content img:not(.post-thumbnail):hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* 매우 큰 이미지 처리 - 강화된 버전 */
img[src*="data:image"] {
    max-width: 100% !important;
    max-height: 80vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* 컨테이너 오버플로우 방지 - 추가 보안 */
.post-detail,
.post-content,
.post-detail-content,
.ck-content,
article {
    overflow-x: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 이미지가 포함된 모든 컨테이너에 대한 강제 스타일 */
div:has(img),
p:has(img),
article:has(img) {
    overflow-x: auto;
}

/* 더 강력한 이미지 오버플로우 방지 */
.post-detail,
.post-content,
.post-detail-content,
.ck-content,
article,
.post-card {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
}

/* 모든 이미지에 대한 절대적 크기 제한 */
* img {
    max-width: 100% !important;
    max-height: 90vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

/* 특별히 Base64 이미지에 대한 더 강한 제약 */
img[src^="data:"] {
    max-width: 100% !important;
    max-height: 80vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 1rem auto !important;
}

/* 모바일에서 이미지 최적화 */
@media (max-width: 768px) {
    .post-detail-content img,
    .post-content img,
    .ck-content img,
    article img {
        max-width: 100% !important;
        max-height: 60vh !important;
        margin: 1rem auto;
        border-radius: 8px;
        object-fit: contain;
    }
    
    .post-content .image-style-side,
    .post-detail-content .image-style-side {
        max-width: 100% !important;
        float: none !important;
        margin: 1rem auto !important;
        display: block;
    }
}

/* 태블릿에서 이미지 최적화 */
@media (max-width: 1024px) and (min-width: 769px) {
    .post-detail-content img,
    .post-content img,
    article img {
        max-width: 100% !important;
        max-height: 70vh !important;
    }
}

.post-detail-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
    flex-wrap: wrap;
}

/* 소개 페이지 */
.about-content {
    background: var(--card-background);
    padding: 2.5rem;
    border-radius: 20px;
    border: 2px solid var(--border-color);
    box-shadow: 0 8px 25px var(--shadow-color);
}

.about-text h3,
.about-text h4 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.about-text h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
}

.about-text h4 {
    font-size: 1.2rem;
    font-weight: 600;
}

.about-text ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.about-text li {
    margin-bottom: 0.5rem;
}

.about-text strong {
    color: var(--primary-color);
}

/* 로딩 오버레이 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.loading-spinner i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    display: block;
}

.loading-spinner p {
    font-size: 1.1rem;
}

/* 푸터 */
.footer {
    background: var(--primary-color);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
}

.footer-content p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

/* 빈 상태 메시지 */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-light);
}

.empty-state i {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 1rem;
    display: block;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.empty-state p {
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* 이미지 업로드 스타일 */
.image-upload-section {
    border: 2px dashed var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    background: rgba(218, 165, 32, 0.05);
}

.image-upload-area {
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    background: rgba(139, 69, 19, 0.02);
    transition: all 0.3s ease;
    cursor: pointer;
}

.image-upload-area.dragover {
    background: rgba(218, 165, 32, 0.1);
    border-color: var(--secondary-color);
}

.upload-placeholder {
    text-align: center;
    color: var(--text-light);
}

.upload-placeholder i {
    font-size: 3rem;
    color: var(--border-color);
    margin-bottom: 1rem;
    display: block;
}

.upload-placeholder p {
    margin-bottom: 0.5rem;
}

.upload-info {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 1rem !important;
}

.image-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.image-preview-item {
    position: relative;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.image-preview-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.image-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-preview-item:hover .image-preview-overlay {
    opacity: 1;
}

.image-preview-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.image-preview-actions button {
    padding: 0.5rem;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-delete-image {
    background: #dc3545;
}

.btn-delete-image:hover {
    background: #c82333;
}

.btn-set-featured {
    background: var(--secondary-color);
}

.btn-set-featured:hover {
    background: var(--accent-color);
}

.image-info {
    padding: 0.8rem;
}

.image-filename {
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.image-caption-input {
    width: 100%;
    padding: 0.4rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 0.8rem;
    background: white;
}

.featured-image-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.featured-image-select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: white;
    color: var(--text-color);
    font-family: inherit;
    margin-top: 0.5rem;
}

.featured-image-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--gradient-gold);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* 포스트 카드의 이미지 썸네일 */
.post-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 2px solid var(--border-color);
}

.post-card.has-image .post-card-content {
    padding: 1rem 1.5rem 1.5rem;
}

/* 포스트 상세보기의 이미지 갤러리 */
.post-images-gallery {
    margin: 2rem 0;
}

.post-images-gallery h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.post-image-item {
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    background: white;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.post-image-item:hover {
    transform: translateY(-5px);
}

.post-image-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.post-image-caption {
    padding: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
    font-style: italic;
}

/* 이미지 모달 */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 2rem;
}

.image-modal.active {
    display: flex;
}

.image-modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    overflow: hidden;
}

.image-modal img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.image-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 관리자 패널 스타일 */
.admin-panel {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#login-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-greeting {
    color: var(--secondary-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-greeting i {
    color: #ffd700;
}

/* 로그인 모달 스타일 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10001;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-background);
    border-radius: 20px;
    border: 2px solid var(--border-color);
    box-shadow: 0 8px 25px var(--shadow-color);
    width: 90%;
    max-width: 400px;
    overflow: hidden;
}

.modal-header {
    background: var(--gradient-brown);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Cinzel', serif;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.login-form {
    padding: 2rem;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-form input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: white;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 10px rgba(218, 165, 32, 0.3);
}

.login-form .form-actions,
.signup-form .form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.form-footer p {
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.btn-link {
    background: none;
    border: none;
    color: var(--secondary-color);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.btn-link:hover {
    color: var(--primary-color);
}

.signup-form {
    padding: 2rem;
}

.special-code-notice {
    background: rgba(218, 165, 32, 0.1);
    border: 1px solid var(--secondary-color);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.special-code-notice i {
    color: var(--secondary-color);
    margin-top: 0.2rem;
}

.special-code-notice p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-color);
}

.signup-form .form-group {
    margin-bottom: 1.5rem;
}

.signup-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.signup-form input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: white;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.signup-form input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 10px rgba(218, 165, 32, 0.3);
}

.signup-form small {
    display: block;
    margin-top: 0.3rem;
    color: var(--text-light);
    font-size: 0.8rem;
}

/* 권한 제어 */
.admin-only {
    display: none !important;
}

.admin-only.show {
    display: flex !important;
}

/* 접근 제한 메시지 */
.access-denied {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--card-background);
    border-radius: 20px;
    border: 2px solid var(--border-color);
    margin: 2rem auto;
    max-width: 500px;
}

.access-denied i {
    font-size: 4rem;
    color: #dc3545;
    margin-bottom: 1rem;
    display: block;
}

.access-denied h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-family: 'Cinzel', serif;
}

.access-denied p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* 리치 텍스트 에디터 스타일 */
.rich-editor {
    border: 2px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    background: white;
    transition: all 0.3s ease;
}

.rich-editor:focus-within {
    border-color: var(--secondary-color);
    box-shadow: 0 0 10px rgba(218, 165, 32, 0.3);
}

.editor-toolbar {
    background: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
}

.toolbar-group {
    display: flex;
    gap: 0.3rem;
    align-items: center;
    padding: 0.2rem;
    border-radius: 8px;
    background: white;
    border: 1px solid var(--border-color);
}

.toolbar-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
}

.toolbar-btn:hover {
    background: var(--secondary-color);
    color: white;
}

.toolbar-btn.active {
    background: var(--primary-color);
    color: white;
}

.toolbar-select {
    border: none;
    background: none;
    padding: 0.4rem 0.6rem;
    color: var(--text-color);
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 4px;
    min-width: 80px;
}

.toolbar-select:focus {
    outline: none;
    background: rgba(218, 165, 32, 0.1);
}

.color-picker {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
    background: none;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.editor-content {
    min-height: 400px;
    max-height: 600px;
    overflow-y: auto;
    padding: 1.5rem;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    background: white;
}

.editor-content:focus {
    outline: none;
}

.editor-content[data-placeholder]:empty::before {
    content: attr(data-placeholder);
    color: #999;
    font-style: italic;
}

/* 에디터 내부 콘텐츠 스타일 */
.editor-content h1, .editor-content h2, .editor-content h3,
.editor-content h4, .editor-content h5, .editor-content h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin: 1.5rem 0 1rem 0;
    line-height: 1.3;
}

.editor-content h1 { font-size: 2rem; }
.editor-content h2 { font-size: 1.7rem; }
.editor-content h3 { font-size: 1.4rem; }
.editor-content h4 { font-size: 1.2rem; }
.editor-content h5 { font-size: 1.1rem; }
.editor-content h6 { font-size: 1rem; }

.editor-content p {
    margin: 1rem 0;
}

.editor-content ul, .editor-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.editor-content li {
    margin: 0.3rem 0;
}

.editor-content blockquote {
    border-left: 4px solid var(--secondary-color);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--text-light);
    font-style: italic;
}

.editor-content a {
    color: var(--secondary-color);
    text-decoration: underline;
}

.editor-content a:hover {
    color: var(--primary-color);
}

.editor-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    border: 1px solid var(--border-color);
}

.editor-content th,
.editor-content td {
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    text-align: left;
}

.editor-content th {
    background: var(--background-color);
    font-weight: 600;
}

.editor-content code {
    background: rgba(218, 165, 32, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.editor-content pre {
    background: var(--background-color);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

.editor-content hr {
    border: none;
    height: 2px;
    background: var(--border-color);
    margin: 2rem 0;
}

/* 포스트 상세보기에서의 콘텐츠 스타일 */
.post-detail-content {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.post-detail-content h1,
.post-detail-content h2,
.post-detail-content h3,
.post-detail-content h4,
.post-detail-content h5,
.post-detail-content h6 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.post-detail-content p {
    margin-bottom: 1rem;
}

.post-detail-content ul,
.post-detail-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.post-detail-content li {
    margin-bottom: 0.3rem;
}

.post-detail-content blockquote {
    border-left: 4px solid var(--secondary-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: var(--text-light);
    font-style: italic;
    background: rgba(218, 165, 32, 0.05);
    padding: 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
}

.post-detail-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.post-detail-content th,
.post-detail-content td {
    border: 1px solid var(--border-color);
    padding: 0.8rem;
    text-align: left;
}

.post-detail-content th {
    background: var(--gradient-gold);
    color: white;
    font-weight: 600;
}

.post-detail-content a {
    color: var(--secondary-color);
    text-decoration: underline;
    font-weight: 500;
}

.post-detail-content a:hover {
    color: var(--primary-color);
}

.post-detail-content code {
    background: rgba(218, 165, 32, 0.15);
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
}

.post-detail-content pre {
    background: var(--background-color);
    padding: 1.5rem;
    border-radius: 10px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .logo {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .nav {
        justify-content: center;
    }
    
    .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .admin-panel {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .admin-info {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        padding: 1rem;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .login-form,
    .signup-form {
        padding: 1.5rem;
    }
    
    #login-buttons {
        justify-content: center;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .section-header h2 {
        text-align: center;
        font-size: 1.5rem;
    }
    
    .filters {
        justify-content: center;
    }
    
    .search-input {
        min-width: auto;
        width: 100%;
    }
    
    .post-form {
        padding: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .post-detail-container,
    .about-content {
        padding: 1.5rem;
    }
    
    .post-detail-title {
        font-size: 1.8rem;
    }
    
    .post-detail-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .post-detail-actions {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .image-preview-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .post-images-grid {
        grid-template-columns: 1fr;
    }
    
    .image-modal {
        padding: 1rem;
    }
    
    .editor-toolbar {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .toolbar-group {
        gap: 0.2rem;
    }
    
    .toolbar-btn {
        padding: 0.4rem;
        min-width: 28px;
        height: 28px;
    }
    
    .toolbar-select {
        min-width: 60px;
        font-size: 0.8rem;
    }
    
    .color-picker {
        width: 28px;
        height: 28px;
    }
    
    .editor-content {
        min-height: 300px;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero-content h2 {
        font-size: 1.7rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .post-card-content {
        padding: 1rem;
    }
    
    .post-form {
        padding: 1rem;
    }
    
    .post-detail-container,
    .about-content {
        padding: 1rem;
    }
    
    .image-preview-container {
        grid-template-columns: 1fr;
    }
    
    .image-upload-area {
        min-height: 150px;
    }
    
    .upload-placeholder i {
        font-size: 2rem;
    }
}