@charset "UTF-8";

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #141414;
    color: #e5e5e5;
    font-family:
        Arial,
        "Noto Sans KR",
        sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.main {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
    padding: 30px 0 70px;
}

.content-age-rating-badge {
    display: inline-flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    color: #ffffff;
    font-size: 8.5px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.2);
}

.content-age-rating-badge.is-all {
    width: 28px;
    border-radius: 999px;
    background: #2f855a;
    font-size: 7px;
}

.content-age-rating-badge.is-age7 {
    background: #3478b9;
}

.content-age-rating-badge.is-age12 {
    background: #b88416;
}

.content-age-rating-badge.is-age15 {
    background: #ce6428;
}

.content-age-rating-badge.is-adult {
    background: #c53f45;
}

.content-age-rating-badge.is-unknown {
    background: #555c66;
}

/* ================= HERO ================= */

.hero {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 56px;
}

.hero-left {
    width: 60%;
    padding-top: 8px;
}

.hero-sub {
    color: #999999;
    font-size: 13px;
}

.hero-title {
    margin: 14px 0 12px;
    font-size: 42px;
    line-height: 1.35;
}

.hero-desc {
    margin: 0;
    color: #bbbbbb;
    font-size: 14px;
    line-height: 1.7;
}

.hero-right {
    display: flex;
    width: 40%;
    gap: 10px;
}

.hero-box {
    width: 100%;
    min-height: 210px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    background: #1c1c1c;
}

.box-title {
    margin-bottom: 14px;
    font-size: 15px;
    font-weight: 700;
}

.box-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.box-item {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    padding: 8px 9px;
    border-radius: 7px;
    background: #232323;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.box-item:hover {
    background: #303030;
    transform: translateX(3px);
}

.box-rank {
    display: flex;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

/* [수정] 1~3위 순위 배지를 금/은/동 색으로 강조 (데스크톱 포함 전 구간 공통) */
.box-item:nth-child(1) .box-rank {
    background: #f4cf58;
    color: #1c1c1c;
}

.box-item:nth-child(2) .box-rank {
    background: #cfd4da;
    color: #1c1c1c;
}

.box-item:nth-child(3) .box-rank {
    background: #d29a63;
    color: #1c1c1c;
}

.box-name {
    overflow: hidden;
    flex: 1;
    color: #d5d5d5;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.box-score {
    flex-shrink: 0;
    color: #f4cf58;
    font-size: 12px;
}

.box-empty {
    padding: 20px 0;
    color: #888888;
    font-size: 13px;
}

/* ================= RANKING ================= */

.ranking-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.ranking-filter button {
    padding: 4px 8px;
    border: 1px solid #3a3a3a;
    background: #2a2a2a;
    color: #aaaaaa;
    font-size: 11px;
    cursor: pointer;
}

.ranking-filter button:hover,
.ranking-filter .active {
    color: #ffffff;
    background: #353535;
}

.ott-select {
    padding: 4px 8px;
    border: 1px solid #333333;
    background: #1c1c1c;
    color: #dddddd;
    font-size: 11px;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ranking-item {
    display: flex;
    align-items: center;
    font-size: 12px;
}

.rank {
    width: 20px;
    flex-shrink: 0;
    color: #ffffff;
}

.name {
    overflow: hidden;
    flex: 1;
    color: #bbbbbb;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ================= SECTION ================= */

.slider-section {
    margin-bottom: 52px;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.section-title {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
}

.section-description {
    margin: 6px 0 0;
    color: #8f8f8f;
    font-size: 12px;
}

.section-more {
    flex-shrink: 0;
    color: #9f9f9f;
    font-size: 13px;
    transition: color 0.2s ease;
}

.section-more:hover {
    color: #ffffff;
}

/* ================= SLIDER ================= */

.slider {
    display: flex;
    align-items: center;
    gap: 12px;
}

.track {
    display: flex;
    flex: 1;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.track::-webkit-scrollbar {
    display: none;
}

.slider-btn {
    width: 38px;
    height: 54px;
    flex-shrink: 0;
    border: 0;
    border-radius: 8px;
    background: #222222;
    color: #aaaaaa;
    font-size: 28px;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.slider-btn:hover {
    background: #343434;
    color: #ffffff;
}

/* 이전 JSP 버튼 클래스 호환 */
.btn {
    width: 38px;
    height: 54px;
    flex-shrink: 0;
    border: 0;
    border-radius: 8px;
    background: #222222;
    color: #aaaaaa;
    font-size: 28px;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.btn:hover {
    background: #343434;
    color: #ffffff;
}

/* ================= CARD ================= */

.card {
    display: block;
    width: 172px;
    min-width: 172px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 10px;
    background: #1c1c1c;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.38);
}

.thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #2a2a2a;
}

.thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .thumb img {
    transform: scale(1.04);
}

.no-img {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: #777777;
    font-size: 12px;
}

.content-type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 7px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.72);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
}

.content-age-rating {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
}

.card-info {
    min-height: 91px;
    padding: 11px 12px 13px;
}

.card-title {
    overflow: hidden;
    margin: 0;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-meta {
    display: flex;
    min-height: 16px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    color: #8f8f8f;
    font-size: 11px;
}

.card-score {
    flex-shrink: 0;
    color: #f4cf58;
}

/* ================= CARD OTT PLATFORM ================= */

.card-platform-list {
    display: flex;
    min-height: 19px;
    align-items: center;
    gap: 4px;
    margin-top: 9px;
}

.card-platform-logo {
    display: block !important;

    width: 18px !important;
    height: 18px !important;

    min-width: 18px !important;
    max-width: 18px !important;

    min-height: 18px !important;
    max-height: 18px !important;

    flex: 0 0 18px !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 4px;

    background: #ffffff;

    object-fit: cover !important;
    object-position: center;
}

.card-platform-more {
    display: inline-flex;
    min-width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    background: #282828;
    color: #bdbdbd;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
}

.slider-empty {
    display: flex;
    min-height: 290px;
    flex: 1;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #1c1c1c;
    /* [수정] #777777 on #1c1c1c는 대비 약 3.8:1로 부족해 더 밝게 교체 */
    color: #858585;
    font-size: 14px;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 900px) {

    .hero {
        flex-direction: column;
    }

    .hero-left,
    .hero-right {
        width: 100%;
    }

    .hero-title {
        font-size: 36px;
    }

    /* [수정] 모바일: 인기 콘텐츠 박스를 세로 리스트 대신
       가로 스크롤 칩 형태로 압축해 텍스트 아래에 가볍게 배치 */
    .hero-right {
        margin-top: 18px;
    }

    .hero-box {
        min-height: 0;
        padding: 12px 14px 14px;
    }

    .box-title {
        margin-bottom: 10px;
        font-size: 13px;
    }

    .box-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .box-item {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
        gap: 6px;
        padding: 6px 10px;
    }

    .box-item:hover {
        transform: none;
    }

    .box-rank {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }

    .box-name {
        font-size: 11px;
    }

    .box-score {
        font-size: 10px;
    }
}

@media (max-width: 768px) {

    .hero-box {
        min-height: 170px;
    }

    .card {
        width: 138px;
        min-width: 138px;
    }

}

@media (max-width: 600px) {

    .main {
        width: min(100% - 24px, 1200px);
        padding-top: 24px;
    }

    /* [수정] 모바일: hero-left/hero-right를 세로 스택이 아닌
       좌우 배치로 전환하고, 텍스트 크기를 줄여 랭킹 박스가
       바로 옆에 나란히 보이도록 조정 */
    /* [수정] 텍스트 아래 여백이 허전해 보여 랭킹박스 세로 중앙에
       맞춰 내려오도록 align-items를 center로 변경 */
    .hero {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        margin-bottom: 42px;
    }

    .hero-left {
        width: 56%;
        padding-top: 0;
    }

    .hero-right {
        width: 44%;
        margin-top: 0;
    }

    .hero-sub {
        font-size: 11px;
    }

    .hero-title {
        margin: 8px 0 8px;
        font-size: 20px;
        line-height: 1.3;
    }

    .hero-desc {
        font-size: 11px;
        line-height: 1.5;
    }

    .hero-box {
        min-height: 0;
        padding: 12px 11px 13px;
    }

    .box-title {
        margin-bottom: 10px;
        font-size: 11px;
        letter-spacing: 0.2px;
    }

    /* 좁은 폭에서는 2열 칩 대신 세로 리스트로 복귀,
       항목 사이 간격을 넉넉히 줘서 답답해 보이지 않도록 조정 */
    .box-list {
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 7px;
    }

    .box-item {
        flex: none;
        gap: 7px;
        padding: 6px 8px;
        border-radius: 8px;
    }

    /* 순위 배지 크기만 모바일에 맞게 축소 (색상은 공통 기본 스타일 사용) */
    .box-rank {
        width: 17px;
        height: 17px;
        font-size: 9px;
    }

    .box-name {
        margin-right: 2px;
        font-size: 10.5px;
    }

    /* 평점 자리를 고정 폭으로 맞춰 세로 정렬이 들쭉날쭉해 보이지 않도록 */
    .box-score {
        min-width: 30px;
        font-size: 9.5px;
        text-align: right;
        letter-spacing: -0.2px;
    }

    .section-header {
        align-items: flex-start;
    }

    .section-title {
        font-size: 20px;
    }

    .card {
        width: 118px;
        min-width: 118px;
    }

    .slider {
        gap: 8px;
    }

    .slider-btn,
    .btn {
        width: 32px;
    }

    .card-info {
        min-height: 0;
        padding: 8px 9px 10px;
    }

    .card-title {
        font-size: 12px;
    }

    .card-meta {
        min-height: 0;
        margin-top: 5px;
        font-size: 10px;
    }

    .card-platform-list {
        min-height: 0;
        margin-top: 6px;
    }

    .card-platform-logo {
        width: 17px !important;
        height: 17px !important;

        min-width: 17px !important;
        max-width: 17px !important;

        min-height: 17px !important;
        max-height: 17px !important;

        flex-basis: 17px !important;
    }

    .card-platform-more {
        height: 17px;
        font-size: 8px;
    }
}

@media (max-width: 400px) {

    .card {
        width: 104px;
        min-width: 104px;
    }

    .card-title {
        font-size: 11px;
    }
}