/* define global variables */
:root {
    --app_max_width: 1200px;
    --popup_max_width: 1150px;
    --list_app_max_width: 300px;

    --header_height: 50px;
    --bottom_bar_height: 75px;
    --input_beside_button_width: 17px;
    --app_list_width_padding: 10px;
    --app_list_height_padding: 325px;
    --app_rank_list_height_padding: 105px;
    --user_list_height_padding: 220px;
    --push_list_height_padding: 290px;
    --content_detail_height_padding: 40px;
    --mobile_screen_gap: 38px;
}

* { padding: 0; margin: 0; }

html, body {
    height: 100%;
    width: 100%;

    margin: 0px;
    padding: 0 !important;
    box-sizing: border-box;

    position: relative; /* 고정 제거 */
    overflow: hidden;
    overscroll-behavior-y: contain;

    /* user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none; */

    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

a { color: #222; text-decoration: none; }
a:active { color : #2698cb; }

#app {
    position: relative;
    height: 100%;
    width: 100%;

    overflow: hidden;
    margin: auto;
    padding: 0;
    box-sizing: border-box;
}

.mainComponent {
    position: relative;
    width: 100%;
    height: 100%;

    margin:0;
    padding:0;
    box-sizing: border-box;

    overflow: auto; /* 플로팅 메뉴 화면 넘어갈때 스크롤 보여지기 위해 */
    -webkit-overflow-scrolling: touch;

    text-align: center;
    font-size: 17px;
    background-color: #ededed;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;  /* 개행 금지 */
    gap: 2px;
}

.mainWrapper {
    height: 100%;
    width: 100%;

    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding: 0;
    margin: 0;
    overflow: hidden;
    box-sizing: border-box;
    text-align: center;

    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch; /* 변경: 아이템 가로 전체 차지 */
    background-color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/**********
* contents(tab) area    *
***********/
.contentsArea {
    flex:1; /* 남은 공간 전체 차지. flexGrow, flexShrink, flexBasis 한번에 적용 */
    min-height: 0;         /* 내부 스크롤 가능하게 하는 핵심 */

    display: none;
    flex-direction: row;
    flex-wrap: wrap;    /* wrap: multi-line, nowrap: single-line */
    justify-content: space-around;
    align-items: stretch;   /* flex-wrap: nowrap 시 적용 */
    align-content: flex-start;  /* flex-wrap: wrap 시 적용 */


    width: 100%;
    max-height: 100%;
    height:100%;
    overflow: auto;

    box-sizing: border-box;
    margin: 0;
    padding: 0;

    scroll-behavior: smooth; /* 프로그래밍 스크롤 부드럽게 */
    overscroll-behavior-y: contain; /* Android/Chrome 바운스 느낌 */
    -ms-overflow-style: none;
    scrollbar-width: none;

    /* -webkit-overflow-scrolling: touch;  iOS용 바운스 그러나 사용시 z-index가 무력화됨. 사용금지  */

    /* border: 1px solid red; */
}
.contentsArea::-webkit-scrollbar {
    display: none;
}
.contentsAreaShow {
    display:flex;
}
.contentsArea > * {
    position: relative;
    z-index: auto; /* z-index: 1인 요소보다 아래 위치 for titlebar */
}

.eachContentArea {
    position: relative;
    margin: 10px;
    padding: 0px;
    box-sizing: border-box;
    overflow: hidden;
    scroll-behavior: smooth;
    flex-shrink: 1;
    width:100%;
    max-width: 100%;
    height:fit-content;
}



/* snsMoviePlayer style */
.eachContentSnsMoviePlayerArea {
    border: 1px solid #9c9c9d28;
    border-radius: 10px;
    background-color: white;

    overflow: hidden;

    width:100%;
    height: auto;
}

.eachContentYouTubePlayerContainer{
    position: relative; /* 자식 iframe의 absolute 기준점 */
    width: 100%;
    height: 0; /* aspect-ratio 트릭을 위한 높이 0 */
    padding-bottom: 56.25%; /* 16:9 비율 (9 / 16 = 0.5625 -> 56.25%) */
    aspect-ratio: 16 / 9; /* 또는 aspect-ratio: 16 / 9; 최신 브라우저 지원 시 */
}

.eachContentYouTubePlayer{
    position: absolute; /* 부모 기준 절대 위치 */
    top: 0;
    left: 0;
    width: 100%;   /* 부모 크기 꽉 채움 */
    height: 100%;  /* 부모 크기 꽉 채움 */

    border: none;
}

/* tiktokMoviePlayer style */
.eachContentTikTokMoviePlayerArea {
    border: 1px solid #9c9c9d28;
    border-radius: 10px;
    background-color: white;

    width:auto;
    height: auto;
}

.eachContentTiktokPlayerContainer{
    position: relative; /* 자식 iframe의 absolute 기준점 */
    padding:0;
    margin: 0 auto 0 auto;

    width:100%;
    height: auto;

    /* border: 1px solid blue; */
}
.eachContentTiktokPlayerContainer > blockquote,
.eachContentTiktokPlayerContainer > iframe {
    /* border:2px solid red; */

    /* 기본 마진/패딩 제거 */
    margin: 0 !important; /* 틱톡 인라인 스타일이나 다른 CSS보다 우선하도록 !important 사용 고려 */
    padding: 0 !important; /* 틱톡 인라인 스타일이나 다른 CSS보다 우선하도록 !important 사용 고려 */

    /* 너비 설정 (필요시) */
    display: block;
    width:100% !important;
    height: auto !important;
    /* aspect-ratio: 16 / 9 !important; */
    z-index: 0 !important;

    border:0px !important;
}

/* instagramMoviePlayer style */
.eachContentInstagramMoviePlayerArea {
    border: 1px solid #9c9c9d28;
    border-radius: 10px;
    background-color: white;

    width:auto;
    height: auto;
}

.eachContentInstagramPlayerContainer{
    position: relative; /* 자식 iframe의 absolute 기준점 */
    padding:0;
    margin: 0 auto 0 auto;

    width: fit-content;
    height: fit-content;

    /* border: 1px solid blue; */
}

/* content floating edit button style (Apple glassmorphism style) */
.contentEditBtn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 25;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: 6px 14px;
    border-radius: 9999px; /* Apple signature pill shape */

    background-color: rgba(39, 39, 41, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);

    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    font-family: SF Pro Text, system-ui, -apple-system, sans-serif;
    letter-spacing: -0.2px;

    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
}

.contentEditBtn:hover {
    background-color: rgba(20, 20, 22, 0.92);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.contentEditBtn:active {
    transform: scale(0.94); /* Apple standard press micro-interaction */
    background-color: rgba(0, 0, 0, 0.98);
}

.contentEditBtnIcon {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    flex-shrink: 0;
}

.contentEditBtnText {
    font-size: 13px;
    line-height: 1;
}

/* iframe style */
.eachContentIframe{
    width: 100%;
    height: 100%;

    border: none;
}

/**********
* tabbarWebSite     *
***********/
.tabbar-web-site-area{
    /* border: 1px solid red; */

    width: 100%;
    height: calc(100% - 5px);
    margin: 0px 0 0 0;
    padding: 0;
}

/**********
* bottom tab bar    *
***********/
.bottom-bar {
    height: var(--bottom_bar_height);
    width: 100%;
    margin: 0;
    padding: 0;

    background-color: #f9f8f8;

    flex-shrink: 0; /* 높이 유지 (중요) */

    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;

    /* border:1px solid red; */
}

.bottom-bar::-webkit-scrollbar {
    display: none; /* for Chrome, Safari, and Opera */
}

.bottom-bar-element {
    display: inline-block;

    width: 25%;
    min-width:70px;
    height: 100%;

    font-weight: 500;
    font-size: 15px;
    text-align: center;

    /* border:1px solid blue; */
}
.bottom-bar:active .bottom-bar-element {
	/* color: #78909C; */
	transition: all 0.5s cubic-bezier(.25,.8,.25,1);
}

.bottom-bar-element-container{
    /* border:1px solid red; */

    display:flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    /* display:inline-block; */
    position:relative;

    margin: 7px auto auto auto;
    width: 100%;
    cursor: pointer;
}

.bottom-bar-element-container.check-mark::after {
    content: "";
    position: absolute;
    right: -20px;
    bottom: 0px;
    width: 15px;
    height: 15px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 15'%3E%3Ccircle cx='7.5' cy='7.5' r='7.5' fill='%23d9534f'/%3E%3Cpath d='M4 8l2.5 2.5L11 6' stroke='%23fff' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: contain; /* cover 대신 contain → 잘림 방지 */
    pointer-events: none;
    z-index: 2147483647;
}

.bottom-bar-element-image {
    /* border: 1px solid red; */

    border-radius: 5px;
    width: 30px;
    height: 30px;
    object-fit: contain;

    margin: 0;
    padding: 0;
}

.bottom-bar-element-title{
    width:100%;
    /* height: 16px; */
    /* overflow: hidden; */

    line-height: 1.5;

    mix-blend-mode: normal;
    color: black;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.helpButtonIcon {
    width: var(--input_beside_button_width);
    height: var(--input_beside_button_width);

    vertical-align: middle;

    margin:0 5px 0 5px;

    cursor: pointer;
}

/* Text Button Area */
.textButtonArea{
    display: inline-block;
    width: calc(100% - 35px);
    text-align: center;
    margin-top: 7px;
    padding:0px;
    line-height: 1px;

    /* border:1px solid red; */
}
.textButtonRightArea{
    text-align: right;
    margin-right: 35px;
}

.textButton {
    display: inline-block;

    margin: 0px;
    color: rgb(56, 54, 54);
    text-align: center;
    text-decoration: none;
    border: 0px solid rgb(56, 54, 54);
    background-color:transparent;
    font-size: 16px;
    font-weight: normal;
    word-wrap: none;
    cursor: pointer;

    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
.textButton:active, .textButton:hover {
    opacity: .7;
    outline: none;
    color: #2698cb;
}
.textButtonLeft {
    text-align: left;
}
.textButtonAutoWidth{
    width:auto;
}


/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;

    width:100%;
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.quick-action:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.quick-action.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quick-action.disabled:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: none;
}

.quick-action-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 8px;
    color: white;
}

.quick-action-text {
    font-size: 14px;
    color: #e4e6ea;
    text-align: center;
    font-weight: 500;
}

/* User Section */
.user-section {
    width:100%;

    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    box-sizing: border-box;
    margin: 20px auto 0px auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    padding: 15px 10px;
    box-sizing: border-box;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 15px;
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin-right: 15px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
}

.user-details {
    flex: 1;
}

.user-name {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.user-status {
    color: #9ca3af;
    font-size: 14px;
}

/* Menu Items */
.menu-item {
    display: flex;
    padding: 15px 15px;
    margin: 5px 0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #e4e6ea;
    font-size: 14px;
    font-weight: 500;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(5px);
}

.menu-item-icon {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    flex-shrink: 0;
    opacity: 0.8;
}

.menu-item:hover .menu-item-icon:not(.disabled) {
    opacity: 1;
}

.menu-item-text {
    flex: 1;
    text-align: left;
}

.close-button {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.977); /* 평상시엔 은은하게 */
    background: rgba(30, 29, 29, 0.705);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.close-button svg {
    width: 18px;
    height: 18px;
}

.close-button:hover {
    background: rgba(239, 68, 68, 0.8); /* 호버 시 살짝 붉은 빛 */

    transform: rotate(90deg); /* 회전 애니메이션 추가 */
}

/**********
* Progress Area    *
***********/
.progressArea {
    position: fixed;
    z-index: 2147483647;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;
    pointer-events: auto;

    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding: 0 0 20px 0;

    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;

    background: rgba(0, 0, 0, 0.0);

}

.progressArea.show {
    visibility: visible;
    opacity: 1;
}

.progress-toast {
    background: rgba(31, 41, 55, 0.95);
    backdrop-filter: blur(8px);
    margin-bottom:30px;
    padding: 12px 20px;

    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);

    display: flex;
    align-items: center;
    gap: 12px;

    pointer-events: auto;
    max-width: 90%;

    transform: translateY(100px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.progressArea.show .progress-toast {
    transform: translateY(0);
}

.progress-spinner {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ffa516;
    animation: progress-spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes progress-spin {
    100% { transform: rotate(360deg); }
}

#progress-message {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.01em;
    margin: 0;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 600px;

    opacity: 1;
    transition: opacity 0.3s ease;

    user-select: none;
    -webkit-user-select: none;
    -webkit-app-region: none;
}

#progress-message.updating {
    opacity: 0.6;
}

/**********
* Snackbar Area *
***********/
/* 토스트 스택 컨테이너 (모든 토스트가 쌓일 곳) */
.toast-stack-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);

    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    z-index: 2147483647;
    pointer-events: none;

    /* --- 모바일 화면에서 최대 너비 조정 --- */
    /* 뷰포트 너비 (100vw)에서 좌우 각 10px(총 20px) 여백을 뺀 값으로 설정 */
    max-width: calc(100% - 20px); /* 화면 너비를 기준으로 계산 */
    width:100%;

    align-items: center;
}

/* 개별 토스트 박스 스타일 */
.toast-box {
    background-color: rgba(51, 51, 51, 0.9);
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);

    max-width: auto;
    min-width: auto; /* 필요하다면 최소 너비를 고정 값으로 설정 (예: 200px) */

    text-align: center;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.6;

    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    pointer-events: auto;
    cursor: pointer;
}

/* 토스트 박스 등장/사라지는 애니메이션 및 중요도 색상 (변경 없음) */
.toast-box.show { opacity: 1; transform: translateY(0); }
.toast-box.hide { opacity: 0; transform: translateY(20px); }
.toast-box.info { background-color: rgba(33, 149, 243, 0.984); }
.toast-box.success { background-color: rgba(76, 175, 80, 0.9); }
.toast-box.warning { background-color: rgba(255, 152, 0, 0.9); }
.toast-box.error { background-color: rgba(244, 67, 54, 0.9); }

/**********
* installation button    *
***********/
.install-banner {
    position: fixed;
    bottom: 24px;
    top: auto;
    left: 50%;
    width: calc(100% - 32px);
    max-width: calc(var(--main-wrapper-max-width, 600px) - 32px);
    transform: translateX(-50%) translateY(140%);
    opacity: 0;
    pointer-events: none;
    right: auto;
    z-index: 9999;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 16px;
    box-sizing: border-box;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.install-banner.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.install-banner.hide {
    transform: translateX(-50%) translateY(140%);
    opacity: 0;
    pointer-events: none;
}

.install-banner-content {
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.install-banner-text {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.install-banner-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 6px;
}

.install-banner-message {
    flex: 1;
    text-align: left;
}

.install-banner-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.install-banner-subtitle {
    font-size: 13px;
    opacity: 0.9;
}

.install-banner-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

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

.close-banner-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.close-banner-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* 펄스 효과 */
.install-banner.pulse .install-btn {
    animation: buttonPulse 2s ease-in-out;
}

@keyframes buttonPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .install-banner {
        padding: 12px 16px;
    }

    .install-banner-content {
        flex-wrap: wrap;
    }

    .install-banner-actions {
        width: 100%;
        margin-top: 8px;
    }

    .install-btn {
        flex: 1;
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* ==========================================================================
   Advertising Content (conAd) & Ad Settings Modal Styles (Apple Style)
   ========================================================================== */

/* Each Ad Container */
.eachContentAdContainer {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    margin: 8px 0;
}

/* Edit Mode Ad Placeholder (Apple Parchment Tile Style) */
.eachContentAdPlaceholder {
    width: 100%;
    min-height: 100px;
    padding: 16px 20px;
    background-color: #f5f5f7; /* Parchment canvas */
    border: 1px dashed #d2d2d7;
    border-radius: 18px; /* rounded.lg */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.eachContentAdPlaceholder:hover {
    background-color: #e8e8ed;
    border-color: #0066cc; /* Action Blue */
}

.adPlaceholderIcon {
    color: #0066cc;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 광고 콘텐트 제목 영역 (편집모드 카드 내, 길 경우 좌우 스크롤 지원) */
.adPlaceholderContentName {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    text-align: center;
    margin-bottom: 4px;
    padding: 2px 8px;
    box-sizing: border-box;
    /* Apple 톤에 맞춘 세련되고 얇은 커스텀 스크롤바 */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.adPlaceholderContentName::-webkit-scrollbar {
    height: 4px;
}

.adPlaceholderContentName::-webkit-scrollbar-track {
    background: transparent;
}

.adPlaceholderContentName::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.adPlaceholderContentNameText {
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f; /* Near-black ink */
    display: inline-block;
}

.adPlaceholderTitle {
    font-size: 13px;
    font-weight: 500;
    color: #515154;
    margin-bottom: 2px;
}

.adPlaceholderSub {
    font-size: 12px;
    color: #7a7a7a;
}

/* User View Mode Real Ad Containers */
.eachContentAdView {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.kakaoAdFitContainer,
.googleAdSenseContainer,
.customAdContainer {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Ad Settings Popup Modal (Apple Frosted / Parchment Modal) */
.ad-settings-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.ad-settings-popup-content {
    background: #ffffff;
    width: 90%;
    max-width: 440px;
    border-radius: 18px; /* rounded.lg */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    padding: 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    animation: adModalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes adModalSlideUp {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ad-settings-popup-header {
    margin-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 12px;
}

.ad-settings-popup-title {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
}

.ad-settings-popup-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.ad-settings-popup-label {
    font-size: 13px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 4px;
    display: block;
}

.ad-settings-popup-select,
.ad-settings-popup-input,
.ad-settings-popup-textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #d2d2d7;
    border-radius: 10px;
    background-color: #fafafc;
    color: #1d1d1f;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ad-settings-popup-select:focus,
.ad-settings-popup-input:focus,
.ad-settings-popup-textarea:focus {
    border-color: #0066cc;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

.ad-settings-size-group {
    display: flex;
    gap: 12px;
}

.ad-settings-size-group > div {
    flex: 1;
}

.ad-settings-popup-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.ad-settings-popup-button {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 9999px; /* rounded.pill */
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.2s ease;
    border: none;
}

.ad-settings-popup-button:active {
    transform: scale(0.95);
}

.ad-settings-popup-button.cancel {
    background-color: #f5f5f7;
    color: #1d1d1f;
    border: 1px solid #e0e0e0;
}

.ad-settings-popup-button.confirm {
    background-color: #0066cc; /* Action Blue */
    color: #ffffff;
}

.ad-settings-popup-button.confirm:hover {
    background-color: #0055b3;
}

/* Content Type Selector Modal & Overlay (Apple Style) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: modalOverlayFadeIn 0.2s ease-out;
}

@keyframes modalOverlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.content-type-selector-modal {
    background: #ffffff;
    width: 90%;
    max-width: 480px;
    border-radius: 20px; /* rounded.lg */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    padding: 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.content-type-selector-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.content-type-selector-modal .modal-title {
    font-size: 19px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
    letter-spacing: -0.3px;
}

.content-type-selector-modal .modal-close-btn {
    background: #f5f5f7;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6e6e73;
    transition: all 0.2s ease;
    padding: 0;
}

.content-type-selector-modal .modal-close-btn:hover {
    background: #e8e8ed;
    color: #1d1d1f;
}

.content-type-selector-modal .modal-close-btn:active {
    transform: scale(0.92);
}

.content-type-selector-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    padding: 0 !important;
}

.content-type-card {
    display: flex !important;
    align-items: center !important;
    padding: 20px !important;
    margin-bottom: 16px !important;
    border-radius: 14px !important;
    border: 1px solid #e0e0e0 !important;
    background-color: #fafafc !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    text-align: left !important;
    box-sizing: border-box !important;
}

.content-type-card:last-child {
    margin-bottom: 0 !important;
}

.content-type-card:hover {
    border-color: #0066cc;
    background-color: #ffffff;
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.12);
    transform: translateY(-2px);
}

.content-type-card:active {
    transform: scale(0.98);
}

.content-type-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 18px;
    flex-shrink: 0;
}

.content-type-icon-wrapper.icon-blank {
    background-color: rgba(0, 102, 204, 0.08);
    color: #0066cc;
}

.content-type-icon-wrapper.icon-market {
    background-color: rgba(41, 151, 255, 0.08);
    color: #2997ff;
}

.content-type-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.content-type-title {
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 4px;
    line-height: 1.3;
}

.content-type-desc {
    font-size: 13px;
    color: #7a7a7a;
    line-height: 1.45;
}