/* 成就系统样式 */

/* 成就界面容器 */
.achievements-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    color: white;
    font-family: Arial, sans-serif;
}

/* 成就界面头部 */
.achievements-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.achievements-header h2 {
    margin: 0;
    font-size: 24px;
}

.achievements-header button {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0 10px;
}

/* 成就统计信息 */
.achievements-stats {
    display: flex;
    justify-content: space-around;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.05);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    opacity: 0.7;
}

/* 成就分类标签 */
.achievements-tabs {
    display: flex;
    overflow-x: auto;
    padding: 10px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.achievement-tab {
    padding: 8px 15px;
    margin-right: 10px;
    cursor: pointer;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    transition: all 0.3s ease;
}

.achievement-tab.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 稀有度标签样式 */
.achievement-tab[data-rarity="common"] {
    border-bottom: 2px solid #aaaaaa;
}

.achievement-tab[data-rarity="rare"] {
    border-bottom: 2px solid #3498db;
}

.achievement-tab[data-rarity="epic"] {
    border-bottom: 2px solid #9b59b6;
}

.achievement-tab[data-rarity="legendary"] {
    border-bottom: 2px solid #f1c40f;
}

.achievement-tab[data-rarity="common"].active {
    background-color: rgba(170, 170, 170, 0.2);
}

.achievement-tab[data-rarity="rare"].active {
    background-color: rgba(52, 152, 219, 0.2);
}

.achievement-tab[data-rarity="epic"].active {
    background-color: rgba(155, 89, 182, 0.2);
}

.achievement-tab[data-rarity="legendary"].active {
    background-color: rgba(241, 196, 15, 0.2);
}

/* 成就内容区域 */
.achievements-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.achievements-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

/* 成就卡片 */
.achievement-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.achievement-card.hidden {
    display: none;
}

.achievement-card.hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.1);
}

.achievement-card:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.1);
}

.achievement-card.common {
    border-left: 4px solid #aaaaaa;
}

.achievement-card.rare {
    border-left: 4px solid #3498db;
}

.achievement-card.epic {
    border-left: 4px solid #9b59b6;
}

.achievement-card.legendary {
    border-left: 4px solid #f1c40f;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(50, 50, 50, 0.8) 100%);
}

.achievement-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.achievement-icon {
    font-size: 24px;
    margin-right: 10px;
}

.achievement-title {
    font-weight: bold;
    font-size: 16px;
}

.achievement-description {
    font-size: 14px;
    margin-bottom: 15px;
    opacity: 0.8;
}

.achievement-card.locked .achievement-icon,
.achievement-card.locked .achievement-title,
.achievement-card.locked .achievement-description,
.achievement-card.locked .achievement-points {
    opacity: 0.5;
}

.achievement-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.achievement-points {
    font-weight: bold;
    color: #f1c40f;
}

.achievement-date {
    font-size: 12px;
    opacity: 0.6;
}

/* 成就进度条 */
.achievement-progress-container {
    height: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 10px;
    overflow: hidden;
}

.achievement-progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.achievement-progress-bar.common {
    background-color: #aaaaaa;
}

.achievement-progress-bar.rare {
    background-color: #3498db;
}

.achievement-progress-bar.epic {
    background-color: #9b59b6;
}

.achievement-progress-bar.legendary {
    background-color: #f1c40f;
}

.achievement-progress-text {
    font-size: 12px;
    text-align: right;
    margin-top: 5px;
    opacity: 0.7;
}

/* 成就通知 */
#achievement-notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 300px;
    z-index: 9999;
    pointer-events: none;
}

.achievement-notification {
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    color: white;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    transform: translateX(120%);
    transition: transform 0.5s ease;
    overflow: hidden;
    pointer-events: auto;
    cursor: pointer;
}

.achievement-notification.show {
    transform: translateX(0);
}

.achievement-notification .icon {
    font-size: 2em;
    margin-right: 15px;
    min-width: 40px;
    text-align: center;
}

.achievement-notification .content {
    flex: 1;
}

.achievement-notification .title {
    font-weight: bold;
    margin-bottom: 5px;
}

.achievement-notification .description {
    font-size: 0.9em;
    opacity: 0.8;
}

.achievement-notification .points {
    font-weight: bold;
    margin-top: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .achievements-list {
        grid-template-columns: 1fr;
    }

    .achievements-stats {
        flex-direction: row;
        gap: 10px;
    }

    #achievement-notification-container {
        width: 90%;
        left: 5%;
        right: 5%;
    }
}
