/* 기본 리셋 및 폰트 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans KR', sans-serif;
}

body {
    background-color: #f2f2f2;
    background-image: linear-gradient(#ffdfd6 1px, transparent 1px),
                      linear-gradient(90deg, #ffdfd6 1px, transparent 1px);
    background-size: 20px 20px;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 헤더 스타일 */
header {
    text-align: center;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #ff6b6b, #ff8080);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.2);
    position: relative;
    overflow: hidden;
}

header:before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-radial-gradient(circle at 0 0, transparent 0, transparent 10px, rgba(255, 255, 255, 0.1) 10px, rgba(255, 255, 255, 0.1) 20px);
    transform: rotate(45deg);
    animation: shine 30s linear infinite;
    opacity: 0.3;
    pointer-events: none;
}

@keyframes shine {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

header h1 {
    color: white;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
}

/* 네비게이션 메뉴 */
.nav-menu {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    gap: 15px;
}

.nav-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    background-color: #ffeded;
    color: #ff6b6b;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.2);
    position: relative;
    overflow: hidden;
}

.nav-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: all 0.4s ease;
}

.nav-btn:hover:before {
    left: 100%;
}

.nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(255, 107, 107, 0.3);
}

.nav-btn.active {
    background: linear-gradient(135deg, #ff6b6b, #ff8080);
    color: white;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.4);
}

#back-btn {
    margin-bottom: 20px;
    background-color: #ffffff;
    border: 2px solid #ff6b6b;
}

/* 검색 바 */
.search-bar {
    display: flex;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    overflow: hidden;
}

.search-input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    font-size: 1.1rem;
    outline: none;
}

.search-btn {
    padding: 0 30px;
    background: linear-gradient(135deg, #ff6b6b, #ff8080);
    border: none;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: linear-gradient(135deg, #ff8080, #ffaa80);
}

/* 카테고리 섹션 */
.category-section {
    margin-bottom: 40px;
    background-color: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.category-section:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 5px;
    width: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ff8080, #ffaa80);
}

.category-title {
    color: #ff6b6b;
    margin-bottom: 20px;
    font-size: 1.6rem;
    position: relative;
    display: inline-block;
}

.category-title:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #ff8080;
    border-radius: 3px;
}

/* 아티스트 목록 */
.artist-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.artist-card {
    width: 180px;
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.artist-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.9), rgba(255, 128, 128, 0.9));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    border-radius: 15px;
}

.artist-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 25px rgba(255, 107, 107, 0.2);
}

.artist-card:hover:before {
    opacity: 0.1;
}

.artist-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 3px solid #ff8080;
}

.artist-info {
    padding: 15px;
    text-align: center;
}

.artist-name {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: #333;
}

.song-count {
    color: #888;
    font-size: 0.9rem;
}

/* 비디오 그리드 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.video-card {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.1);
}

.video-thumbnail {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 3px solid #ff8080;
}

.video-info {
    padding: 20px;
}

.video-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333;
}

.video-artist {
    color: #888;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.video-actions {
    display: flex;
    justify-content: space-between;
}

.favorite-btn, .play-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.favorite-btn {
    background-color: #fff0f0;
    color: #ff6b6b;
    border: 1px solid #ff6b6b;
    flex: 1;
    margin-right: 10px;
}

.favorite-btn:hover {
    background-color: #ffe6e6;
}

.favorite-btn.active {
    background-color: #ff6b6b;
    color: white;
}

.play-btn {
    background: linear-gradient(135deg, #ff6b6b, #ff8080);
    color: white;
    padding: 10px 20px;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.2);
}

.play-btn:hover {
    background: linear-gradient(135deg, #ff8080, #ffaa80);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 107, 107, 0.3);
}

/* 비디오 컨테이너 */
.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.video-player {
    width: 80%;
    max-width: 900px;
    background-color: #fff;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    padding-bottom: 30px;
}

.close-video {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(255, 107, 107, 0.8);
    color: white;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.close-video:hover {
    background-color: #ff6b6b;
    transform: scale(1.1);
}

/* 맨 위로 버튼 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff6b6b, #ff8080);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    transition: all 0.3s ease;
    z-index: 100;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.5);
}

/* 애니메이션 추가 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.category-section {
    animation: fadeIn 0.5s ease forwards;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .nav-menu {
        flex-wrap: wrap;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .artist-list {
        justify-content: space-around;
    }
    
    .artist-card {
        width: 150px;
    }
    
    .artist-img {
        height: 150px;
    }
    
    .video-player {
        width: 95%;
    }
}

/* 특별한 효과 - 음표 아이콘 */
.category-title::before {
    content: '♪';
    margin-right: 10px;
    color: #ff8080;
    font-size: 1.3em;
}

/* 로딩 효과 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.loading {
    animation: pulse 1.5s infinite;
}

/* 비어 있는 상태 스타일 */
.video-grid p {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 1.1rem;
    background-color: #f9f9f9;
    border-radius: 10px;
    border: 1px dashed #ddd;
}

/* 비디오 플레이어 테두리 효과 */
iframe {
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}