/* 기본 스타일링 */

body {
    margin: 0;
    font-family: 'Pretendard', sans-serif;
    background-color: #000;
}

.main-container {
    max-width: 1920px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    box-sizing: border-box;
}

/* 헤더 스타일링 */
/* 헤더 스타일링 */
.header {
    width: 100%;
    height: 90px;
    position: relative; /* absolute에서 relative로 변경 */
    background: black;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 53px;
    z-index: 1000;
    box-sizing: border-box; /* 패딩 포함 계산 */
}

.logo-container {
    width: 186px;
    height: 90px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* 로고가 줄어들지 않도록 */
}

.logo {
    width: 203.06px;
    height: 67.26px;
    margin-left: -17.06px;
    margin-top: 5px; /* 11.37px에서 5px로 줄여서 더 위로 */
    max-width: 100%;
    height: auto;
}

.nav-menu {
    display: flex;
    gap: 50px;
    margin-left: -300px; /* -500px에서 -300px로 수정 */
    flex: 1;
    justify-content: center;
    max-width: 800px; /* 최대 폭 제한 */
    overflow: hidden; /* 넘치는 부분 숨김 */
}

.nav-item {
    text-decoration: none;
    color: #c7c7c7;
    font-size: 18px;
    font-weight: 400;
    line-height: 19.43px;
    text-align: center;
    transition: color 0.3s ease;
    white-space: nowrap; /* 텍스트 줄바꿈 방지 */
}

.nav-item:hover {
    color: white;
}

.auth-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0; /* 버튼들이 줄어들지 않도록 */
}

.signup-btn {
    width: 83.95px;
    height: 35.09px;
    background: #fe153c;
    border: none;
    border-radius: 3px;
    color: white;
    font-size: 16.9px;
    font-weight: 400;
    line-height: 19.43px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.signup-btn:hover {
    background: #e01236;
}

.login-btn {
    width: 65.14px;
    height: 35.09px;
    background: #3b3b3b;
    border: none;
    border-radius: 3px;
    color: #d8d8d8;
    font-size: 16.9px;
    font-weight: 400;
    line-height: 19.43px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-btn:hover {
    background: #4b4b4b;
}

/* 햄버거 버튼 스타일 */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 3px;
    margin-left: 10px;
    position: relative;
    z-index: 999;
}

.hamburger-line {
    width: 100%;
    height: 2px; /* 균일한 두께 */
    background: white;
    border-radius: 1px;
    transition: all 0.3s ease;
    display: block;
    box-sizing: border-box; /* 정확한 크기 계산 */
}

/* 각 라인별 동일한 스타일 보장 */
.hamburger-line:nth-child(1),
.hamburger-line:nth-child(2),
.hamburger-line:nth-child(3) {
    height: 2px;
    background: white;
}

/* 모바일 메뉴 오버레이 */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 모바일 메뉴 */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background: #1a1a1a;
    z-index: 1999;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 20px;
    border-bottom: 1px solid #333;
}

.mobile-menu-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    transition: color 0.3s ease;
}

.mobile-menu-close:hover {
    color: #fe153c;
}

.mobile-menu-items {
    padding: 30px 0;
}

.mobile-nav-item {
    display: block;
    padding: 15px 30px;
    color: #c7c7c7;
    text-decoration: none;
    font-size: 18px;
    font-weight: 400;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-item:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
    padding-left: 40px;
}

/* 히어로 섹션 스타일링 */
.hero-section {
    width: 100%;
    height: 687px;
    position: relative;
    background: black;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0 50px;
    max-width: 1820px;
    margin: 0 auto;
}

.hero-bg {
    position: absolute;
    top: -200px;
    left: 0;
    width: 100%;
    height: 120%;
    filter: blur(50px);
    opacity: 0.5;
    z-index: 1;
}

.hero-gradient-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 375px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, black 100%);
    z-index: 2;
}

.hero-left-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 300px;
    height: 100%;
    background: linear-gradient(to right, black, transparent);
    z-index: 2;
}

.hero-right-gradient {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: linear-gradient(to left, black, transparent);
    z-index: 2;
}

.hero-content {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 3;
    gap: 100px;
}

.hero-left {
    flex: 1;
    max-width: 700px;
}

.hero-right {
    flex-shrink: 0;
}

.poster-container {

    width: 330px;
    height: 490px;
    background: rgb(0, 0, 0);
    overflow: hidden;
    border-radius: 15.42px;
    position: relative;
}

.poster-image {
    width: 355.14px;
    height: 533.34px;
    position: absolute;
    top: 0;
    left: -14.5px;
}

.title-image {
    width: 100%;
    max-width: 448.62px;
    height: auto;
    margin-bottom: 20px;
}

.tags-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
}

.rating-tag {
    width: 30px;
    height: 30px;
    background: rgb(0, 0, 0);
    overflow: hidden;
    border-radius: 3px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rating-icon {
    width: 33.54px;
    height: 33.54px;
    position: absolute;
    top: -1.15px;
    left: -0.78px;
}

.tag {
    height: 30px;
    padding: 0 10px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    font-weight: 400;
    line-height: 30px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.buttons-container {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

.preview-btn {
    width: 320px;
    height: 60px;
    background: white;
    border: none;
    border-radius: 6px;
    color: black;
    font-size: 18px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.preview-btn::before {
    content: '▶';
    font-size: 16px;
}

.preview-btn:hover {
    background: #f0f0f0;
}

.action-buttons {
    display: flex;
    gap: 30px;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.action-icon {
    width: 35px;
    height: 35px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wishlist-icon::before {
    content: '+';
    font-size: 24px;
    color: white;
    font-weight: 300;
}

.action-label {
    color: white;
    font-size: 14px;
    font-weight: 400;
    text-align: center;
}

.drama-info {
    color: rgba(255, 255, 255, 0.8);
}

.info-row {
    display: flex;
    gap: 20px;
    margin-bottom: 8px;
}

.info-label {
    font-size: 16px;
    font-weight: 600;
    min-width: 80px;
}

.info-value {
    font-size: 16px;
    font-weight: 400;
}

.description {
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.7);
}

/* 섹션 공통 스타일 */
.section {
    max-width: 1820px;
    margin: 0 auto;
    padding: 60px 50px;
    background-color: #000;
}

.section-title {
    color: white;
    font-size: 24px;
    font-weight: 700;
    line-height: 26px;
    margin-bottom: 35px;
}

.section-divider {
    width: 100%;
    height: 1px;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    margin: 0 auto;
    max-width: 1820px;
}

/* 배우 프로필 섹션 */
.actors-section {
    max-width: 1820px;
    margin: 0 auto;
    overflow: hidden;
    padding-top: 50px;
}

.actors-grid {
    display: flex;
    gap: 30px;
    overflow-x: scroll;
    overflow-y: hidden;
    padding-bottom: 20px;
    margin-bottom: -20px;
}

.actor-card {
    width: 300px;
    height: 430px;
    position: relative;
    background: rgb(0, 0, 0);
    overflow: hidden;
    border-radius: 20px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.actor-card img{
    width: 100%;
    position: relative;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.actor-card:hover {
    transform: scale(1.05);
}



.actor-gradient {
    width: 100%;
    height: 152.81px;
    position: absolute;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%);
}

.actor-name {
    position: absolute;
    bottom: 10px;
    left: 24.82px;
    color: white;
    font-size: 20.95px;
    font-weight: 500;
    line-height: 22.7px;
}

/* 에피소드 섹션 */
.episodes-section{
    margin: 0 auto;
    max-width: 1820px;
    margin-bottom: 40px;
    overflow: hidden;
}

.episodes-header {

    margin-top: 50px;
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 5px;
}

.episodes-count {
    color: #838383;
    font-size: 18px;
    font-weight: 400;
    line-height: 26px;
}

.episodes-grid {
    display: flex;
    gap: 30px;
    overflow-x: scroll;
    overflow-y: hidden;
    margin-bottom: -20px;
    padding-bottom: 20px;
}

.episode-card {

    width: 300px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: opacity 0.3s ease;
}

.episode-card:hover {
    opacity: 0.8;
}

.episode-thumbnail {
    width: 100%;
    overflow: hidden;
    height: 430px;
    position: relative;
    background: black;
    border-radius: 10px;
    margin-bottom: 18.72px;
}

.episode-image {
    border-radius: 2%;
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    top: 0;
    left: 0;
}

.progress-bar {
    width: 80%;
    height: 7.89px;
    position: absolute;
    bottom: 31px;
    left: 50%;
    transform: translateX(-50%);
    background: #2f2f2f;
    border-radius: 3.94px;
    overflow: hidden;
}

.progress-fill {
    width: 80%;
    height: 100%;
    background: #ff1b23;
    border-radius: 5.26px;
}

.play-button {
    width: 57.91px;
    height: 57.91px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
}

.episode-info {
    height: auto;
    min-height: 107px;
}

.episode-title {
    color: white;
    font-size: 20px;
    font-weight: 600;
    line-height: 25.55px;
    margin-bottom: 9.22px;
}

.episode-description {
    color: #8c8c8c;
    font-size: 18px;
    font-weight: 400;
    line-height: 25.55px;
}

/* 관련 상품 섹션 */
.products-section{
    margin: 0 auto;
    max-width: 1820px;  
    margin-bottom: 40px; 
    overflow: hidden;
}
.section-title{

    margin-bottom: 40px;
}

.products-grid {
    display: flex;
    gap: 30px;
    overflow-x: scroll;
    overflow-y: hidden;
    padding-bottom: 20px;
    margin-bottom: -20px;
}

.product-card {
    width: 320px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
}

.product-thumbnail {
    width: 100%;
    height: 320px;
    position: relative;
    background: white;
    border-radius: 10px;
    margin-bottom: 20.72px;
}

.product-image {
    width: 100%;
    height: 120%;
    object-fit: cover;
    position: absolute;
    top: -10%;
    left: 0;
}

.product-info {
    height: auto;
    min-height: 107px;
}

.product-title {

    color: white;
    font-size: 20px;
    font-weight: 600;
    line-height: 25.55px;
    margin-bottom: 27.78px;
}

.product-price {
    color: #8c8c8c;
    font-size: 18px;
    font-weight: 400;
    line-height: 25.55px;
}

/* 관련 콘텐츠 섹션 */
.related-content-section{
    margin: 0 auto;
    max-width: 1820px;
    margin-bottom: 80px;
    overflow: hidden;
}

.related-content-grid {
    display: flex;
    gap: 20px;
    overflow-x: scroll;
    overflow-y: hidden;
    padding-bottom: 20px;
    margin-bottom: -20px;
}

.content-card {
    width: 220px;
    height: 320px;
    position: relative;
    background: rgb(0, 0, 0);
    border-radius: 10px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.content-card:hover {
    transform: scale(1.1);
}

.content-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}



/* 반응형 스타일링 */
@media (max-width: 1920px) {
    .main-container {
        width: 100%;
        max-width: 1920px;
        margin: 0 auto;
    }

    .hero-section {
        width: 100%;
    }

    .hero-bg {
        width: 100%;
    }

    .hero-gradient-overlay {
        width: 100%;
    }
}



/* 중간 크기 단계별 축소 - 더 촘촘하게 */

@media (max-width: 1400px) and (min-width: 1201px) {
    .nav-menu {
        gap: 40px;
        margin-left: 0; /* 음수값 제거 */
        max-width: 700px;
    }
    .nav-item {
        font-size: 17px;
    }
}

@media (max-width: 1200px) {
    /* 네비메뉴 조정 */
    .nav-menu {
        gap: 30px;
        margin-left: 0; /* 음수값 제거 */
        max-width: 600px;
    }
    .nav-item {
        font-size: 16px;
    }

}


/* 1000px 이하 - 햄버거 메뉴로 전환 */
@media (max-width: 1000px) {
    /* 헤더 조정 */
    .header {
        padding: 0 20px;
        flex-wrap: wrap;
    }

    /* 로고 컨테이너 조정 */
    .logo-container {
        width: auto;
        min-width: 120px;
    }

    .logo {
        width: 150px;
        height: auto;
        margin-left: 0;
        margin-top: 0;
    }

    /* 네비메뉴 숨기기 */
    .nav-menu {
        display: none;
    }

    /* auth-buttons 조정 */
    .auth-buttons {
        gap: 8px;
        flex-shrink: 0;
    }

    /* 버튼 크기 조정 */
    .signup-btn {
        width: 70px;
        height: 30px;
        font-size: 14px;
    }

    .login-btn {
        width: 55px;
        height: 30px;
        font-size: 14px;
    }

    /* 햄버거 버튼 보이기 */
    .hamburger-btn {
        display: flex !important;
        width: 25px;
        height: 18px;
        margin-left: 8px;
    }
}

/* 768px 이하 - 모바일 */
@media (max-width: 768px) {
    /* 헤더 조정 */
    .header {
        padding: 0 20px;
        flex-wrap: wrap;
    }

    /* 로고 컨테이너 조정 */
    .logo-container {
        width: auto;
        min-width: 120px;
    }

    .logo {
        width: 150px;
        height: auto;
        margin-left: 0;
        margin-top: 0; /* 모바일에서는 완전히 중앙 */
    }

    /* 네비메뉴 숨기기 */
    .nav-menu {
        display: none;
    }

    /* auth-buttons 조정 */
    .auth-buttons {
        gap: 8px;
        flex-shrink: 0;
    }

    /* 버튼 크기 모바일에 맞게 조정 */
    .signup-btn {
        width: 70px;
        height: 30px;
        font-size: 14px;
    }

    .login-btn {
        width: 55px;
        height: 30px;
        font-size: 14px;
    }

    /* 햄버거 버튼 보이기 */
    .hamburger-btn {
        display: flex !important;
        width: 25px;
        height: 18px;
        margin-left: 8px;
    }

}



/* 480px 이하 - 소형 모바일 */
@media (max-width: 480px) {
    .header {
        padding: 0 10px;
        height: 70px; /* 헤더 높이 조정 */
    }

    .logo-container {
        width: auto;
        min-width: 100px;
    }

    .logo {
        width: 120px;
        height: auto;
        margin-left: 0;
        margin-top: 0; /* 소형 모바일에서도 완전히 중앙 */
    }

    /* auth-buttons 더 작게 조정 */
    .auth-buttons {
        gap: 5px;
    }

    .signup-btn {
        width: 60px;
        height: 28px;
        font-size: 12px;
    }

    .login-btn {
        width: 50px;
        height: 28px;
        font-size: 12px;
    }

    .hamburger-btn {
        width: 22px;
        height: 16px;
        margin-left: 5px;
    }


}

/* 1400px 이하 */
@media (max-width: 1400px) and (min-width: 1201px) {

    .hero-section {
        padding: 0 30px;
    }
    
    .section {
        padding: 60px 30px;
    }
    
    .actor-card {
        width: 16vw;
        height: 22vw;
    }
    
    .episode-card {
        width: 16vw;
    }
    
    .episode-thumbnail {
        height: 22vw;
    }
}

/* 1200px 이하 - 태블릿 */
@media (max-width: 1200px) {

   
    
    .section {
        padding: 60px 20px;
    }
    
    .actor-card {
        width: 20vw;
        height: 28vw;
        max-width: 250px;
        max-height: 350px;
    }
 
    
    .episode-card {
        width: 20vw;
        max-width: 250px;
    }
    
    .episode-thumbnail {
        height: 28vw;
        max-height: 350px;
    }
    
    .product-card {
        width: 100%;
        height: auto;
        max-width: 280px;
    }
    
    .content-card {
        width: 18vw;
        max-width: 200px;
    }
}

/* 1000px 이하 - 햄버거 메뉴로 전환 */
@media (max-width: 1000px) {
    
    .section {
        padding: 40px 20px;
    }
    
    .hero-section {
        padding: 0 20px;
    }
    
    .hero-content {
        gap: 40px;
    }
    
    .actor-card {
        width: 25vw;
        height: 35vw;
        max-width: 200px;
        max-height: 280px;
    }
    
    .episode-card {
        width: 25vw;
        max-width: 200px;
    }
    
    .episode-thumbnail {
        height: 35vw;
        max-height: 280px;
    }
    
    .product-card {
        border-radius: 10px;
        height: 42vw;
        max-height: 380px;
        max-width: 220px;
    }
    
    .content-card {
        width: 25vw;
        height: 35vw;
        max-width: 200px;
        max-height: 280px;
    }
}

/* 768px 이하 - 모바일 */
@media (max-width: 768px) {

    
    .poster-container {
        width: 60vw;
        height: 80vw;
        max-width: 250px;
        max-height: 350px;
    }
    
    .section {
        padding: 40px 15px;
    }
    
    .preview-btn {
        width: 100%;
        max-width: 280px;
        height: 50px;
        font-size: 16px;
    }
    
    .tags-container {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .tag {
        font-size: 14px;
        height: 26px;
        line-height: 26px;
    }
    
    .action-buttons {
        gap: 20px;
    }
    
    .actor-card {
        width: 35vw;
        height: 50vw;
        max-width: 150px;
        max-height: 220px;
    }
    
    .episode-card {
        width: 35vw;
        max-width: 150px;
    }
    
    .episode-thumbnail {
        height: 50vw;
        max-height: 220px;
    }
    
    .product-card {
        width: 35vw;
        max-width: 160px;
    }
    
    .content-card {
        width: 35vw;
        height: auto;
        max-width: 120px;
        max-height: 180px;
    }
    
    .section-title {
        font-size: 20px;
        margin-bottom: 25px;
    }
    
    .episode-title,
    .product-title {
        font-size: 16px;
        line-height: 20px;
    }
    
    .episode-description {
        font-size: 14px;
        line-height: 18px;
    }
    
    .actor-name {
        font-size: 16px;
        bottom: 20px;
        left: 15px;
    }
}

/* 480px 이하 - 소형 모바일 */
@media (max-width: 480px) {
    
    .section {
        padding: 30px 10px;
    }
    
    .hero-section {
        padding: 15px 10px;
        min-height: 350px;
    }
    
    .section-title {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .poster-container {
        width: 70vw;
        height: 90vw;
        max-width: 200px;
        max-height: 280px;
    }
    
    .preview-btn {
        height: 45px;
        font-size: 14px;
    }
    
    .actor-card {
        width: 45vw;
        height: 60vw;
        max-width: 120px;
        max-height: 180px;
    }
    
    .episode-card {
        width: 45vw;
        max-width: 120px;
    }
    
    .episode-thumbnail {
        height: 60vw;
        max-height: 180px;
    }
    
    .product-card {
        width: 45vw;
        max-width: 130px;
    }
    
    .content-card {
        width: 40vw;
        max-width: 100px;
        height: 55vw;
        max-height: 150px;
    }
    
    .actor-name {
        font-size: 14px;
        bottom: 15px;
        left: 10px;
    }
    
    .episode-title,
    .product-title {
        font-size: 14px;
        line-height: 18px;
        margin-bottom: 8px;
    }
    
    .episode-description {
        font-size: 12px;
        line-height: 16px;
    }
    
    .product-price {
        font-size: 14px;
    }
    
    .tag {
        font-size: 12px;
        height: 22px;
        line-height: 22px;
        padding: 0 6px;
    }
    
    .rating-tag {
        width: 22px;
        height: 22px;
    }
}

/* 호버 효과 */
.actor-card:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.episode-card:hover {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
    transition: transform 0.3s ease;
}

.content-card:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}
