/* ============================================
   侧边栏/菜单栏样式
   ============================================ */

@import url('./variables.css');
@import url('./common.css');

/* 菜单按钮（手机端） */
.menu-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: none;
    color: white;
    font-size: 20px;
}

.menu-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-hover);
}

.menu-toggle.active {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

/* 侧边栏遮罩层（手机端） */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(106, 75, 90, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 侧边栏 */
.sidebar {
    position: fixed;
    top: 0;
    height: 100vh;
    background-color: var(--surface);
    box-shadow: var(--shadow-card);
    z-index: 1000;
    transition: var(--transition);
    overflow-y: auto;
    border-right: 1px solid var(--border-light);
}

/* 电脑端样式 */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
    
    .sidebar-overlay {
        display: none;
    }
    
    .sidebar {
        left: 0;
        width: 280px;
        transform: translateX(0);
    }
    
    body {
        padding-left: 280px !important;
    }
    
    .container {
        margin-left: 0;
        max-width: calc(1200px - 280px);
    }
}

/* 手机端样式 */
@media (max-width: 768px) {
    body {
        padding-left: 0 !important;
    }
    
    .sidebar {
        left: 0;
        width: 280px;
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
}

/* 侧边栏内容 */
.sidebar-header {
    padding: 30px 24px;
    border-bottom: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    color: white;
    box-shadow: var(--shadow);
}

.sidebar-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 侧边栏导航 */
.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    position: relative;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background-color: var(--primary-light);
    border-left-color: var(--primary);
    color: var(--primary-dark);
}

.nav-item.active {
    background-color: var(--primary-light);
    border-left-color: var(--primary-dark);
    color: var(--primary-dark);
    font-weight: 600;
}

.nav-item i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.nav-item span {
    font-size: 15px;
}

/* 歌单解析弹窗 */
.playlist-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(106, 75, 90, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: var(--transition);
}

.playlist-modal.show {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.3s ease-out;
}

.playlist-modal-content {
    background-color: var(--surface);
    border-radius: 24px;
    padding: 32px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-card);
    transform: translateY(20px);
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.playlist-modal.show .playlist-modal-content {
    transform: translateY(0);
    animation: slideUp 0.3s ease-out;
}

.playlist-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.playlist-modal-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.playlist-modal-title i {
    color: var(--primary);
}

.playlist-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    background-color: var(--border-light);
    border: none;
    color: var(--text-primary);
}

.playlist-modal-close:hover {
    background-color: var(--text-disabled);
    transform: rotate(90deg);
}

.playlist-modal-body {
    margin-bottom: 24px;
}

.playlist-input-group {
    margin-bottom: 20px;
}

.playlist-input-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.playlist-input {
    width: 100%;
    padding: 14px 20px;
    border-radius: 12px;
    border: 2px solid var(--border);
    background-color: var(--light);
    font-size: 15px;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.playlist-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.playlist-input::placeholder {
    color: var(--text-disabled);
}

.playlist-hint {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
    line-height: 1.6;
}

.playlist-modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-cancel {
    background-color: var(--border-light);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: 25px;
    border: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-cancel:hover {
    background-color: var(--text-disabled);
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    border: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-submit:disabled {
    background: var(--text-disabled);
    cursor: not-allowed;
    transform: none;
}

/* 加载状态 */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .playlist-modal-content {
        padding: 24px;
        max-width: 90%;
    }
    
    .playlist-modal-title {
        font-size: 20px;
    }
}

