:root {
    --bg-color: #f8f9fa;
    --text-color: #212529;
    --container-bg: rgba(255, 255, 255, 0.7);
    --container-border: rgba(255, 255, 255, 0.3);
    --h1-color: #333;
    --item-bg: rgba(255, 255, 255, 0.9);
    --item-text: #333;
    --gradient-start: #e0c3fc;
    --gradient-end: #8ec5fc;
    --accent-color: #6a11cb;
    --comment-bg: #fff;
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --text-color: #f1f5f9;
    --container-bg: rgba(30, 41, 59, 0.7);
    --container-border: rgba(255, 255, 255, 0.1);
    --h1-color: #f1f5f9;
    --item-bg: rgba(51, 65, 85, 0.8);
    --item-text: #f1f5f9;
    --gradient-start: #1e293b;
    --gradient-end: #0f172a;
    --accent-color: #38bdf8;
    --comment-bg: #1e293b;
}

body {
    font-family: 'Pretendard', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    background-image: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    transition: all 0.5s ease;
}

.music-dashboard {
    width: 100%;
    max-width: 800px;
    position: relative;
    background: var(--container-bg);
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--container-border);
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid var(--container-border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    margin: 0;
    font-size: 2.2rem;
    color: var(--h1-color);
}

.subtitle {
    opacity: 0.8;
    margin-top: 8px;
}

.tabs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 10px 24px;
    border-radius: 30px;
    border: 1px solid var(--container-border);
    background: var(--item-bg);
    color: var(--text-color);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

.music-list {
    display: grid;
    gap: 16px;
}

.music-item {
    background: var(--item-bg);
    padding: 20px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent;
}

.music-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

.music-info h3 {
    margin: 0;
    font-size: 1.2rem;
}

.music-info p {
    margin: 4px 0 0;
    opacity: 0.7;
    font-size: 0.9rem;
}

.play-badge {
    background: var(--accent-color);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.hidden { display: none; }

.music-detail {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.back-btn {
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 20px;
    font-size: 1rem;
}

.detail-header {
    text-align: center;
    margin-bottom: 30px;
}

.detail-header h2 {
    font-size: 2rem;
    margin: 10px 0;
}

.listen-link {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 30px;
    background: #ff0000;
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    transition: opacity 0.3s;
}

.listen-link:hover { opacity: 0.8; }

.comment-section {
    margin-top: 30px;
}

#comment-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#comment-form input, #comment-form textarea {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--container-border);
    background: var(--comment-bg);
    color: var(--text-color);
}

#comment-form textarea {
    height: 100px;
    resize: none;
}

.btn {
    padding: 12px;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.comment-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-item {
    padding: 12px;
    border-radius: 8px;
    background: var(--item-bg);
    border: 1px solid var(--container-border);
}

.comment-item .user {
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: var(--accent-color);
}

.comment-item .date {
    font-size: 0.7rem;
    opacity: 0.5;
    margin-left: 8px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 16px;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 600px) {
    .music-dashboard { padding: 20px; }
    h1 { font-size: 1.5rem; }
    .tab-btn { padding: 8px 16px; font-size: 0.9rem; }
}
