/* coupairpage_up — list */

/* ===== 상단 컨트롤 ===== */
.cpage-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.cpage-controls-left,
.cpage-controls-right { display: flex; align-items: center; gap: 10px; }

.cpage-category select {
    padding: 7px 12px;
    border: 1px solid var(--form-border-color, #e0e0e0);
    border-radius: 4px;
    font-size: 14px;
    background: var(--card-bg-color, #fff);
}

.cpage-list-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--form-border-color, #e0e0e0);
    background: var(--card-bg-color, #fff);
    color: var(--content-font-color, #333);
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.cpage-list-btn:hover,
.cpage-list-btn.cpage-editing {
    background: var(--primary-color, #5b6af5);
    border-color: var(--primary-color, #5b6af5);
    color: #fff;
}

/* ===== 그리드 ===== */
.cpage-list {
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), 1fr);
    gap: 20px;
}
.cpage-list-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500, #888);
    font-size: 14px;
}

/* ===== 카드 ===== */
.cpage-card {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    border-radius: 10px;
    text-decoration: none;
    transition: transform .25s, box-shadow .25s;
    background-size: cover;
    background-position: center 40%;
    background-repeat: no-repeat;
    position: relative;
    min-height: 200px;
    overflow: visible;
}

/* 라이트 테마 */
.cpage-card.theme-light {
    background-color: var(--card-bg-color, #fff);
    border: 1px solid var(--form-border-color, #e0e0e0);
    color: #1f2937;
}
.cpage-card.theme-light[style*="background-image"]::before {
    content: '';
    position: absolute; inset: 0;
    border-radius: inherit; z-index: 0;
}
.cpage-card.theme-light:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }

/* 다크 테마 */
.cpage-card.theme-dark {
    background-color: #1a1a1a;
    border: 1px solid #2e2e2e;
    color: #eeeeee;
}
.cpage-card.theme-dark[style*="background-image"]::before {
    content: '';
    position: absolute; inset: 0;
    border-radius: inherit; z-index: 0;
}
.cpage-card.theme-dark:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.35); }

/* 카드 내 요소들은 오버레이 위에 */
.cpage-card > * { position: relative; z-index: 1; }



/* ===== 카드 헤더 (페어명) ===== */
.cpage-card-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: auto;
    min-height: 28px;
}
.cpage-card-title {
    color: #333;
    font-size: 30px;
    font-weight: 600;
    white-space: nowrap;
    text-shadow: 0 0 2px var(--white), 0 0 10px var(--gray-100);
}

/* ===== SD 이미지 (하단 캐릭터, 카드 아래로 약간 돌출) ===== */
.cpage-card-sd-imgs {
    display: flex;
    position: absolute;
    bottom: -15px;
    left: 10px;
    right: 10px;
    gap: 3px;
    justify-content: flex-end;
    align-items: flex-end;
    filter: drop-shadow(5px 1px 1px rgba(0,0,0,.5));
    z-index: 11;
    pointer-events: none;
}
.cpage-card-sd-thumb {
    transition: transform .2s ease;
    position: relative;
    transform-origin: center bottom;
    pointer-events: auto;
    padding: 10px;
    margin: -10px;
}
.cpage-card-sd-thumb img {
    max-height: 100px;
    display: block;
}
.cpage-card-sd-thumb:hover {
    animation: cpage-kong-jump .4s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
    animation-iteration-count: 1;
}
@keyframes cpage-kong-jump {
    0%   { transform: translateY(0) scale(1); }
    30%  { transform: translateY(-15px) scale(1.05); }
    50%  { transform: translateY(-18px) scale(1.05); }
    80%  { transform: translateY(-5px) scale(.98); }
    100% { transform: translateY(0) scale(1); }
}

/* ===== 드래그 편집 모드 ===== */
.cpage-list.cpage-editing .cpage-card {
    cursor: grab;
    animation: cpage-shake .3s ease-in-out infinite alternate;
}
.cpage-list.cpage-editing .cpage-card:active { cursor: grabbing; }
@keyframes cpage-shake {
    0%   { transform: rotate(-.5deg); }
    100% { transform: rotate(.5deg);  }
}
.cpage-list.cpage-editing .cpage-card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.cpage-list .sortable-placeholder {
    background: var(--primary-color, #5b6af5);
    opacity: .18;
    border: 2px dashed var(--primary-color, #5b6af5);
    border-radius: 10px;
    min-height: 200px;
}

/* ===== 페이지네이션 ===== */
.cpage-pagination { margin-top: 32px; text-align: center; }

/* ===== 반응형 ===== */
@media (max-width: 1024px) {
    .cpage-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .cpage-controls { flex-direction: column; gap: 10px; }
    .cpage-list     { grid-template-columns: 1fr; }
    .cpage-sort-btn  { display: none !important; }
    .cpage-write-btn { display: none !important; }
    .cpage-card     { padding: 16px; }
    .cpage-card-avatar { width: 52px; height: 52px; }
}


/* ========================================================
   pair3 헤더 / 푸터 스타일 (이식)
   ======================================================== */


.list-header {
    width: 100%;
    height: 170px;
    position: relative;
}

.list-content {
    width: 100%;
    height: 565px;
    box-sizing: border-box;
    justify-content: center;
}

.list-footer {
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
}

/* 리스트 헤더 - 버튼 */

.star-button-group {
    position: absolute;
    top: 15px;
    right: 20px;
    display: flex;
    flex-direction: row;
    gap: 25px;
    z-index: 99;
}

.star-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

.star-shape {
    width: 30px;
    height: 40px;
    background-color: var(--primary-color);
    clip-path: polygon(
        50% 0%, 
        62% 35%, 100% 50%, 62% 65%, 
        50% 100%, 
        38% 65%, 0% 50%, 38% 35%
    );
    transition: background-color 0.3s ease;
}

.star-text {
    font-family: 'NexonLv1Gothic';
    font-size: 9px;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 6px;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.star-btn:hover .star-shape {
    background-color: var(--secondary-color);
}

.star-btn:hover .star-text {
    color: var(--secondary-color);
}

.star-btn:active {
    transform: translateY(1px);
}

.star-btn.disabled {
    cursor: default;
    pointer-events: none;
}


/* 리스트 헤더 - 타이틀 */

.title-main {
    font-family: 'PuradakGentleGothic';
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.title-sub {
    font-family: var(--content-font-family);
    font-size: 14px;
    color: var(--content-font-color);
    line-height: 1.4;
    margin-bottom: 20px;
    padding-top: 3px;
}


/* ── 헤더: 검색창 ── */

#bo_sch {
    position: absolute;
    bottom: 30px;
    right: 20px;
    border: 0;
    padding: 0;
    margin: 0;
    z-index: 10;
}

#bo_sch form {
    margin: 0 !important;
    display: block !important;
}

.search-box-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 250px;
    height: 32px;
    border: 1.5px solid var(--primary-color);
    border-radius: 8px;
    background-color: #fff;
    padding: 0 10px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.search-box-wrapper:hover,
.search-box-wrapper:focus-within {
    border-color: var(--primary-color);
}

.search-box-wrapper .sch_input {
    flex: 1 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    background: transparent !important;
    padding: 0 8px 0 2px !important;
    margin: 0 !important;
    font-family: var(--content-font-family);
    font-size: 12px;
    color: var(--primary-color);
    outline: none !important;
}

.search-box-wrapper .sch_input::placeholder {
    color: var(--secondary-color);
    font-size: 13px;
}

.search-box-wrapper .sch_btn {
    flex-shrink: 0;
    width: 24px;
    height: 100%;
    border: none !important;
    background: transparent !important;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    margin: 0 !important;
    transition: color 0.2s ease;
}

.search-box-wrapper .sch_btn:hover {
    color: var(--primary-color);
}

.search-box-wrapper .sch_btn i {
    font-size: 13px;
}

#bo_w {
    width: 1170px;
    height: 800px;
    position: absolute;
    top: calc(50% - 400px);
    left: calc(50% - 420px);
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#bo_w::-webkit-scrollbar { display: none; }

/* 리스트 푸터 - 페이지네이션 */

.pg_wrap_box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    width: 100%;
    box-sizing: border-box;
}

.pg_group {
    display: flex;
    gap: 15px;
}

.pg_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.pg_btn:hover {
    opacity: 0.7;
}

.triangle {
    width: 0;
    height: 0;
    display: inline-block;
}

.triangle.left {
    border-right: 10px solid var(--primary-color);
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
}

.triangle.right {
    border-left: 10px solid var(--primary-color);
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
}

.bar {
    width: 2px;
    height: 14px;
    background-color: var(--primary-color);
    display: inline-block;
}

.pg_btn.first .bar { margin-right: 2px; }
.pg_btn.last .bar { margin-left: 2px; }

/* sortable 편집 모드 */
#cpage-sortable.sortable-editing .cpage-card {
    cursor: grab;
}
#cpage-sortable.sortable-editing .cpage-card:active {
    cursor: grabbing;
    opacity: 0.7;
}
.sortable-placeholder {
    border: 2px dashed var(--primary-color, #888);
    border-radius: 8px;
    background: transparent;
}

/* ── bo_list 레이아웃 ── */
#bo_list {
    width: 1170px;
    height: 800px;
    position: absolute;
    top: calc(50% - 400px);
    left: calc(50% - 420px);
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    padding: 10px;
}

#bo_list::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}
