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

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #373737;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 스크롤 성능 최적화 */
html {
    scroll-behavior: smooth;
}

/* 포커스 아웃라인 제거 */
*:focus {
    outline: none;
}

/* 숨김 텍스트 (스크린 리더용) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 폰트 스타일 정의 */
h1, .h1 {
    font-size: 20px;
    line-height: 160%;
    color: #373737;
    font-weight: 700;
}

h2, .h2 {
    font-size: 16px;
    line-height: 200%;
    color: #A6A6A6;
    font-weight: 500;
}

.h3b {
    font-size: 13px;
    line-height: 160%;
    color: #373737;
    font-weight: 700;
}

.h3w {
    font-size: 13px;
    line-height: 160%;
    color: #ffffff;
    font-weight: 700;
}

.h3g {
    font-size: 13px;
    line-height: 160%;
    color: #A6A6A6;
    font-weight: 700;
}

.h4 {
    font-size: 11px;
    line-height: 100%;
    color: #A6A6A6;
    font-weight: 700;
}

.h5 {
    font-size: 11px;
    line-height: 100%;
    color: #3BC372;
    font-weight: 700;
}

/* 헤더 섹션 */
.header-section {
    background-color: #C1FFB9;
    padding: 40px 20px;
}

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

.logo {
    height: 34px;
    width: auto;
    cursor: pointer;
}

.download-btn-img {
    width: 127px;
    height: 34px;
    cursor: pointer;
}

/* 타이틀 섹션 */
.title-section {
    padding: 0 20px;
}

.keyword-area {
    display: flex;
    gap: 2px;
    margin-bottom: 10px;
}

.keyword {
    background-color: #f5f5f5;
    border-radius: 6px;
    padding: 3px 5px;
    font-size: 11px;
    line-height: 100%;
    color: #A6A6A6;
    font-weight: 700;
}

.title-area {
    margin-bottom: 10px;
    padding-right: 70px;
}

.main-title {
    font-size: 20px;
    line-height: 160%;
    color: #373737;
    font-weight: 700;
    text-align: left;
}

.count-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.date {
    font-size: 13px;
    line-height: 160%;
    color: #A6A6A6;
    font-weight: 700;
}

.profile-container {
    display: flex;
    align-items: center;
    position: relative;
}

.profile {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #ffffff;
}

.profile1 {
    z-index: 0;
}

.profile2 {
    margin-left: -4px;
    z-index: 1;
}

.profile-count {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #ffffff;
    background-color: #C1FFB9;
    margin-left: -4px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    line-height: 100%;
    color: #3BC372;
    font-weight: 700;
}

/* 버튼 섹션 */
.button-section {
    padding: 0 20px;
}

.button-row {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.content-btn {
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 18.5px;
    height: 45px;
    font-size: 13px;
    line-height: 160%;
    color: #373737;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.btn-icon {
    width: 16px;
    height: 16px;
}

.button-row .content-btn {
    flex: 1;
}

.share-btn {
    width: 100%;
}

/* 내용 섹션 */
.content-section {
    padding: 0 20px;
    position: relative;
}

.section-title {
    font-size: 20px;
    line-height: 160%;
    color: #373737;
    font-weight: 700;
    margin-bottom: 20px;
}

.content-text {
    position: relative;
    z-index: 1;
    min-height: 200px;
    padding-bottom: 40px;
}

.content-text p {
    font-size: 16px;
    line-height: 200%;
    color: #A6A6A6;
    font-weight: 500;
    margin-bottom: 10px;
    white-space: pre-line !important;
}

.content-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 127px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 55px, rgba(255, 255, 255, 1) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 20px 20px 20px;
    z-index: 2;
}

.content-overlay.no-text {
    position: relative;
    width: 100%;
    height: auto;
    background: transparent;
    padding: 20px 0; /* 좌우 패딩 제거, 상하만 20px */
    margin-top: 20px;
}

.content-overlay .button-row {
    display: flex;
    gap: 4px;
    width: 100%;
}

.content-overlay .button-row .content-btn {
    flex: 1;
}

/* 사진 섹션 */
.photo-section {
    padding: 0 20px;
}

.photo-slider {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 20px;
    margin: 0 -20px;
    margin-bottom: 20px;
}

.photo-item {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    cursor: pointer;
}

.photo-slider::-webkit-scrollbar {
    display: none;
}

.photo-slider {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 푸터 섹션 */
.footer-section {
    padding: 0 20px;
}

.app-info {
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.app-gif {
    width: 100px;
    height: 100px;
    margin-bottom: 4px;
}

.app-title {
    font-size: 20px;
    line-height: 160%;
    color: #373737;
    font-weight: 700;
    margin-bottom: 4px;
}

.app-subtitle {
    font-size: 13px;
    line-height: 160%;
    color: #A6A6A6;
    font-weight: 700;
    margin-bottom: 10px;
}

.download-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.download-buttons a {
    display: block;
}

.store-btn {
    cursor: pointer;
}

.store-btn:first-child {
    width: 102px;
    height: 34px;
}

.store-btn:last-child {
    width: 113px;
    height: 34px;
}

.copyright {
    font-size: 11px;
    line-height: 100%;
    color: #A6A6A6;
    font-weight: 700;
    text-align: center;
}

/* 팝업 스타일 */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
}

.popup-content {
    width: 315px;
    background-color: #ffffff;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 28px;
    text-align: center;
}

.popup-title {
    font-size: 20px;
    line-height: 160%;
    color: #373737;
    font-weight: 700;
    margin: 0;
}

.popup-text {
    font-size: 13px;
    line-height: 160%;
    color: #A6A6A6;
    font-weight: 700;
    margin: 0;
}

.popup-store-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.popup-store-buttons a {
    display: block;
}

.popup-store-buttons .store-btn {
    cursor: pointer;
}

.popup-close {
    font-size: 13px;
    line-height: 160%;
    color: #A6A6A6;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
    margin: 0;
}

/* 데스크톱 2단 레이아웃 */
@media (min-width: 1024px) {
    body {
        overflow-x: hidden;
    }

    /* 헤더 섹션 데스크톱에서 숨김 */
    .header-section {
        display: none;
    }

    /* 2단 레이아웃 컨테이너 */
    .desktop-container {
        display: flex;
        min-height: 100vh;
        max-width: 810px; /* 375px + 20px + 375px + 40px(여백) */
        margin: 0 auto;
        gap: 20px;
        padding: 40px 20px;
    }

    /* 왼쪽 콘텐츠 */
    .left-content {
        width: 375px;
        height: 720px;
        background-color: #ffffff;
        border-radius: 20px;
        border: 1px solid rgba(0, 0, 0, 0.05);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 80px 20px;
        overflow: hidden;
    }

    /* 첫번째 영역 (위): 큰 로고 */
    .left-top-section {
        display: flex;
        justify-content: center;
        align-items: flex-start;
    }

    .logo-big {
        width: 214px;
        height: 116px;
        cursor: pointer;
    }

    /* 두번째 영역 (아래): 푸터 섹션 */
    .desktop-footer {
        padding: 0 !important;
        width: 100%;
        margin-top: auto;
    }

    .desktop-footer .app-info {
        background-color: transparent;
        border: none;
    }

    .desktop-footer .app-gif {
        width: 100px;
        height: 100px;
        margin-bottom: 4px;
    }

    .desktop-footer .copyright {
        font-size: 11px;
        line-height: 100%;
        color: #A6A6A6;
        font-weight: 700;
        text-align: center;
        margin-top: -20px;
    }

    /* 오른쪽 콘텐츠 */
    .right-content {
        width: 375px;
        background-color: #ffffff;
        border-radius: 20px;
        border: 1px solid rgba(0, 0, 0, 0.05);
        min-height: 9vh;
        overflow: auto;
    }

    /* 오른쪽 콘텐츠 내부 요소들은 모바일과 동일하게 */
    .right-content .title-section,
    .right-content .button-section,
    .right-content .content-section,
    .right-content .photo-section,
    .right-content .footer-section {
        padding-left: 20px;
        padding-right: 20px;
    }

    .right-content .title-area {
        padding-right: 70px;
    }

    /* 그라데이션 영역 width를 오른쪽 콘텐츠와 맞춤 */
    .right-content .content-overlay {
        margin-left: 0;
        margin-right: 0;
        padding-left: 20px;
        padding-right: 20px;
    }

        /* no-text 클래스일 때 패딩 제거 */
    .right-content .content-overlay.no-text {
        padding-left: 0;
        padding-right: 0;
    }

    .right-content .photo-slider {
        margin-left: -20px;
        margin-right: -20px;
    }

    /* 데스크톱에서 오른쪽 푸터 숨김 */
    .right-content .footer-section {
        display: none;
    }

    /* 데스크톱에서 6번째 빈섹션 제거 (푸터 섹션 아래) */
    .right-content .footer-section + .empty-section {
        display: none;
    }
}

/* 태블릿과 중간 크기 화면에서는 모바일 레이아웃 유지 */
@media (min-width: 481px) and (max-width: 1023px) {
    .left-content {
        display: none;
    }
    
    .right-content {
        width: 100%;
    }
}

/* 반응형 조정 (모바일 기준) */
@media (max-width: 480px) {
    .header-section {
        padding: 40px 16px;
    }
    
    .title-section,
    .button-section,
    .content-section,
    .photo-section,
    .footer-section {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .title-area {
        padding-right: 50px;
    }
    
    .content-overlay {
        padding: 0 16px 16px 16px;
    }
    
    .photo-slider {
        padding: 0 16px;
        margin: 0 -16px;
    }
    
    .popup-content {
        width: 280px;
        padding: 24px;
    }
}

/* 모바일과 태블릿에서 데스크톱 전용 요소 숨김 */
@media (max-width: 1023px) {
    .desktop-container {
        display: block;
    }
    
    .left-content {
        display: none;
    }
    
    .right-content {
        width: 100%;
    }
    
    /* 데스크톱 전용 푸터 숨김 */
    .desktop-footer {
        display: none;
    }
} 