body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    font-family: 'Pretendard', sans-serif;
    color: #333;
    background-color: #f0f0f0;
    line-height: 1.5;
    -ms-overflow-style: none;
    scrollbar-width: none;
    letter-spacing: -0.5px;
    word-break: keep-all;
}
body::-webkit-scrollbar {
    display: none; 
}
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

/* only PC */
@media (min-width: 1024px) {
    body {
        background-image: url('/assets/images/bg.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        background-attachment: fixed;
    }
    .window-container {
        aspect-ratio: 1 / 0.64;
        max-height: 96vh;
    }
}

.window-container {
    display: flex;
    /* max-width: 1400px;
    width: 100%; */
    background-color: #f7f7f7;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    align-items: center;
    padding: 15px;
    position: relative;
}

/* 1. 사이드바 */
.sidebar {
    width: 18%;
    max-width: 280px;
    height: 100%;
    max-height: 900px;
    flex-shrink: 0;
    background-color: #f7f7f7;
    overflow-y: scroll;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding: 45px 15px 10px 0;
}
.sidebar::-webkit-scrollbar { display: none; }

.window-controls {
    display: flex;
    gap: 8px;
    position: absolute; 
    top: 20px; 
    left: 20px; 
    z-index: 5;
}
.control-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.music-section {
    border-radius: 12px;
    display: block; 
}
.music-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    width: 100%;
    background-color: #e0e0e0;
}
.music-item:last-child {
    margin-bottom: 0;
}
.music-item:hover {
    background-color: #cccccc;
}
.album-art {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    margin-right: 10px;
}
.music-info {
    flex-grow: 1;
}
.music-title {
    font-weight: bold;
    font-size: 14px;
    color: #333;
}
.music-artist {
    font-size: 12px;
    color: #777;
}
.play-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #4d4d4d;
    font-size: 10px;
    aspect-ratio: 1 / 1; 
}

.music-item:hover .play-btn {
    background-color: #e0e0e0;
}

.awards-section h3 {
    font-size: 18px;
    font-weight: 700;
    margin-top: 20px;
    margin-bottom: 15px;
    color: #333;
}
.award-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 8px;
    transition: background-color 0.2s;
    position: relative;
}
.award-item.clickable {
    cursor: pointer; 
}
.award-item.clickable:hover {
    background-color: #ffffff;
}
.award-icon {
    width: 16px;
    flex-shrink: 0;
    margin-right: 10px;
    position: absolute;
    top: 12px;
    left: 12px;
}
.award-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.award-text {
    margin-left: 30px;
}
.award-text h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}
.award-text p {
    font-size: 12px;
    color: #777;
    margin: 2px 0 0 0;
    line-height: 1.3;
}

/* 메인 컨텐츠 */
.main-content {
    height: 100%;
    border-radius: 15px;
    flex-grow: 1;
    padding: 30px;
    overflow-y: auto; 
    -ms-overflow-style: none;
    scrollbar-width: none;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}
.main-content::-webkit-scrollbar { display: none; }

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.header-title {
    font-family: 'Montserrat';
    font-size: 24px;
    font-weight: 900;
}
.header-title br {
    display: none;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}
.link-pill {
    font-family: 'Montserrat';
    background-color: #eee;
    color: #555;
    padding: 7px 50px;
    border-radius: 20px;
    font-size: 13px;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s;
}
.link-pill:hover {
    background-color: #ddd;
}

.profile {
    width: 30px;
    height: 30px;
    overflow: hidden;
    border-radius: 9999px;
    border: 1px solid #1c1c1c;
}

.profile img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

/* 필모그래피 */
.filmography-card {
    width: 100%;
    aspect-ratio: 3 / 4.5;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background-color: #333;

    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
}

.img-box {
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.img-box img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s;
}

.filmography-card:hover .img-box img {
    transform: scale(1.1);
}

.tags {
    position: absolute;
    top: clamp(12px, 1vw, 13px);
    left: clamp(12px, 1vw, 13px);
    z-index: 10;
    display: flex;
    gap: 8px;
}
.tag {
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 4px 9px;
    border-radius: 20px;
    font-size: clamp(12px, 0.8vw, 13px);
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    display: inline-block; 
}
.tag:hover {
    background-color: #ff5f56; 
    color: #fff;
}

.card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: clamp(10px, 1vw, 13px);
    color: #fff;
    z-index: 5;
}
.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 50%);
    z-index: 4;
}

.broadcaster {
    height: 12px;
    margin-bottom: 5px;
    max-width: 40px;
    text-align: left;
}
.broadcaster img {
    height: 100%;
    object-fit: contain;
}

.card-title {
    font-size: clamp(16px, 1.25vw, 20px);
    font-weight: 700;
    line-height: 1.3;
    position: relative;
}

.card-date {
    font-size: 10px; 
    opacity: 0.7;
    margin-top: 5px;
    position: relative;
}

.bottom-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.grid-column h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
}

.box-grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.gray-box {
    border-radius: 10px;
    background-color: #eee;
    position: relative;
    overflow: hidden;
    cursor: pointer; 
    aspect-ratio: 1 / 1; 
    
    background-image: var(--bg-image);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.3s ease; 
}
.gray-box {
    aspect-ratio: 1 / 1; 
    position: relative;
    overflow: hidden;
}

.gray-box:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.gray-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    transition: background-color 0.3s;
    z-index: 1; 
    pointer-events: none;
}

.gray-box:hover::before {
    background-color: rgba(0, 0, 0, 0.4);
}

.hover-title {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2;
    padding: 0 10px;
    pointer-events: none; 
}

.gray-box:hover .hover-title {
    opacity: 1;
}


/* =========================================================
                           모바일
   ========================================================= */
@media (max-width: 1023px) {

    body {
        height: auto !important;
        display: block; 
        padding-top: 0;
    }

    .window-container {
        margin: 20px auto;
        flex-direction: column;
        width: 90%;
        height: auto;
        min-height: none;
        padding: 0;
        position: relative; 
        padding-top: 50px;
    }

    .window-controls {
        display: flex;
        gap: 8px;
        position: absolute; 
        top: 20px; 
        left: 20px; 
        z-index: 5;
    }
    
    /* 사이드바  */
    .sidebar {
        order: 2; 
        width: 100%;
        max-width: none;
        height: auto;
        max-height: none;
        overflow-y: visible;
        padding: 20px; 
    }

    .awards-section h3 {
        padding-bottom: 5px;
        margin-top: 40px;
    }
    .award-icon {
        left: 0; 
    }
    .award-text {
        margin-left: 30px;
    }

    .award-text h4 {
        font-size: 16px;
    }

    .award-text p {
        font-size: 14px;
    }
    .award-item {
        padding: 5px 0; 
    }
    .award-item.clickable:hover {
        background-color: transparent;
    }

    .music-section {
        order: 1; 
        margin-bottom: 20px;
        border-radius: 0;
    }

    .awards-section {
        order: 2;
    }

    .music-item {
        background-color: #f0f0f0;
        margin-bottom: 10px;
        padding: 15px; 
    }
    .music-item:hover {
        background-color: #e0e0e0;
    }

    .music-title {
        font-size: 16px;
    }

    .music-artist {
        font-size: 14px;
    }

    /* 메인 컨텐츠 */
    .main-content {
        order: 1;
        width: 100%;
        height: auto;
        max-height: none;
        margin: 0;
        padding: 20px;
        overflow-y: visible; 
        background-color: #fff;
    }

    .main-header {
        margin-bottom: 25px;
        flex-direction: column-reverse;
        justify-content: flex-start;
        align-items: flex-start;
    }

    .header-title {
        margin: 0 auto;
    }

    .header-title br {
        display: inline-block;
    }

    .header-right {
        display: flex;
        align-items: center;
        gap: 30px;
        margin-bottom: 15px;
        width: 100%;
        justify-content: flex-start;
    }

    .link-pill {
        flex-grow: 1;
        padding: 10px;
        max-width: none;
    }
    .profile {
        width: 40px;
        height: 40px;
    }
    .section-title {
        font-size: 18px;
        margin-bottom: 10px;
    }

    /* Drama & Movie 모바일 횡스크롤 */
    .card-grid.filmography-grid {
        display: flex;
        grid-template-columns: none; 
        flex-wrap: nowrap;
        gap: 15px;
        padding-bottom: 10px;
        padding-left: 20px;
        margin-right: -20px; 
        padding-right: 20px;
        overflow-x: scroll;
        scroll-snap-type: x mandatory;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .card-grid.filmography-grid::-webkit-scrollbar {
        display: none;
    }

    .filmography-card {
        width: 180px;
        height: 250px; 
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    .tags {
        top: 10px;
        left: 10px;
    }
    .tag {
        font-size: 11px;
        padding: 4px 10px;
    }
    .card-info {
        padding: clamp(12px, 1vw, 15px);
    }
    .card-title {
        font-size: 18px;
    }
    .bottom-layout {
        display: block;
        gap: 0;
    }
    .grid-column h3 {
        font-size: 18px;
        margin-top: 40px;
        margin-bottom: 10px;
    }
    .hover-title {
        font-size: 11px;
    }

}


/* =========================================================
                            모달 스타일
   ========================================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); 
    backdrop-filter: blur(5px); 
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 800px;
    overflow: hidden;
    padding: 20px;
}
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        padding: 10px;
    }
}


.modal-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    line-height: 1;
}

#youtube-player-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; 
    height: 0;
}

#youtube-player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    border: none;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 15px;
}

.modal-close-button {
    background-color: #ddd;
    color: #333;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.modal-close-button:hover {
    background-color: #ccc;
}