/* 用户中心样式 */
.user-header {
    background: var(--gradient-primary);
    padding: 3rem 0;
    color: white;
}

.user-profile {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
}

.profile-avatar {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.edit-avatar {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-color);
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.edit-avatar:hover {
    transform: scale(1.1);
}

.profile-info h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.user-bio {
    color: rgba(255,255,255,0.8);
    margin-bottom: 1.5rem;
}

.user-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.stat-label {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.btn-edit-profile {
    padding: 0.8rem 1.5rem;
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-edit-profile:hover {
    background: var(--accent-color);
    color: var(--primary-color);
}

/* 内容区样式 */
.user-content {
    padding: 3rem 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.sidebar {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.user-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.nav-item:hover,
.nav-item.active {
    background: var(--secondary-color);
    color: white;
}

.nav-item i {
    font-size: 1.2rem;
}

.main-area {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.view-options {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.sort-select {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--radius-md);
    background: white;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.toggle-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: var(--radius-md);
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn.active,
.toggle-btn:hover {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.game-item {
    background: var(--bg-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
}

.game-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.game-cover {
    position: relative;
    aspect-ratio: 2/3;
}

.game-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-actions {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.game-item:hover .game-actions {
    opacity: 1;
}

.btn-play,
.btn-more {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--accent-color);
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-play:hover,
.btn-more:hover {
    transform: scale(1.1);
}

.game-info {
    padding: 1rem;
}

.game-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.game-meta {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.9rem;
    color: #666;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: var(--radius-md);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--secondary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-content {
    flex: 1;
}

.activity-content a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

.activity-time {
    font-size: 0.9rem;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .user-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 1rem;
    }

    .nav-item {
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .user-profile {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .profile-avatar {
        margin: 0 auto;
    }

    .user-stats {
        justify-content: center;
    }

    .btn-edit-profile {
        width: fit-content;
        margin: 0 auto;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* 添加新的组件样式 */

/* 愿望清单样式 */
.game-actions .btn-add-to-library,
.game-actions .btn-remove {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.game-actions .btn-remove {
    color: #dc3545;
}

.price {
    color: var(--primary-color);
    font-weight: 600;
}

.added-date {
    color: #666;
    font-size: 0.9rem;
}

/* 下载记录样式 */
.download-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.download-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.download-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.download-info img {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
}

.download-details h3 {
    margin-bottom: 0.5rem;
}

.download-meta {
    display: flex;
    gap: 1rem;
    color: #666;
    font-size: 0.9rem;
}

/* 评论列表样式 */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-item {
    padding: 1rem;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.comment-game {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.comment-game img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
}

.game-title {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.comment-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666;
    font-size: 0.9rem;
}

.comment-stats {
    display: flex;
    gap: 1rem;
}

.comment-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

/* 账号设置样式 */
.settings-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.settings-group {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.settings-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.settings-group h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.setting-info h4 {
    margin-bottom: 0.5rem;
}

.setting-info p {
    color: #666;
    font-size: 0.9rem;
}

.setting-select {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    background: white;
}

/* 开关样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--secondary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .download-item,
    .comment-item {
        flex-direction: column;
        gap: 1rem;
    }

    .download-actions,
    .comment-actions {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }

    .settings-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* 内容区域的过渡效果 */
.content-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 导航项的激活状态 */
.nav-item {
    transition: all 0.3s ease;
}

.nav-item.active {
    background: var(--secondary-color);
    color: white;
}

/* 视图切换按钮样式 */
.toggle-btn {
    transition: all 0.3s ease;
}

.toggle-btn.active {
    background: var(--secondary-color);
    color: white;
}

/* 列表视图样式 */
.games-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.games-grid.list-view .game-item {
    display: flex;
    align-items: center;
    background: white;
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.games-grid.list-view .game-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.games-grid.list-view .game-cover {
    width: 120px;
    height: 80px;
    flex-shrink: 0;
    margin-right: 1.5rem;
}

.games-grid.list-view .game-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.games-grid.list-view .game-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.games-grid.list-view .game-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.games-grid.list-view .game-meta {
    display: flex;
    gap: 2rem;
    color: #666;
}

.games-grid.list-view .game-actions {
    display: flex;
    gap: 1rem;
    margin-left: 1rem;
}

.games-grid.list-view .btn-play,
.games-grid.list-view .btn-more {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.games-grid.list-view .btn-play {
    background: var(--secondary-color);
    color: white;
}

.games-grid.list-view .btn-more {
    background: #f1f1f1;
    color: #666;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .games-grid.list-view .game-item {
        flex-direction: column;
        text-align: center;
    }

    .games-grid.list-view .game-cover {
        width: 100%;
        height: 160px;
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .games-grid.list-view .game-info {
        flex-direction: column;
        gap: 1rem;
    }

    .games-grid.list-view .game-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .games-grid.list-view .game-actions {
        margin-left: 0;
        justify-content: center;
    }
} 