/* ===== 메인 페이지 스타일 ===== */

/* 히어로 배너 */
.hero-billboard {
    position: relative;
    width: 100%;
    height: 80vh;
    min-height: 500px;
    max-height: 900px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.6) 30%,
        rgba(0, 0, 0, 0.3) 60%,
        transparent 100%
    ),
    linear-gradient(
        to top,
        var(--color-bg-primary) 0%,
        transparent 30%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 var(--content-padding);
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(var(--color-brand-primary-rgb), 0.2);
    border: 1px solid var(--color-brand-primary);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-brand-primary);
    margin-bottom: 1rem;
    width: fit-content;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.2;
    margin: 0 0 1rem;
}

.hero-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    max-width: 500px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--color-text-tertiary);
}

.hero-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-actions .btn {
    padding: 0.875rem 1.75rem;
}

.hero-age-badge {
    position: absolute;
    bottom: 120px;
    right: var(--content-padding);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
}

.hero-age-badge .age-19 {
    color: var(--color-brand-primary);
    font-weight: 900;
}

/* ===== 히어로 슬라이더 ===== */
.hero-slides {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-slide .hero-background {
    position: absolute;
    inset: 0;
}

.hero-slide .hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 var(--content-padding);
    max-width: 800px;
}

/* 히어로 비디오 배경 */
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
}

.hero-thumbnail {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-thumbnail.video-fallback {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 비디오 폴백 이미지 - z-index로 레이어링 처리 */
/* video가 있으면 z-index: 2로 위에 표시되고, thumbnail은 z-index: 1로 뒤에 표시됨 */

/* 슬라이드 인디케이터 */
.hero-indicators {
    position: absolute;
    bottom: 140px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.hero-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.hero-indicator:hover {
    background: rgba(255, 255, 255, 0.7);
}

.hero-indicator.active {
    width: 24px;
    border-radius: 4px;
    background: var(--color-brand-primary);
}

/* 슬라이드 네비게이션 화살표 */
.hero-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
    z-index: 10;
}

.hero-nav-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    opacity: 0;
    transition: all 0.3s ease;
}

.hero-billboard:hover .hero-nav-btn {
    opacity: 1;
}

.hero-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* 모바일에서 항상 표시 */
@media (max-width: 767px) {
    .hero-nav-btn {
        opacity: 0.7;
        width: 40px;
        height: 40px;
    }

    .hero-indicators {
        bottom: 100px;
    }

    .hero-slide .hero-content {
        justify-content: flex-end;
        padding-bottom: 120px;
    }
}

/* 콘텐츠 섹션 */
.content-sections {
    position: relative;
    z-index: 2;
    margin-top: -80px;
    padding-bottom: 3rem;
}

/* 콘텐츠 로우 */
.content-row {
    padding: 1.5rem var(--content-padding);
}

.row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.row-title {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.row-title .icon {
    color: var(--color-brand-primary);
}

.row-link {
    font-size: 0.875rem;
    color: var(--color-text-tertiary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.row-link:hover {
    color: var(--color-text-primary);
}

/* 슬라이더 */
.slider-container {
    position: relative;
}

.slider-track {
    display: flex;
    gap: 8px;
    transition: transform 0.4s ease;
    overflow: visible;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.8), transparent);
    border: none;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.slider-container:hover .slider-arrow {
    opacity: 1;
}

.slider-arrow:disabled {
    opacity: 0 !important;
    cursor: default;
}

.slider-arrow.prev {
    left: 0;
}

.slider-arrow.next {
    right: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.8), transparent);
}

/* 비디오 카드 */
.video-card {
    flex-shrink: 0;
    width: calc((100% - 8px) / 2);
    cursor: pointer;
    transition: transform var(--transition-normal), z-index 0s;
}

.video-card:hover {
    transform: scale(1.05);
    z-index: 5;
}

@media (min-width: 500px) {
    .video-card {
        width: calc((100% - 16px) / 3);
    }
}

@media (min-width: 800px) {
    .video-card {
        width: calc((100% - 32px) / 5);
    }
}

@media (min-width: 1100px) {
    .video-card {
        width: calc((100% - 40px) / 6);
    }
}

@media (min-width: 1400px) {
    .video-card {
        width: calc((100% - 48px) / 7);
    }
}

.card-thumbnail {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-bg-tertiary);
}

.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.video-card:hover .card-thumbnail img {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.video-card:hover .card-overlay {
    opacity: 1;
}

.play-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #000;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-fast);
}

.play-button:hover {
    transform: scale(1.1);
}

.card-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.card-badge.new {
    background: var(--color-success);
    color: #000;
}

.card-badge.hot {
    background: var(--color-brand-primary);
    color: #fff;
}

.card-info {
    padding: 0.75rem 0.25rem;
}

.card-title {
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0 0 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
}

/* TOP 10 랭킹 카드 */
.ranked-card {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.rank-number {
    font-size: 6rem;
    font-weight: 900;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 2px var(--color-text-tertiary);
    margin-right: -1.5rem;
    z-index: 1;
}

.ranked-card .card-thumbnail {
    flex: 1;
}

/* 카테고리 태그 */
.card-tags {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    padding: 2px 8px;
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    color: var(--color-text-secondary);
}

/* 로딩 스켈레톤 */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--color-bg-tertiary) 25%,
        var(--color-bg-elevated) 50%,
        var(--color-bg-tertiary) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* 반응형 */
@media (max-width: 767px) {
    .hero-billboard {
        height: 70vh;
        min-height: 400px;
    }

    .hero-content {
        justify-content: flex-end;
        padding-bottom: 120px;
    }

    .hero-gradient {
        background: linear-gradient(
            to top,
            var(--color-bg-primary) 0%,
            rgba(0, 0, 0, 0.8) 40%,
            rgba(0, 0, 0, 0.4) 100%
        );
    }

    .hero-description {
        display: none;
    }

    .hero-age-badge {
        bottom: 80px;
        right: 1rem;
    }

    .content-sections {
        margin-top: -60px;
    }

    .content-row {
        padding: 1rem;
    }

    .row-title {
        font-size: 1rem;
    }
}

/* ===== 빈 상태 스타일 ===== */
.empty-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    padding: 3rem;
}

.empty-message {
    text-align: center;
    color: var(--color-text-tertiary);
}

.empty-message svg {
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-message h3 {
    color: var(--color-text-secondary);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.empty-message p {
    font-size: 0.875rem;
}
