/* 기본 레이아웃 및 타이포그래피 */
.content-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Malgun Gothic', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* 바로가기 목차 */
.table-of-contents {
    background: #f0f8f0;
    border: 1px solid #c3e6c3;
    border-radius: 8px;
    padding: 25px;
    margin: 25px 0;
}

.table-of-contents h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
    text-align: center;
    border-bottom: 2px solid #28a745;
    padding-bottom: 10px;
}

.table-of-contents ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.table-of-contents li {
    margin: 12px 0;
    padding: 12px 15px;
    background: white;
    border-radius: 5px;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.table-of-contents li:hover {
    border-left-color: #28a745;
    background: #e8f5e8;
    transform: translateX(5px);
}

.table-of-contents a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    display: block;
}

.table-of-contents li:hover a {
    color: #28a745;
}

/* 제목 스타일 */
h1 {
    color: #2c3e50;
    font-size: 2.2em;
    margin: 0 0 20px 0;
    text-align: center;
    border-bottom: 3px solid #007bff;
    padding-bottom: 15px;
}

h2 {
    color: #2c3e50;
    font-size: 1.8em;
    margin: 40px 0 20px 0;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    scroll-margin-top: 20px;
}

h3 {
    color: #34495e;
    font-size: 1.4em;
    margin: 30px 0 15px 0;
    scroll-margin-top: 20px;
}

h4 {
    color: #2c3e50;
    font-size: 1.2em;
    margin: 25px 0 10px 0;
}

/* 기본 텍스트 */
p {
    margin: 15px 0;
    color: #333;
}

/* 기본 박스 스타일 (파스텔 컬러) */
.box-green {
    background: #f0f8f0;
    border: 1px solid #c3e6c3;
    border-left: 4px solid #28a745;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}

.box-blue {
    background: #f0f7ff;
    border: 1px solid #b8daff;
    border-left: 4px solid #007bff;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}

.box-purple {
    background: #f8f0ff;
    border: 1px solid #d1c4e9;
    border-left: 4px solid #6f42c1;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}

.box-yellow {
    background: #fffbf0;
    border: 1px solid #ffeaa7;
    border-left: 4px solid #ffc107;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}

.box-red {
    background: #fff5f5;
    border: 1px solid #f5c6cb;
    border-left: 4px solid #dc3545;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}

/* 기존 박스들을 새로운 컬러로 매핑 */
.intro-section {
    background: #f0f7ff;
    border: 1px solid #b8daff;
    border-left: 4px solid #007bff;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}

.definition-box {
    background: #f0f8f0;
    border: 1px solid #c3e6c3;
    border-left: 4px solid #28a745;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}

.overview-box {
    background: #f8f0ff;
    border: 1px solid #d1c4e9;
    border-left: 4px solid #6f42c1;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}

.overview-box h3 {
    color: #495057;
    margin-top: 0;
    border-bottom: 2px solid #6f42c1;
    padding-bottom: 10px;
}

/* 카드 스타일 */
.card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.card-green {
    background: #f0f8f0;
    border-left: 4px solid #28a745;
}

.card-blue {
    background: #f0f7ff;
    border-left: 4px solid #007bff;
}

.card-purple {
    background: #f8f0ff;
    border-left: 4px solid #6f42c1;
}

.card-yellow {
    background: #fffbf0;
    border-left: 4px solid #ffc107;
}

.card-red {
    background: #fff5f5;
    border-left: 4px solid #dc3545;
}

/* 그리드 레이아웃 */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

/* 테이블 스타일 개선 - 파스텔 헤더로 변경 */
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);
}

th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    padding: 15px;
    text-align: center;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    font-size: 14px;
    letter-spacing: 0.5px;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
    text-align: center;
    color: #495057;
}

tr:nth-child(even) {
    background: #f8f9fa;
}

tr:hover {
    background: #e8f4fd;
    transition: background-color 0.2s ease;
}

/* 테이블 헤더 컬러 변형 - 모든 색상이 잘 보이도록 */
th.text-success,
td .text-success {
    color: #155724 !important;
    font-weight: 600;
}

th.text-danger,
td .text-danger {
    color: #721c24 !important;
    font-weight: 600;
}

th.text-primary,
td .text-primary {
    color: #004085 !important;
    font-weight: 600;
}

th.text-warning,
td .text-warning {
    color: #856404 !important;
    font-weight: 600;
}

th.text-info,
td .text-info {
    color: #0c5460 !important;
    font-weight: 600;
}

th.text-secondary,
td .text-secondary {
    color: #383d41 !important;
    font-weight: 600;
}

th.text-dark,
td .text-dark {
    color: #1d2124 !important;
    font-weight: 600;
}

/* 단계별 순서 목록 스타일 */
.list-step1 {
    counter-reset: step1;
    list-style: none;
    padding-left: 0;
}

.list-step1 > li {
    counter-increment: step1;
    margin: 10px 0;
    padding-left: 30px;
    position: relative;
}

.list-step1 > li::before {
    content: counter(step1) ".";
    position: absolute;
    left: 0;
    color: #007bff;
    font-weight: bold;
}

.list-step2 {
    counter-reset: step2;
    list-style: none;
    padding-left: 20px;
}

.list-step2 > li {
    counter-increment: step2;
    margin: 8px 0;
    padding-left: 30px;
    position: relative;
}

.list-step2 > li::before {
    content: counter(step2) ")";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.list-step3 {
    counter-reset: step3 korean-consonant;
    list-style: none;
    padding-left: 20px;
}

.list-step3 > li {
    counter-increment: step3;
    margin: 8px 0;
    padding-left: 30px;
    position: relative;
}

.list-step3 > li::before {
    content: counter(step3, korean-consonant) ".";
    position: absolute;
    left: 0;
    color: #6f42c1;
    font-weight: bold;
}

.list-step4 {
    counter-reset: step4 korean-consonant;
    list-style: none;
    padding-left: 20px;
}

.list-step4 > li {
    counter-increment: step4;
    margin: 8px 0;
    padding-left: 30px;
    position: relative;
}

.list-step4 > li::before {
    content: counter(step4, korean-consonant) ")";
    position: absolute;
    left: 0;
    color: #dc3545;
    font-weight: bold;
}

/* 텍스트 컬러 클래스 */
.text-info {
    color: #17a2b8;
}

.text-success {
    color: #28a745;
}

.text-warning {
    color: #ffc107;
}

.text-danger {
    color: #dc3545;
}

.text-primary {
    color: #007bff;
}

.text-secondary {
    color: #6c757d;
}

.text-dark {
    color: #343a40;
}

.text-muted {
    color: #6c757d;
}

/* 배경 컬러 클래스 */
.bg-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.bg-success {
    background-color: #d4edda;
    color: #155724;
}

.bg-warning {
    background-color: #fff3cd;
    color: #856404;
}

.bg-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.bg-primary {
    background-color: #cce7ff;
    color: #004085;
}

.bg-light {
    background-color: #f8f9fa;
    color: #495057;
}

/* 알림 박스 */
.alert {
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
    border-left: 4px solid;
}

.alert-info {
    background: #d1ecf1;
    border-left-color: #17a2b8;
    color: #0c5460;
}

.alert-success {
    background: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.alert-warning {
    background: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}

.alert-danger {
    background: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.alert-primary {
    background: #cce7ff;
    border-left-color: #007bff;
    color: #004085;
}

/* 체크리스트 스타일 */
.checklist-container {
    background: #f8f0ff;
    border: 1px solid #d1c4e9;
    border-radius: 8px;
    padding: 25px;
    margin: 25px 0;
}

.checklist-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
}

.checklist {
    margin: 20px 0;
}

.checklist-item {
    display: flex;
    align-items: center;
    margin: 12px 0;
    padding: 15px;
    background: white;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.checklist-item:hover {
    background: #f0f7ff;
}

.checklist-item input[type="checkbox"] {
    margin-right: 12px;
    transform: scale(1.2);
    cursor: pointer;
}

.checklist-item label {
    cursor: pointer;
    color: #495057;
    font-weight: 500;
}

/* FAQ 섹션 */
.faq-section {
    margin: 25px 0;
}

.faq-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin: 15px 0;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.faq-question {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    color: #2c3e50;
}

.faq-answer {
    padding: 20px;
    color: #495057;
    line-height: 1.7;
}

/* 단계별 프로세스 */
.process-steps {
    margin: 25px 0;
}

.step-item {
    display: flex;
    align-items: flex-start;
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

.step-number {
    background: #007bff;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 20px;
    flex-shrink: 0;
}

.step-content h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #2c3e50;
}

/* 결론 섹션 */
.conclusion-section {
    background: #f8f0ff;
    border: 1px solid #d1c4e9;
    color: #2c3e50;
    padding: 25px;
    border-radius: 8px;
    margin: 30px 0;
}

.conclusion-section h2 {
    color: #2c3e50;
    border-bottom: 2px solid #6f42c1;
    margin-top: 0;
    margin-bottom: 20px;
}

.conclusion-section p {
    margin: 15px 0;
    line-height: 1.7;
}

/* 스크롤 투 탑 버튼 */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 50px;
    cursor: pointer;
    display: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: all 0.3s;
    z-index: 1000;
    font-weight: bold;
}

/* 모든 상태에서 흰색 글자 유지 */
.scroll-to-top:link,
.scroll-to-top:visited,
.scroll-to-top:hover,
.scroll-to-top:active {
    color: white !important;
    text-decoration: none !important;
}

.scroll-to-top:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

/* 링크 스타일 */
a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* 유틸리티 클래스 */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.font-bold {
    font-weight: bold;
}

.font-normal {
    font-weight: normal;
}

.margin-top-0 {
    margin-top: 0;
}

.margin-bottom-0 {
    margin-bottom: 0;
}

.padding-0 {
    padding: 0;
}

/* 쿠팡 파트너스 공지 스타일 */
.coupang-notice {
    background: #000;
    color: #ff69b4;
    padding: 10px;
    margin: 20px 0;
    border-radius: 5px;
    font-family: Arial, sans-serif;
    text-align: center;
}

/* 제품 상세보기 버튼 스타일 */
.product-detail-btn {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    margin: 10px 5px;
}

.product-detail-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: white !important;
    text-decoration: none;
}

.product-detail-btn:visited {
    color: white !important;
}

.product-detail-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
    color: white !important;
}

.product-detail-btn:link {
    color: white !important;
}

/* 추천 상품 섹션 스타일 */
.recommended-products {
    margin: 30px 0;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
}

.recommended-products h3 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 20px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.product-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.product-image {
    font-size: 3em;
    margin-bottom: 15px;
}

.product-info h4 {
    color: #2c3e50;
    margin: 10px 0;
    font-size: 1.2em;
}

.product-info p {
    color: #6c757d;
    font-size: 0.9em;
    margin: 10px 0;
}

.product-price {
    color: #e74c3c;
    font-weight: bold;
    margin: 10px 0;
}

.product-card .product-detail-btn {
    margin-top: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 10px 20px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.product-card .product-detail-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
}

.coupang-ad-center {
    text-align: center;
    margin: 20px auto;
    display: block;
}

/* 모바일 반응형 - 최대 공간 활용 */
@media (max-width: 768px) {
    .content-container {
        padding: 5px;
        margin: 0;
    }
    
    h1 {
        font-size: 1.8em;
        margin-bottom: 10px;
        padding-bottom: 8px;
    }
    
    h2 {
        font-size: 1.5em;
        margin: 15px 0 10px 0;
        padding-bottom: 6px;
    }
    
    h3 {
        font-size: 1.3em;
        margin: 12px 0 8px 0;
    }
    
    /* 모든 박스 여백 최소화 */
    .box-green, .box-blue, .box-purple, .box-yellow, .box-red,
    .intro-section, .definition-box, .overview-box,
    .card, .card-green, .card-blue, .card-purple, .card-yellow, .card-red {
        padding: 8px;
        margin: 6px 0;
    }
    
    .table-of-contents, .checklist-container, .conclusion-section {
        padding: 8px;
        margin: 8px 0;
    }
    
    /* 그리드를 1열로 변경 */
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    /* 단계별 아이템 간격 최소화 */
    .step-item {
        flex-direction: column;
        text-align: center;
        padding: 10px;
        margin: 6px 0;
    }
    
    .step-number {
        margin-right: 0;
        margin-bottom: 8px;
        width: 35px;
        height: 35px;
    }
    
    /* 체크리스트 간격 최소화 */
    .checklist-item {
        padding: 8px;
        margin: 5px 0;
    }
    
    /* FAQ 간격 최소화 */
    .faq-question, .faq-answer {
        padding: 8px;
    }
    
    .faq-item {
        margin: 6px 0;
    }
    
    /* 테이블 최적화 */
    table {
        font-size: 13px;
        margin: 8px 0;
    }
    
    th, td {
        padding: 6px 4px;
    }
    
    /* 목록 간격 최소화 */
    .list-step1 > li, .list-step2 > li, .list-step3 > li, .list-step4 > li {
        margin: 4px 0;
        padding-left: 20px;
    }
    
    ul, ol {
        margin: 6px 0;
        padding-left: 15px;
    }
    
    li {
        margin: 3px 0;
    }
    
    p {
        margin: 6px 0;
        font-size: 14px;
    }
    
    .scroll-to-top {
        bottom: 10px;
        right: 10px;
        padding: 8px 12px;
    }
    
    .alert {
        padding: 8px;
        margin: 6px 0;
    }
    
    /* 추천 상품 모바일 최적화 */
    .recommended-products {
        padding: 15px;
        margin: 15px 0;
    }
    
    .product-card {
        padding: 15px;
    }
    
    .product-image {
        font-size: 2.5em;
    }
}

@media (max-width: 480px) {
    .content-container {
        padding: 3px;
    }
    
    h1 {
        font-size: 1.6em;
        margin-bottom: 8px;
        padding-bottom: 6px;
    }
    
    h2 {
        font-size: 1.4em;
        margin: 12px 0 8px 0;
        padding-bottom: 4px;
    }
    
    h3 {
        font-size: 1.2em;
        margin: 10px 0 6px 0;
    }
    
    /* 극도로 간격 최소화 */
    .box-green, .box-blue, .box-purple, .box-yellow, .box-red,
    .intro-section, .definition-box, .overview-box,
    .card, .card-green, .card-blue, .card-purple, .card-yellow, .card-red {
        padding: 6px;
        margin: 4px 0;
    }
    
    .table-of-contents, .checklist-container, .conclusion-section {
        padding: 6px;
        margin: 6px 0;
    }
    
    .step-item {
        padding: 8px;
        margin: 4px 0;
    }
    
    .checklist-item {
        padding: 6px;
        margin: 3px 0;
    }
    
    .faq-question, .faq-answer {
        padding: 6px;
    }
    
    .faq-item {
        margin: 4px 0;
    }
    
    th, td {
        padding: 4px 2px;
        font-size: 12px;
    }
    
    .list-step1 > li, .list-step2 > li, .list-step3 > li, .list-step4 > li {
        margin: 2px 0;
        padding-left: 18px;
    }
    
    ul, ol {
        margin: 4px 0;
        padding-left: 12px;
    }
    
    li {
        margin: 2px 0;
    }
    
    p {
        margin: 4px 0;
        font-size: 13px;
    }
    
    .scroll-to-top {
        bottom: 8px;
        right: 8px;
        padding: 6px 10px;
    }
    
    .alert {
        padding: 6px;
        margin: 4px 0;
    }
    
    /* 추천 상품 480px 이하 최적화 */
    .recommended-products {
        padding: 10px;
        margin: 10px 0;
    }
    
    .product-card {
        padding: 12px;
    }
    
    .product-image {
        font-size: 2em;
    }
    
    .product-info h4 {
        font-size: 1.1em;
    }
    
    .product-info p {
        font-size: 0.8em;
    }
}

/* 접근성 개선 */
*:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* 인쇄 최적화 */
@media print {
    .content-container {
        max-width: none;
        padding: 0;
    }
    
    .scroll-to-top {
        display: none;
    }
    
    .box-green, .box-blue, .box-purple, .box-yellow, .box-red,
    .intro-section, .definition-box, .overview-box {
        border: 1px solid #000;
        box-shadow: none;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    .recommended-products {
        background: white;
        border: 1px solid #000;
    }
    
    .product-card {
        border: 1px solid #000;
        box-shadow: none;
    }
}

