/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    padding-top: 60px; /* 为PC端头部留出空间 */
    padding-bottom: 60px; /* 为播放器/移动端导航留出空间 */
}

.container {
    width: 92%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* 卡片样式（统一风格） */
.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    margin-bottom: 20px;
}

.card:hover {
    transform: translateY(-3px);
}

.card-header {
    background-color: #333; /* 深灰主色 */
    color: #fff;
    padding: 12px 16px;
    font-weight: 600;
}

.card-body {
    padding: 16px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #d4af37; /* 金色强调色 */
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn:hover {
    transform: scale(1.05);
    background-color: #b8860b;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #d4af37;
    color: #d4af37;
}

.btn-outline:hover {
    background-color: #d4af37;
    color: #fff;
}

/* 头部导航（PC端） */
.pc-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #333;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
}

.logo a {
    color: #d4af37;
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
}

.pc-nav {
    display: flex;
    gap: 20px;
}

.nav-item {
    color: #fff;
    text-decoration: none;
    padding: 8px 0;
    position: relative;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #d4af37;
    transition: width 0.3s ease;
}

.nav-item:hover::after {
    width: 100%;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

/* 移动端底部导航 */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #333;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
}

.mobile-nav .nav-item {
    color: #fff;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    gap: 4px;
}

.mobile-nav .icon {
    font-size: 20px;
}

/* 平板端左侧导航 */
.tablet-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 80px;
    background-color: #333;
    padding-top: 20px;
    z-index: 900;
}

.tablet-nav .nav-item {
    color: #fff;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 0;
    font-size: 12px;
    gap: 8px;
}

.tablet-nav .icon {
    font-size: 24px;
}

/* 播放器样式 */
.player-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #333;
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 999;
}

.player-controls {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 15px;
}

.control-btn {
    background: none;
    border: none;
    color: #d4af37;
    font-size: 20px;
    cursor: pointer;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background-color: #555;
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
}

.progress {
    height: 100%;
    background-color: #d4af37;
    width: 0%;
}

.time-display {
    color: #fff;
    width: 60px;
    text-align: center;
}

/* 列表布局（卡片式） */
.card-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 默认移动端2列 */
    gap: 15px;
}

@media (min-width: 768px) {
    .card-list {
        grid-template-columns: repeat(3, 1fr); /* 平板3列 */
    }
    .tablet-nav {
        display: block;
    }
    .mobile-nav {
        display: none;
    }
    body {
        padding-left: 80px; /* 为平板左侧导航留出空间 */
    }
}

@media (min-width: 1024px) {
    .card-list {
        grid-template-columns: repeat(4, 1fr); /* PC端4列 */
    }
    .mobile-nav {
        display: none;
    }
    .tablet-nav {
        display: none;
    }
    body {
        padding-left: 0;
    }
}

/* 乐谱/课程卡片 */
.score-card, .course-card, .share-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-cover {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.card-info {
    padding: 12px;
}

.card-title {
    font-weight: 600;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    font-size: 12px;
    color: #666;
    display: flex;
    justify-content: space-between;
}

/* 用户详情页 */
.user-detail {
    padding: 20px 0;
}

.info-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.basic-info {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
}

.user-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.user-basic {
    flex: 1;
}

.user-nickname {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.user-meta {
    color: #666;
    line-height: 1.6;
}

.data-card {
    padding: 20px;
}

.data-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.data-item {
    text-align: center;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.data-value {
    font-size: 20px;
    font-weight: bold;
    color: #d4af37;
    margin-bottom: 5px;
}

.data-label {
    font-size: 12px;
    color: #666;
}

/* 表单样式 */
.form-container {
    max-width: 500px;
    margin: 50px auto;
    padding: 30px;
}

.form-title {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-control:focus {
    outline: none;
    border-color: #d4af37;
}

.form-actions {
    margin-top: 30px;
    text-align: center;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 20px 0;
    color: #666;
    font-size: 14px;
}

/* 成就展示 */
.achievement-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.achievement-card {
    width: calc(33.333% - 10px);
    padding: 15px;
    text-align: center;
}

.achievement-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background-color: #f1f1f1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.achievement-icon img {
    width: 40px;
    height: 40px;
}

.achievement-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.achievement-progress {
    font-size: 12px;
    color: #666;
}

/* 练习计时 */
.timer-container {
    text-align: center;
    padding: 20px;
}

.timer-display {
    font-size: 36px;
    font-weight: bold;
    color: #d4af37;
    margin: 20px 0;
}

.timer-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* 单音训练页面样式 */
.audio-container button {
    margin: 0 5px;
}

#options-container button {
    transition: all 0.3s ease;
}

#options-container button:hover {
    transform: translateY(-2px);
}

#feedback {
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 10px 15px;
}

#wrong-list {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
}

.replay-wrong {
    padding: 4px 8px;
    font-size: 12px;
}