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: 83.95px;
    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;
}

.slider-container {
    position: relative;
    margin: 0px auto;
    max-width: 1820px;
    width: 100%;
    height: auto;
    min-height: 300px;
    overflow: hidden;
    border-radius: 20px;
}

.slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 20px; /* 이 줄 추가! */
}

.slide-logo {
    position: absolute;
    left: 2vw;
    bottom: 2vw;
    width: 33vw;
    max-width: 643px;
    height: 12vw;
    max-height: 240px;
}

.slide-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.indicators {
    position: absolute;
    bottom: 40px;
    right: 60px;
    display: flex;
    gap: 12px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    transition: background-color 0.3s;
}

.indicator.active {
    background-color: #ffffff;
}

.brand-section {
    padding: 3vw 0;
    width: 100%;
    max-width: 1820px;
    margin: 0 auto;
    overflow-x: auto;
    background-color: #000;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.brand-slider {
    display: flex;
    gap: 12px;
    width: max-content;
}

.brand-box {
    flex: 0 0 auto;
    width: 15vw;
    max-width: 290px;
    height: 5vw;
    max-height: 100px;
    background: linear-gradient(to bottom, #262626, #191919);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-box img {
    width: 10vw;
    max-width: 200px;
    height: 2.5vw;
    max-height: 50px;
    object-fit: contain;
}

.brand-slider:active {
    cursor: grabbing;
}

/* 스크롤바 숨기기 */
.brand-section::-webkit-scrollbar {
    display: none;
}

.brand-section {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.top10-section {
    background-color: #000;
    padding-top: 2vw;
    color: white;
    max-width: 1820px;
    margin: 0 auto;
}

.top10-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5vw;
}

.top10-list {
    padding-left: 1.5vw;
    display: flex;
    gap: 2vw;
    overflow-x: auto;
    padding-bottom: 1.5vw;
}

.top10-list::-webkit-scrollbar {
    display: none;
}

.top10-item {
    position: relative;
    width: 11vw;
    max-width: 220px;
    height: 16vw;
    max-height: 320px;
    flex: 0 0 auto;
}

.top10-rank {
    position: absolute;
    left: -30px; /* 랭킹 이미지 너비만큼 왼쪽 */
    bottom: 0;
    width: auto;
    height: 100px;
}

.top10-rank img {
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.442);
}

.top10-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.watching-section {
    max-width: 1820px;
    margin: 0 auto;
    padding: 2vw 0;
    background-color: #000;
    color: #fff;
}

.watching-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5vw;
}

.watching-list {
    display: flex;
    gap: 0.8vw;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.watching-card {
    width: 11vw;
    max-width: 220px;
    background-color: #373737;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.watching-thumb {
    width: 100%;
    height: 13vw;
    max-height: 280px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}

.watching-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    font-size: 0.9rem;
}

.watching-more {
    position: relative;
}

.watching-more-btn {
    background: none;
    color: white;
    font-size: 18px;
    border: none;
    cursor: pointer;
    z-index: 99;
}

.watching-popup {
    display: none;
    position: absolute;
    top: -50px;
    left: -100px; /* 왼쪽에 표시 */
    background: #272727;
    border-radius: 8px;
    font-size: 14px;
    padding: 10px 0;
    width: 100px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
    z-index: 99;
}

.watching-popup div {
    padding: 6px 12px;
    color: white;
    cursor: pointer;
    white-space: nowrap;
}

.watching-popup div:hover {
    background-color: #555;
}

.watching-more.show .watching-popup {
    display: block;
}

.watching-progressbar {
    position: absolute;
    bottom: 50px;
    left: 10px;
    right: 10px;
    height: 6px;
    background-color: #2f2f2f;
    border-radius: 20px;
    overflow: hidden;
}

.watching-progress-fill {
    height: 100%;
    background-color: #ff1b23;
    border-radius: 20px;
}

.thriller-section {
    max-width: 1820px;
    margin: 0 auto;
    padding-top: 2vw;
    background-color: #000;
    color: #fff;
}

.thriller-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5vw;
}

.thriller-slider {
    display: flex;
    gap: 1vw;
    overflow-x: auto;
    padding-bottom: 10px;
    cursor: grab;
}

.thriller-card {
    flex: 0 0 auto;
    width: 11vw;
    max-width: 220px;
    height: 17vw;
    max-height: 340px;
    border-radius: 10px;
    overflow: hidden;
}

.thriller-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.thriller-slider::-webkit-scrollbar {
    display: none;
}

.thriller-slider {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.banner-image {
    width: 100%;
    max-width: 1820px;
    margin: 2.5vw auto;
}

.banner-image img {
    width: 100%;
    border-radius: 10px;
}

/* 반응형 미디어 쿼리 - 정리된 버전 */

/* 더 세분화된 브레이크포인트 추가 */

/* 1400px 이하 */
@media (max-width: 1400px) and (min-width: 1201px) {
    .nav-menu {
        gap: 40px;
        margin-left: 0; /* 음수값 제거 */
        max-width: 700px;
    }
    .nav-item {
        font-size: 17px;
    }
}

/* 1200px 이하 - 태블릿 */
@media (max-width: 1200px) {
    /* 네비메뉴 조정 */
    .nav-menu {
        gap: 30px;
        margin-left: 0; /* 음수값 제거 */
        max-width: 600px;
    }
    .nav-item {
        font-size: 16px;
    }

    .slider-container {
        height: 50vw;
    }
    .slide-logo {
        width: 40vw;
        height: 15vw;
    }
    .brand-box {
        width: 20vw;
        height: 7vw;
    }
    .top10-item,
    .watching-card,
    .thriller-card {
        width: 16vw;
        height: 22vw;
    }

    .watching-thumb {
        width: 100%;
        height: auto;
        max-height: 280px;
        object-fit: cover;
        border-radius: 12px 12px 0 0;
    }

    .watching-card {
        position: relative;
        padding-bottom: 54px;
    }

    .watching-footer {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 10px;
    }
}

/* 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;
    }

    /* 슬라이더 조정 */
    .slider-container {
        height: 60vw;
    }
    .slide-logo {
        width: 60vw;
        height: 20vw;
    }

    /* 브랜드 박스 조정 */
    .brand-box {
        width: 30vw;
        height: 10vw;
    }

    /* 카드들 크기 조정 */
    .top10-item,
    .watching-card,
    .thriller-card {
        width: 25vw;
        height: 35vw;
    }

    .watching-thumb {
        width: 100%;
        height: auto;
        max-height: 280px;
        object-fit: cover;
        border-radius: 12px 12px 0 0;
    }

    .watching-card {
        position: relative;
        padding-bottom: 54px;
    }

    .watching-footer {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 10px;
    }
}

/* 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;
    }

    .slider-container {
        height: 45vw;
        min-height: 180px;
    }
    .slide-logo {
        width: 80vw;
        height: 25vw;
    }
    .brand-box {
        width: 60vw;
        height: 18vw;
    }
    .top10-item,
    .watching-card,
    .thriller-card {
        width: 45vw;
        height: 60vw;
    }

    .top10-title,
    .watching-title,
    .thriller-title {
        font-size: 1rem;
    }
}
