/* achievements.css - 改善版 */
.achievements-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 15px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 10px;
    margin-bottom: 20px;
}

.achievement {
    display: flex;
    flex-direction: column;
    min-height: 180px;
    padding: 15px;
    background: rgba(0, 40, 80, 0.5);
    border-radius: 10px;
    border-left: 4px solid #00ffff;
    transition: all 0.3s ease;
    position: relative;
}

.achievement.unlocked {
    border-left-color: #FFD700;
    background: rgba(0, 60, 120, 0.7);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.achievement.locked {
    opacity: 0.7;
    border-left-color: #666;
}

.achievement-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    min-height: 40px;
}

.achievement-header h3 {
    color: #00ffff;
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.3;
    flex: 1;
    margin-right: 10px;
}

.achievement.unlocked .achievement-header h3 {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.achievement.locked .achievement-header h3 {
    color: #888;
}

.achievement-level {
    background: rgba(0, 255, 255, 0.2);
    color: #00ffff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    white-space: nowrap;
}

.achievement.unlocked .achievement-level {
    background: rgba(255, 215, 0, 0.2);
    color: #FFD700;
}

.achievement-icon {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.5));
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.achievement.unlocked .achievement-icon {
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
}

.achievement-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.achievement-description {
    color: #88ddff;
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    line-height: 1.3;
    min-height: 36px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.achievement.locked .achievement-description {
    color: #666;
}

.achievement-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.8rem;
    flex-wrap: wrap;
    gap: 5px;
}

.current-value {
    color: #00ff88;
    font-weight: bold;
}

.next-target {
    color: #ffaa00;
}

.achievement-progress {
    margin-top: auto;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 0.8rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ffff, #0088ff);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.achievement.unlocked .progress-fill {
    background: linear-gradient(90deg, #FFD700, #FFA500);
}

.progress-text {
    color: #88ddff;
    font-size: 0.8rem;
    font-weight: bold;
}

.achievement-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #00ffff;
    color: #000;
    padding: 3px 6px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: bold;
}

.achievement.unlocked .achievement-badge {
    background: #FFD700;
}

.achievement-badge.max-level {
    background: linear-gradient(135deg, #FFD700, #FF6B00);
    color: #000;
    animation: pulse 2s infinite;
}

/* スクロールバーのスタイリング */
.achievements-content::-webkit-scrollbar {
    width: 8px;
}

.achievements-content::-webkit-scrollbar-track {
    background: rgba(0, 20, 40, 0.5);
    border-radius: 4px;
}

.achievements-content::-webkit-scrollbar-thumb {
    background: #00ffff;
    border-radius: 4px;
}

.achievements-content::-webkit-scrollbar-thumb:hover {
    background: #00ccff;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .achievements-content {
        grid-template-columns: 1fr;
        gap: 10px;
        max-height: 60vh;
    }
    
    .achievement {
        min-height: 160px;
        padding: 12px;
    }
    
    .achievement-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .achievement-header h3 {
        margin-right: 0;
        font-size: 1.1rem;
    }
    
    .achievement-level {
        align-self: flex-start;
    }
    
    .achievement-icon {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }
    
    .achievement-stats {
        flex-direction: column;
        gap: 3px;
    }
    
    .current-value, .next-target {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .achievements-content {
        grid-template-columns: 1fr;
        max-height: 55vh;
    }
    
    .achievement {
        min-height: 150px;
        padding: 10px;
    }
    
    .achievement-header h3 {
        font-size: 1rem;
    }
    
    .achievement-description {
        font-size: 0.85rem;
        min-height: 32px;
    }
}

/* コンパクトモード（オプション） */
.achievement.compact {
    min-height: 140px;
    padding: 12px;
}

.achievement.compact .achievement-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.achievement.compact .achievement-header h3 {
    font-size: 1rem;
}

.achievement.compact .achievement-description {
    font-size: 0.8rem;
    min-height: 32px;
}

.achievement.compact .achievement-stats {
    font-size: 0.75rem;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 実績通知のスタイルは変更なし */
.achievement-notification-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.achievement-notification-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
}

.achievement-notification-text {
    flex: 1;
}

.achievement-notification-title {
    font-weight: bold;
    margin-bottom: 5px;
    color: #FFD700;
}

.achievement-notification-name {
    font-size: 1.1rem;
    margin-bottom: 3px;
}

.achievement-notification-desc {
    font-size: 0.9rem;
    opacity: 0.9;
}
/* 統計表示用スタイル */
.achievements-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 40, 80, 0.5);
    border-radius: 10px;
    border: 1px solid #00ffff;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat-label {
    color: #88ddff;
    font-size: 0.9rem;
}

.stat-value {
    color: #00ffff;
    font-size: 1.2rem;
    font-weight: bold;
}

/* グリッドレイアウトの微調整 */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

@media (max-width: 1200px) {
    .achievements-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .achievements-grid {
        grid-template-columns: 1fr;
    }
    
    .achievements-stats {
        flex-direction: column;
        gap: 15px;
    }
}