/* 기본 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Apple SD Gothic Neo', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 헤더 */
.header {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: calc(20px + 200px + 30px);
    padding-right: calc(20px + 200px + 30px);
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c5530;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.admin-logo {
    height: 30px;
    width: auto;
    margin-right: 10px;
    vertical-align: middle;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* 검색창 */
.search-form {
    display: flex;
    align-items: center;
    border: 1px solid #e5e5e5;
    border-radius: 25px;
    overflow: hidden;
    background: #f8f9fa;
}

.search-form input {
    border: none;
    padding: 8px 15px;
    font-size: 0.9rem;
    background: transparent;
    outline: none;
    width: 200px;
}

.search-form button {
    border: none;
    background: #2c5530;
    color: white;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9rem;
}

.search-form button:hover {
    background: #1e3d21;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* 메인 네비게이션 */
.main-nav {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    z-index: 999;
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
    gap: 5px;
}

.nav-menu li {
    position: relative;
}

.nav-link {
    display: block;
    padding: 15px 16px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
    font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.active {
    color: #2c5530;
    background: #f8f9fa;
}



/* 모바일 메뉴 */
.mobile-menu {
    position: fixed;
    top: 120px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 120px);
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    z-index: 999;
    transition: left 0.3s;
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu ul {
    list-style: none;
    padding: 20px 0;
}

.mobile-menu li {
    border-bottom: 1px solid #eee;
}

.mobile-category-header {
    background: #f8f9fa;
    color: #2c5530;
    font-weight: bold;
    padding: 12px 20px !important;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-menu a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.mobile-menu a:hover {
    background: #f8f9fa;
    color: #2c5530;
}



/* 헤더 아래 광고 배너 */
.header-banner-ad {
    background: #f8f9fa;
    border-bottom: 1px solid #e5e5e5;
    padding: 15px 0;
    margin-top: 120px;
    text-align: center;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-banner-ad .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-banner-ad img {
    max-width: 100%;
    height: auto;
    max-height: 250px;
    border-radius: 4px;
}

.header-banner-placeholder {
    color: #999;
    font-size: 0.9rem;
    font-style: italic;
}

/* 슬라이더 관리 스타일 */
.slider-management {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 20px;
}

.slider-info {
    background: #e8f4fd;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.slider-info h3 {
    color: #0066cc;
    margin-bottom: 10px;
}

.slider-info ul {
    margin: 0;
    padding-left: 20px;
}

.slider-types {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.slider-type-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.slider-type-section h3 {
    color: #333;
    margin-bottom: 10px;
}

.slider-form .form-group {
    margin-bottom: 15px;
}

.featured-list {
    background: #f0f8ff;
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
}

.featured-list li {
    padding: 5px 0;
    border-bottom: 1px solid #e0e0e0;
}

.featured-list li:last-child {
    border-bottom: none;
}

.slides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.slide-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.slide-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.slide-info {
    padding: 15px;
}

.slide-info h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.slide-info p {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .slider-types {
        grid-template-columns: 1fr;
    }
    
    .slides-grid {
        grid-template-columns: 1fr;
    }
}

/* 배너 관리 스타일 */
.banner-management {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.banner-info {
    background: #e8f4fd;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.banner-info h3 {
    margin-top: 0;
    color: #0066cc;
}

.banner-info ul {
    margin: 10px 0;
    padding-left: 20px;
}

.banner-info li {
    margin-bottom: 5px;
}

.current-banner {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
}

.banner-preview {
    max-width: 100%;
    height: auto;
    max-height: 250px;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: block;
    margin: 10px 0;
}

.banner-upload {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.btn-delete {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-delete:hover {
    background: #c82333;
}

/* 메인 레이아웃 */
.main-layout {
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    gap: 30px;
    margin-top: 20px;
    padding: 30px 0;
}

.main-content {
    min-height: 500px;
}

/* 사이드바 광고 */
.sidebar-left,
.sidebar-right {
    position: sticky;
    top: 170px;
    height: fit-content;
}

.ad-banner {
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.ad-banner img {
    max-width: 100%;
    height: auto;
}

/* 카테고리 필터 */
.category-filter {
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
}

.category-filter h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 8px;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 5px;
}

.category-list a {
    display: block;
    padding: 8px 12px;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 14px;
}

.category-list a:hover {
    background: #f5f5f5;
    color: #333;
}

.category-list a.active {
    background: #2c5530;
    color: white;
}

.category-group {
    font-weight: bold;
    color: #333;
    margin-top: 15px;
    margin-bottom: 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-left: 8px;
}

.category-group:first-child {
    margin-top: 0;
}

/* 광고 배너 (콘텐츠 사이) */
.ad-banner-between {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.ad-banner-inline {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
    text-align: center;
}

/* 글 목록 */
.posts-grid {
    display: grid;
    gap: 30px;
}

.post-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    overflow: hidden;
    transition: border-color 0.3s;
    cursor: pointer;
    margin-bottom: 1px;
}

.post-card:hover {
    border-color: #2c5530;
}

.post-image {
    height: 200px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #f8f9fa;
    transition: opacity 0.3s;
}

.post-image img[src*="placeholder"] {
    object-fit: contain;
    padding: 20px;
}

.post-content {
    padding: 20px;
}

.post-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c5530;
    line-height: 1.4;
}

.post-content p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.post-date {
    color: #999;
    font-size: 0.9rem;
}

/* 글 상세 */
.post-detail {
    background: #fff;
    border: 1px solid #e5e5e5;
    padding: 40px;
    margin-bottom: 30px;
}

.post-detail h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #2c5530;
    margin-bottom: 20px;
    line-height: 1.3;
}

.post-meta {
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

.post-category {
    background: #2c5530;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.tag {
    background: #f8f9fa;
    color: #666;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    border: 1px solid #e9ecef;
}

.post-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

.post-body p {
    margin-bottom: 25px;
}

/* 어필리에이트 섹션 */
.affiliate-section {
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    margin-top: 30px;
}

.affiliate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
}

.affiliate-header h3 {
    color: #2c5530;
    font-size: 1.1rem;
    margin: 0;
}

.affiliate-toggle {
    background: none;
    border: 1px solid #e5e5e5;
    padding: 8px 15px;
    cursor: pointer;
    color: #666;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.affiliate-toggle:hover {
    background: #f8f9fa;
    border-color: #2c5530;
    color: #2c5530;
}

.affiliate-content {
    padding: 20px 30px;
    transition: all 0.3s;
    overflow: hidden;
}

.affiliate-content.collapsed {
    max-height: 0;
    padding: 0 30px;
}

.affiliate-links {
    display: grid;
    gap: 12px;
}

.affiliate-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e5e5e5;
    color: #2c5530;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.affiliate-link:hover {
    background: #2c5530;
    color: #fff;
    border-color: #2c5530;
}

.link-icon {
    font-size: 1.2rem;
}

/* 관리자 페이지 */
.admin-body {
    background: #f1f3f4;
}

.admin-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-form {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c5530;
}

.login-form input {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 1rem;
}

.login-form button {
    width: 100%;
    padding: 15px;
    background: #2c5530;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    background: #fff;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    color: #2c5530;
}

.admin-nav a,
.admin-nav button {
    margin-left: 15px;
    padding: 10px 20px;
    background: #2c5530;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.admin-tabs {
    background: #fff;
    padding: 0 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    display: flex;
    gap: 30px;
}

.admin-tabs a {
    padding: 20px 0;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.admin-tabs a.active,
.admin-tabs a:hover {
    color: #2c5530;
    border-bottom-color: #2c5530;
}

.admin-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2c5530;
}

.file-input {
    border: 2px dashed #e5e5e5 !important;
    padding: 20px !important;
    text-align: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s;
}

.file-input:hover {
    border-color: #2c5530 !important;
    background: #f0f8f0;
}

.help-text {
    color: #666;
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
    font-style: italic;
}

.affiliate-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.affiliate-row button {
    padding: 12px 15px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.form-actions {
    text-align: center;
    margin-top: 30px;
}

.form-actions button {
    padding: 15px 30px;
    background: #2c5530;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c5530;
}

.admin-table a {
    color: #2c5530;
    text-decoration: none;
    margin-right: 10px;
}

.admin-table button {
    padding: 5px 10px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* 검색 결과 */
.search-results-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e5e5;
}

.search-results-header h2 {
    color: #2c5530;
    font-size: 1.5rem;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

/* 카테고리 관리 */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.category-main-item {
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
}

.category-main-item h3 {
    margin: 0 0 5px 0;
    color: #2c5530;
    font-size: 1.2rem;
}

.category-main-item h4 {
    margin: 15px 0 10px 0;
    color: #333;
    font-size: 1rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.subcategories-list {
    margin-top: 15px;
}

.subcategory-item {
    margin-bottom: 8px;
    padding-left: 20px;
}

.category-item {
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500 !important;
}

.checkbox-label input[type="checkbox"] {
    width: auto !important;
    margin: 0;
}

.category-info {
    background: #e7f3e7;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}

.category-info h3 {
    color: #2c5530;
    margin-bottom: 15px;
}

.category-info ul {
    list-style-position: inside;
    color: #155724;
    line-height: 1.6;
}

.category-info li {
    margin-bottom: 8px;
}

/* 광고 설정 스타일 */
.ad-section {
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.ad-section h3 {
    color: #2c5530;
    margin-bottom: 15px;
    font-size: 1.1rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

.ads-info {
    background: #e7f3e7;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}

.ads-info h3 {
    color: #2c5530;
    margin-bottom: 15px;
    font-size: 1rem;
}

.ads-info ul {
    list-style-position: inside;
    color: #155724;
    line-height: 1.6;
    margin-bottom: 20px;
}

.ads-info li {
    margin-bottom: 8px;
}

/* 통계 대시보드 */
.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.stats-header h2 {
    margin: 0;
    color: #2c5530;
}

.btn-reset {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-reset:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
}

.stat-card h3 {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-weight: 500;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2c5530;
    margin-bottom: 8px;
}

.stat-change {
    font-size: 0.85rem;
    font-weight: 500;
}

.stat-change.positive {
    color: #28a745;
}

.stat-change.negative {
    color: #dc3545;
}

/* 차트 영역 */
.stats-chart {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.stats-chart h3 {
    margin-bottom: 20px;
    color: #2c5530;
}

/* 통계 테이블 */
.stats-table {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.stats-table .rank {
    font-weight: bold;
    color: #2c5530;
    text-align: center;
}

.stats-table .today-views {
    font-weight: bold;
    color: #007bff;
}

.stats-table .affiliate-clicks {
    color: #28a745;
    font-weight: 500;
}

.post-title-link {
    color: #2c5530 !important;
    text-decoration: none !important;
    font-weight: 500;
}

.post-title-link:hover {
    text-decoration: underline !important;
}

/* 정렬 가능한 테이블 헤더 */
.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: all 0.2s;
}

.sortable:hover {
    background: #f8f9fa;
    color: #2c5530;
}

.sortable.active {
    background: #e7f3e7;
    color: #2c5530;
    font-weight: 600;
}

.sort-icon {
    font-size: 0.8rem;
    margin-left: 5px;
    opacity: 0.7;
}

.sortable:hover .sort-icon {
    opacity: 1;
}

.sortable.active .sort-icon {
    opacity: 1;
    color: #2c5530;
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: none;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    background: #2c5530;
    color: white;
    padding: 20px 25px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 25px;
}

/* 상세 통계 스타일 */
.detail-stats {
    max-width: 100%;
}

.post-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.post-info h4 {
    color: #2c5530;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.post-date {
    color: #666;
    margin-bottom: 15px;
}

.edit-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none !important;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    color: white !important;
}

.btn-primary {
    background: #2c5530;
    color: white !important;
}

.btn-secondary {
    background: #6c757d;
    color: white !important;
}

.btn:hover {
    opacity: 0.9;
    color: white !important;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.stat-section {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
}

.stat-section h5 {
    color: #2c5530;
    margin-bottom: 15px;
    font-size: 1.1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.view-stats {
    margin-bottom: 20px;
}

.view-stats > div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.view-stats .label {
    color: #666;
}

.view-stats .value {
    font-weight: bold;
    color: #2c5530;
}

.mini-chart {
    margin-top: 15px;
}

.mini-chart h6 {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.location-stats .location-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 0;
}

.location-item .location {
    flex: 0 0 100px;
    color: #333;
}

.location-item .count {
    flex: 0 0 60px;
    font-weight: 500;
    color: #2c5530;
    text-align: right;
    margin-right: 10px;
}

.location-item .bar {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.location-item .fill {
    height: 100%;
    background: #2c5530;
    transition: width 0.3s;
}

.device-stats .device-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.device-icon {
    font-size: 1.5rem;
    margin-right: 10px;
}

.device-label {
    flex: 1;
    color: #333;
}

.device-count {
    font-weight: bold;
    color: #2c5530;
}

.device-chart {
    display: flex;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 15px;
}

.mobile-bar {
    background: #007bff;
    transition: width 0.3s;
}

.desktop-bar {
    background: #28a745;
    transition: width 0.3s;
}

.affiliate-stats .affiliate-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.affiliate-item:last-child {
    border-bottom: none;
}

.product-name {
    color: #333;
    flex: 1;
}

.click-count {
    font-weight: bold;
    color: #28a745;
}

.total-clicks {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #e5e5e5;
    text-align: center;
    color: #2c5530;
}

/* About 페이지 */
.about-page {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}

.about-hero {
    text-align: center;
    padding: 40px 0;
    background: linear-gradient(135deg, #e7f3e7 0%, #f8f9fa 100%);
    border-radius: 12px;
    margin-bottom: 40px;
}

.about-hero h1 {
    font-size: 3rem;
    color: #2c5530;
    margin-bottom: 15px;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #666;
    font-style: italic;
    margin: 0;
}

.about-content {
    padding: 0 20px;
}

.about-content section {
    margin-bottom: 50px;
}

.about-content h2 {
    color: #2c5530;
    font-size: 2rem;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid #e7f3e7;
    font-weight: 600;
}

.about-content p {
    margin-bottom: 20px;
    color: #444;
    font-size: 1.1rem;
}

/* 미션 카드 */
.mission-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.mission-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 30px 25px;
    text-align: center;
    transition: all 0.3s;
}

.mission-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(44, 85, 48, 0.1);
    border-color: #2c5530;
}

.mission-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.mission-card h3 {
    color: #2c5530;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.mission-card p {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

/* 접근법 그리드 */
.approach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.approach-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    border-left: 4px solid #2c5530;
}

.approach-item h3 {
    color: #2c5530;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.approach-item p {
    color: #555;
    margin: 0;
    font-size: 1rem;
}

/* 가치 목록 */
.values-list {
    display: grid;
    gap: 20px;
    margin: 30px 0;
}

.value-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    color: #444;
    font-size: 1.1rem;
}

.value-item strong {
    color: #2c5530;
    font-size: 1.2rem;
}

/* CTA 섹션 */
.join-journey {
    background: linear-gradient(135deg, #2c5530 0%, #1e3d21 100%);
    color: white;
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
}

.join-journey h2 {
    color: white;
    border-bottom: 3px solid rgba(255, 255, 255, 0.3);
}

.join-journey p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

.join-journey em {
    color: #a8d5aa;
    font-style: italic;
}

.cta-section {
    margin-top: 30px;
}

.cta-button {
    display: inline-block;
    background: white;
    color: #2c5530;
    padding: 15px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
    margin-top: 15px;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 반응형 */
@media (max-width: 768px) {
    .about-hero h1 {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .mission-cards {
        grid-template-columns: 1fr;
    }
    
    .approach-grid {
        grid-template-columns: 1fr;
    }
    
    .approach-item {
        padding: 20px;
    }
    
    .about-content {
        padding: 0 15px;
    }
}

/* 반응형 디자인 */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 150px 1fr 150px;
        gap: 20px;
    }
    
    .sidebar-left,
    .sidebar-right {
        font-size: 0.9rem;
    }
    
    .header-content {
        padding-left: calc(20px + 150px + 20px);
        padding-right: calc(20px + 150px + 20px);
    }
}

@media (max-width: 768px) {
    .header-content {
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
    }
    
    .logo {
        flex-shrink: 0;
        margin-right: 10px;
    }
    
    .logo-img {
        height: 35px;
        max-width: 120px;
    }
    
    .admin-logo {
        height: 25px;
    }
    
    .header-right {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-shrink: 0;
    }
    
    .search-form {
        flex-shrink: 1;
        min-width: 0;
        margin-right: 5px;
    }
    
    .search-form input {
        width: 120px;
        font-size: 0.85rem;
        padding: 6px 12px;
    }
    
    .search-form button {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    
    .hamburger {
        display: flex;
        flex-shrink: 0;
        margin-left: 5px;
    }
    
    .main-nav {
        display: none;
    }
}

/* 더 작은 모바일 화면용 (375px 이하) */
@media (max-width: 375px) {
    .header-content {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .logo-img {
        height: 30px;
        max-width: 100px;
    }
    
    .search-form input {
        width: 100px;
        font-size: 0.8rem;
        padding: 5px 10px;
    }
    
    .search-form button {
        padding: 5px 8px;
        font-size: 0.8rem;
    }
    
    .header-right {
        gap: 8px;
    }
}

/* 큰 태블릿용 (1024px 이하) */
@media (max-width: 1024px) {
    .header-content {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* 기존 모바일 스타일 정리 */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .main-nav {
        display: none;
    }
    
    .header-banner-ad {
        margin-top: 70px;
        padding: 8px 0;
    }
    
    .main-layout {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 15px;
    }
    
    .sidebar-left,
    .sidebar-right {
        position: static;
        order: 2;
    }
    
    .main-content {
        order: 1;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .post-detail {
        padding: 25px 20px;
    }
    
    .post-detail h1 {
        font-size: 1.5rem;
    }
    
    .affiliate-header,
    .affiliate-content {
        padding: 15px 20px;
    }
    
    .affiliate-links {
        gap: 10px;
    }
    
    .admin-container {
        padding: 15px;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .admin-tabs {
        flex-wrap: wrap;
        gap: 15px;
        padding: 15px 20px;
    }
    
    .admin-content {
        padding: 20px 15px;
    }
    
    .affiliate-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .admin-table {
        font-size: 0.9rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    .post-card {
        margin: 0 -5px;
    }
    
    .post-content {
        padding: 15px;
    }
    
    .post-detail {
        margin: 0 -5px;
        border-radius: 8px;
    }
    
    .logo-img {
        height: 28px;
        max-width: 90px;
    }
    
    .search-form input {
        width: 90px;
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    .search-form button {
        padding: 4px 6px;
        font-size: 0.75rem;
    }
    
    .header-right {
        gap: 5px;
    }
}

/* 메인 슬라이더 */
.main-slider {
    position: relative;
    width: 100%;
    height: 400px;
    margin-bottom: 30px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.slide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 40px 30px 30px;
    z-index: 2;
}

.slide-content h2 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-content p {
    font-size: 16px;
    line-height: 1.5;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* 슬라이더 네비게이션 */
.slider-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-dot.active,
.nav-dot:hover {
    background: white;
}

/* 슬라이더 모바일 반응형 */
@media (max-width: 768px) {
    .main-slider {
        height: 300px;
        margin-bottom: 20px;
    }
    
    .slide-content {
        padding: 20px 20px 20px;
    }
    
    .slide-content h2 {
        font-size: 22px;
    }
    
    .slide-content p {
        font-size: 14px;
    }
    
    .nav-dot {
        width: 10px;
        height: 10px;
    }
    
    .ad-banner,
    .ad-banner-between,
    .ad-banner-inline {
        padding: 15px;
        margin: 20px 0;
    }
    
    .category-filter {
        display: none;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .post-tags {
        margin-top: 0;
    }
}
