/* layout.css : 네비게이션, 섹션 박스, 애니메이션 */

/* 상단 헤더 */
header { margin-bottom: 30px; }

/* 탭 네비게이션 (메뉴) */
.nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap; /* 화면 좁으면 줄바꿈 */
}

.nav button {
    padding: 10px 18px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    background: var(--white);
    color: #6b7280;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.nav button:hover {
    transform: translateY(-2px);
    color: var(--primary);
}

.nav button.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

/* 메인 컨텐츠 박스 (카드 형태) */
section {
    display: none; /* 기본 숨김 */
    background: var(--white);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 0 auto;
    border: 1px solid #e5e7eb;
}

/* 활성화된 섹션 등장 효과 */
section.active {
    display: block;
    animation: slideUp 0.4s ease-out forwards;
}

/* 애니메이션 정의 */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* layout.css 맨 아래에 추가 */

/* 전체 화면 어두운 배경 */
.ad-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* 반투명 검은색 */
    z-index: 1000; /* 제일 위에 뜨도록 */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 하얀색 팝업창 */
.ad-modal {
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    animation: popup 0.3s ease-out;
}

/* 광고 박스 */
.ad-box {
    margin: 15px 0;
    min-height: 250px; /* 광고 들어갈 자리 확보 */
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-caption {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 10px;
}

.close-btn {
    background: #4b5563; /* 회색 버튼 */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}
.close-btn:hover { background: #374151; }

@keyframes popup {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
