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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

.container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 600px;
    width: 100%;
}

h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 2rem;
    text-align: center;
}

.subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 40px;
    font-size: 0.95rem;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin-bottom: 12px;
}

.nav-link {
    display: block;
    padding: 16px 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateX(5px);
}

.nav-link:active {
    transform: translateX(2px);
}

.section-title {
    color: #333;
    font-size: 1.1rem;
    margin: 30px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.section-title:first-child {
    margin-top: 0;
}

/* 공통 헤더 스타일 */
.header {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.header-logo {
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.header-nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.header-link {
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.header-link:hover {
    background: #667eea;
    color: white;
}

.header-link.active {
    background: #667eea;
    color: white;
}

/* 헤더가 있는 페이지를 위한 body 패딩 (1줄~2줄 네비·wrap 대비) */
body.has-header {
    padding-top: 132px;
}

/* exam-sheet: 고정 헤더와 흰 박스 사이 */
body.has-header .exam-embed-wrap {
    margin-top: 40px;
}

/* exam-sheet: 시각화 유형별 가로 폭 (1차 테스트, max-width + 반응형) */
.exam-embed-wrap {
    align-self: center;
    width: 100%;
    max-width: var(--exam-embed-max, 720px);
    margin-inline: auto;
    min-width: 0;
    box-sizing: border-box;
}
.exam-embed-wrap--chart {
    --exam-embed-max: 720px;
}
.exam-embed-wrap--dash {
    --exam-embed-max: 1200px;
}
.exam-embed-wrap--report {
    --exam-embed-max: 720px;
}
/* Infogram 랜드스케이프 리포트: 가로 여유 */
.exam-embed-wrap--report-land {
    --exam-embed-max: 1200px;
}

/* Datawrapper 예제(1·2번): 그라데이션 배경 위 가독성용 패널 */
.exam-embed-wrap--panel {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 28px 18px 18px;
}

/* 긴 iframe: 세로 상한 + 영역 안 스크롤 (--exam-embed-y-cap 로 조절) */
/* border-radius+overflow 조합은 iframe 상단이 잘리는 경우가 있어 모서리는 패널에만 둠 */
.exam-embed-y-scroll {
    max-height: var(--exam-embed-y-cap, 720px);
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 22px 12px 16px;
    box-sizing: border-box;
}
.exam-embed-y-scroll iframe {
    display: block;
}

/* 임베드 방식 배지 */
.nav-link-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.nav-link-text {
    flex: 1;
}

.embed-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.embed-badge.api {
    background: #e3f2fd;
    color: #1976d2;
}

.embed-badge.iframe {
    background: #fff3e0;
    color: #f57c00;
}

.embed-badge.script {
    background: #e8f5e9;
    color: #2e7d32;
}

.nav-link:hover .embed-badge.api {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.nav-link:hover .embed-badge.iframe {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.nav-link:hover .embed-badge.script {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* 공통 푸터 스타일 */
.footer {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    font-size: 0.875rem;
    color: #666;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    line-height: 1.6;
}

.footer-copyright {
    margin-bottom: 4px;
}

.footer-note {
    font-size: 0.8rem;
    color: #999;
}

/* 푸터 플레이스홀더 */
#footer-placeholder {
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

/* 푸터가 있는 페이지를 위한 body 패딩 */
body.has-footer {
    padding-bottom: 80px;
}

/* PWA 설치 배너 */
.install-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.install-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.install-banner-text {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
}

.install-button {
    background: white;
    color: #667eea;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.install-button:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.install-button:active {
    transform: translateY(0);
}

/* Tableau 임베드 공통 스타일 */
.tableauPlaceholder {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 20px;
}

.tableauPlaceholder object {
    margin: 0 auto;
}
