/* style.css */
/* 1. 기본 설정 및 테마 변수 */
:root {
    --bg-color: #f5f7fa;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --text-color: #333;
    --header-bg: rgba(255, 255, 255, 0.95);
    --card-bg: #ffffff;
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --track-border: #edf2f7;
    --summary-color: #718096;
}

[data-theme="dark"] {
    --bg-color: #1a202c;
    --bg-gradient: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    --text-color: #e2e8f0;
    --header-bg: rgba(26, 32, 44, 0.95);
    --card-bg: #2d3748;
    --primary-color: #90cdf4;
    --secondary-color: #d6bcfa;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --track-border: #4a5568;
    --summary-color: #a0aec0;
}

* { margin: 0; padding: 0; box-sizing: border-box; transition: background-color 0.3s, color 0.3s; }
body { font-family: 'Segoe UI', 'Apple SD Gothic Neo', sans-serif; line-height: 1.6; color: var(--text-color); background: var(--bg-gradient); min-height: 100vh; display: flex; flex-direction: column; }

/* 2. 헤더 및 네비게이션 */
header { background: var(--header-bg); padding: 1.5rem 2rem; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05); position: sticky; top: 0; z-index: 1000; backdrop-filter: blur(10px); }
header h1 { font-size: 1.5rem; font-weight: 700; margin: 0; }
header h1 a { text-decoration: none; color: var(--text-color); }
nav ul { list-style: none; display: flex; gap: 1.5rem; padding: 0; margin: 0; }
nav a { color: var(--text-color); text-decoration: none; font-weight: 600; font-size: 1rem; padding: 0.5rem 1rem; border-radius: 20px; }
nav a:hover, nav a.active { color: var(--primary-color); background: rgba(102, 126, 234, 0.1); }
.theme-switch { background: none; border: 2px solid var(--text-color); color: var(--text-color); padding: 0.4rem 1rem; border-radius: 20px; cursor: pointer; font-weight: 600; }
.theme-switch:hover { background: var(--text-color); color: var(--bg-color); }

/* 3. 메인 레이아웃 */
main { flex: 1; max-width: 1200px; margin: 2rem auto; padding: 0 1.5rem; width: 100%; }
section { margin-bottom: 4rem; }
section h2 { margin-bottom: 2rem; font-size: 2rem; text-align: center; position: relative; color: var(--text-color); }
section h2::after { content: ''; display: block; width: 50px; height: 3px; background: var(--primary-color); margin: 0.5rem auto 0; border-radius: 2px; }

/* 4. Carousel (Featured Tracks) 스타일 - NEW */
.carousel-container { display: flex; align-items: center; justify-content: space-between; position: relative; max-width: 900px; margin: 0 auto; gap: 1rem; }
.track-viewer { flex: 1; overflow: hidden; border-radius: 12px; box-shadow: 0 10px 30px var(--shadow-color); background: #000; position: relative; aspect-ratio: 16 / 9; }
.video-slide { display: none; width: 100%; height: 100%; }
.video-slide.active { display: block; animation: fadeIn 0.5s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.video-wrapper.large { width: 100%; height: 100%; }
.video-wrapper.large iframe { width: 100%; height: 100%; border: 0; }
.video-title.large { position: absolute; bottom: 0; left: 0; width: 100%; background: rgba(0, 0, 0, 0.7); color: white; padding: 1rem; text-align: center; font-weight: 600; font-size: 1.1rem; }

/* 네비게이션 버튼 */
.nav-btn { background: var(--card-bg); color: var(--text-color); border: none; width: 50px; height: 50px; border-radius: 50%; cursor: pointer; box-shadow: 0 5px 15px var(--shadow-color); font-size: 1.2rem; transition: transform 0.2s, background 0.3s; display: flex; align-items: center; justify-content: center; z-index: 10; }
.nav-btn:hover { transform: scale(1.1); background: var(--primary-color); color: white; }

/* 인디케이터 (점) */
.carousel-indicators { text-align: center; margin-top: 1rem; }
.dot { display: inline-block; width: 10px; height: 10px; background-color: var(--summary-color); margin: 0 5px; border-radius: 50%; opacity: 0.5; transition: 0.3s; }
.dot.active { background-color: var(--primary-color); opacity: 1; transform: scale(1.2); }

/* 5. 앨범 그리드 & 카드 스타일 */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2rem; }
.album-card { background: var(--card-bg); border-radius: 16px; overflow: hidden; box-shadow: 0 10px 20px var(--shadow-color); transition: transform 0.3s; display: flex; flex-direction: column; }
.album-card:hover { transform: translateY(-5px); }
.album-cover-wrapper { width: 100%; aspect-ratio: 1 / 1; background-color: #000; overflow: hidden; }
.album-cover-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.album-card:hover .album-cover-wrapper img { transform: scale(1.05); }
.album-info { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.album-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.album-link { display: inline-block; margin-bottom: 1rem; font-size: 0.9rem; color: var(--primary-color); font-weight: 600; }
.album-link.private { color: var(--summary-color); opacity: 0.7; pointer-events: none; }

/* 6. 트랙 리스트 */
details.track-list { margin-top: auto; border-top: 1px solid var(--track-border); padding-top: 1rem; }
summary { cursor: pointer; font-weight: 600; color: var(--summary-color); list-style: none; display: flex; justify-content: space-between; }
summary::after { content: '+'; }
details[open] summary::after { content: '-'; }
.tracks { margin-top: 1rem; list-style: none; padding-left: 0; max-height: 200px; overflow-y: auto; }
.tracks li { font-size: 0.85rem; color: var(--text-color); padding: 0.3rem 0; border-bottom: 1px dashed var(--track-border); opacity: 0.9; }

/* 7. 공통 UI 요소 */
.text-content { background: var(--card-bg); padding: 2.5rem; border-radius: 16px; box-shadow: 0 5px 15px var(--shadow-color); max-width: 800px; margin: 0 auto; text-align: center; }
.btn { display: inline-block; background: var(--primary-color); color: #fff; padding: 0.8rem 2rem; border-radius: 30px; text-decoration: none; font-weight: 600; margin-top: 1rem; }
.btn:hover { opacity: 0.9; }
.social-links { display: flex; justify-content: center; gap: 2rem; margin: 2rem 0; flex-wrap: wrap; }
.social-item { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--text-color); transition: transform 0.3s; }
.social-item i { font-size: 2.5rem; color: var(--primary-color); transition: color 0.3s; }
.social-item:hover { transform: translateY(-5px); }

/* 8. 반응형 */
footer { text-align: center; padding: 2rem; color: var(--summary-color); font-size: 0.9rem; margin-top: auto; }
@media (max-width: 768px) {
    header { flex-direction: column; gap: 1rem; }
    .album-grid { grid-template-columns: 1fr; }
    .carousel-container { padding: 0 10px; }
    .nav-btn { width: 40px; height: 40px; font-size: 1rem; position: absolute; top: 50%; transform: translateY(-50%); }
    .prev-btn { left: -10px; }
    .next-btn { right: -10px; }
}